diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index 8861d03ddf490e..a269e28c05c52d 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -105,11 +105,11 @@ jobs: - name: test (and upload coverage) run: | yarn backstage-cli repo test --maxWorkers=3 --workerIdleMemoryLimit=1300M --coverage - bash <(curl -s https://codecov.io/bash) + #bash <(curl -s https://codecov.io/bash) # Upload code coverage for some specific flags. Also see .codecov.yml - bash <(curl -s https://codecov.io/bash) -f packages/core-app-api/coverage/* -F core-app-api - bash <(curl -s https://codecov.io/bash) -f packages/core-components/coverage/* -F core-components - bash <(curl -s https://codecov.io/bash) -f packages/core-plugin-api/coverage/* -F core-plugin-api + #bash <(curl -s https://codecov.io/bash) -f packages/core-app-api/coverage/* -F core-app-api + #bash <(curl -s https://codecov.io/bash) -f packages/core-components/coverage/* -F core-components + #bash <(curl -s https://codecov.io/bash) -f packages/core-plugin-api/coverage/* -F core-plugin-api env: BACKSTAGE_TEST_DISABLE_DOCKER: 1 BACKSTAGE_TEST_DATABASE_POSTGRES16_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres16.ports[5432] }} diff --git a/microsite/yarn.lock b/microsite/yarn.lock index a8e4699105bf8e..92c7d76644b4c0 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -2304,6 +2304,13 @@ __metadata: languageName: node linkType: hard +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 83b85f72c59d1c080b4cbec0fef84528963a1b5db34e4370fa4bd1e3ff64a0d80e0cee7369d11d73c704e0286fb2865b530acac7a871088fbe92b5edf1000870 + languageName: node + linkType: hard + "@jridgewell/set-array@npm:^1.0.1": version: 1.1.2 resolution: "@jridgewell/set-array@npm:1.1.2" @@ -2328,6 +2335,13 @@ __metadata: languageName: node linkType: hard +"@jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.5.5 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.5" + checksum: c2e36e67971f719a8a3a85ef5a5f580622437cc723c35d03ebd0c9c0b06418700ef006f58af742791f71f6a4fc68fcfaf1f6a74ec2f9a3332860e9373459dae7 + languageName: node + linkType: hard + "@jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.9": version: 0.3.18 resolution: "@jridgewell/trace-mapping@npm:0.3.18" @@ -2338,6 +2352,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.31 + resolution: "@jridgewell/trace-mapping@npm:0.3.31" + dependencies: + "@jridgewell/resolve-uri": ^3.1.0 + "@jridgewell/sourcemap-codec": ^1.4.14 + checksum: af8fda2431348ad507fbddf8e25f5d08c79ecc94594061ce402cf41bc5aba1a7b3e59bf0fd70a619b35f33983a3f488ceeba8faf56bff784f98bb5394a8b7d47 + languageName: node + linkType: hard + "@leichtgewicht/ip-codec@npm:^2.0.1": version: 2.0.4 resolution: "@leichtgewicht/ip-codec@npm:2.0.4" @@ -2905,13 +2929,13 @@ __metadata: languageName: node linkType: hard -"@types/eslint-scope@npm:^3.7.3": - version: 3.7.4 - resolution: "@types/eslint-scope@npm:3.7.4" +"@types/eslint-scope@npm:^3.7.7": + version: 3.7.7 + resolution: "@types/eslint-scope@npm:3.7.7" dependencies: "@types/eslint": "*" "@types/estree": "*" - checksum: ea6a9363e92f301cd3888194469f9ec9d0021fe0a397a97a6dd689e7545c75de0bd2153dfb13d3ab532853a278b6572c6f678ce846980669e41029d205653460 + checksum: e2889a124aaab0b89af1bab5959847c5bec09809209255de0e63b9f54c629a94781daa04adb66bffcdd742f5e25a17614fb933965093c0eea64aacda4309380e languageName: node linkType: hard @@ -2941,6 +2965,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:^1.0.8": + version: 1.0.8 + resolution: "@types/estree@npm:1.0.8" + checksum: bd93e2e415b6f182ec4da1074e1f36c480f1d26add3e696d54fb30c09bc470897e41361c8fd957bf0985024f8fbf1e6e2aff977d79352ef7eb93a5c6dcff6c11 + languageName: node + linkType: hard + "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18": version: 4.17.31 resolution: "@types/express-serve-static-core@npm:4.17.31" @@ -3042,6 +3073,13 @@ __metadata: languageName: node linkType: hard +"@types/json-schema@npm:^7.0.15": + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 97ed0cb44d4070aecea772b7b2e2ed971e10c81ec87dd4ecc160322ffa55ff330dace1793489540e3e318d90942064bb697cc0f8989391797792d919737b3b98 + languageName: node + linkType: hard + "@types/luxon@npm:^3.0.0": version: 3.3.8 resolution: "@types/luxon@npm:3.3.8" @@ -3275,154 +3313,154 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/ast@npm:1.11.5, @webassemblyjs/ast@npm:^1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/ast@npm:1.11.5" +"@webassemblyjs/ast@npm:1.14.1, @webassemblyjs/ast@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/ast@npm:1.14.1" dependencies: - "@webassemblyjs/helper-numbers": 1.11.5 - "@webassemblyjs/helper-wasm-bytecode": 1.11.5 - checksum: 7df16d8d4364d40e2506776330f8114fddc6494e6e18e8d5ec386312a0881a564cef136b0a74cc4a6ba284e2ff6bad890ddc029a0ba6cf45cc15186e638db118 + "@webassemblyjs/helper-numbers": 1.13.2 + "@webassemblyjs/helper-wasm-bytecode": 1.13.2 + checksum: f9154ad9ea14f6f2374ebe918c221fd69a4d4514126a1acc6fa4966e8d27ab28cb550a5e6880032cf620e19640578658a7e5a55bd2aad1e3db4e9d598b8f2099 languageName: node linkType: hard -"@webassemblyjs/floating-point-hex-parser@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.5" - checksum: a6f35e3035a1ec4e446fa43da01539f3ed7e0f4b53d152f36ff34be1b63b08d86c4b09b6af375c95472a75f0c37b3b98b07199d157e767b8b3274e7a3962890c +"@webassemblyjs/floating-point-hex-parser@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.13.2" + checksum: e866ec8433f4a70baa511df5e8f2ebcd6c24f4e2cc6274c7c5aabe2bcce3459ea4680e0f35d450e1f3602acf3913b6b8e4f15069c8cfd34ae8609fb9a7d01795 languageName: node linkType: hard -"@webassemblyjs/helper-api-error@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/helper-api-error@npm:1.11.5" - checksum: 717a6ffb3283bd24a7b74710c9bd3d71ec331a26c15446441af19fae9f087e36acb8dcf25b900b6897a1d1eff838e463fe678d66281e7eccee9a3ac0e3447372 +"@webassemblyjs/helper-api-error@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-api-error@npm:1.13.2" + checksum: 48b5df7fd3095bb252f59a139fe2cbd999a62ac9b488123e9a0da3906ad8a2f2da7b2eb21d328c01a90da987380928706395c2897d1f3ed9e2125b6d75a920d0 languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.5" - checksum: 2c0925b1c3c9b115c183b88d9cf1a12e87fa4fc83ef985aa2a65d72cda543eba6b73b378d231b4feb810b17d3aa6cd297bd603199854346f8a50e3458d7ebbc0 +"@webassemblyjs/helper-buffer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.14.1" + checksum: b611e981dfd6a797c3d8fc3a772de29a6e55033737c2c09c31bb66c613bdbb2d25f915df1dee62a602c6acc057ca71128432fa8c3e22a893e1219dc454f14ede languageName: node linkType: hard -"@webassemblyjs/helper-numbers@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/helper-numbers@npm:1.11.5" +"@webassemblyjs/helper-numbers@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-numbers@npm:1.13.2" dependencies: - "@webassemblyjs/floating-point-hex-parser": 1.11.5 - "@webassemblyjs/helper-api-error": 1.11.5 + "@webassemblyjs/floating-point-hex-parser": 1.13.2 + "@webassemblyjs/helper-api-error": 1.13.2 "@xtuc/long": 4.2.2 - checksum: 49c8bbf561d4df38009e38e6357c396f4454773fd31a03579a8e050a2b28053f5c47f675f00a37f79a65082c938c2159fa603049688ac01b1bafdb472c21110c + checksum: 49e2c9bf9b66997e480f6b44d80f895b3cde4de52ac135921d28e144565edca6903a519f627f4089b5509de1d7f9e5023f0e1a94ff78a36c9e2eb30e7c18ffd2 languageName: node linkType: hard -"@webassemblyjs/helper-wasm-bytecode@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.5" - checksum: 4e868de92587e131a7f22bc4eb44eee60c178d4c2c3eeabcb973b4eac73ec477f25d5f838394797265dbe4b600e781c6e150c762a45f249b94bf0711e73409a7 +"@webassemblyjs/helper-wasm-bytecode@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.13.2" + checksum: 8e059e1c1f0294f4fc3df8e4eaff3c5ef6e2e1358f34ebc118eaf5070ed59e56ed7fc92b28be734ebde17c8d662d5d27e06ade686c282445135da083ae11c128 languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.5" +"@webassemblyjs/helper-wasm-section@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.14.1" dependencies: - "@webassemblyjs/ast": 1.11.5 - "@webassemblyjs/helper-buffer": 1.11.5 - "@webassemblyjs/helper-wasm-bytecode": 1.11.5 - "@webassemblyjs/wasm-gen": 1.11.5 - checksum: 1752d7e0dbbf236a5cdc2257e1626a3562bfb0a7d2e967dc5e798c73088f18f20a991491565e2ffee61615f08035b4760e7aa080380bb60b86b393b6eb7486ae + "@webassemblyjs/ast": 1.14.1 + "@webassemblyjs/helper-buffer": 1.14.1 + "@webassemblyjs/helper-wasm-bytecode": 1.13.2 + "@webassemblyjs/wasm-gen": 1.14.1 + checksum: 0a08d454a63192cd66abf91b6f060ac4b466cef341262246e9dcc828dd4c8536195dea9b46a1244b1eac65b59b8b502164a771a190052a92ff0a0a2ded0f8f53 languageName: node linkType: hard -"@webassemblyjs/ieee754@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/ieee754@npm:1.11.5" +"@webassemblyjs/ieee754@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/ieee754@npm:1.13.2" dependencies: "@xtuc/ieee754": ^1.2.0 - checksum: 68a855a3e3dd488fff4d2d100e491cb6ac07f728c9432f3216b8e1bb0a374b397b0a5f58fd3b71195e525d49c0c827db15c18897e1c220c629e759b19978e64c + checksum: d7e3520baa37a7309fa7db4d73d69fb869878853b1ebd4b168821bd03fcc4c0e1669c06231315b0039035d9a7a462e53de3ad982da4a426a4b0743b5888e8673 languageName: node linkType: hard -"@webassemblyjs/leb128@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/leb128@npm:1.11.5" +"@webassemblyjs/leb128@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/leb128@npm:1.13.2" dependencies: "@xtuc/long": 4.2.2 - checksum: 555314708b6615c203c31a9dd810141c6de728e0043c2169ca69905ccf4d8603102994cb74ac5d057ac229bfc2be40f69cad2edd134ef2b909ef694eefe7bba6 + checksum: 64083507f7cff477a6d71a9e325d95665cea78ec8df99ca7c050e1cfbe300fbcf0842ca3dcf3b4fa55028350135588a4f879398d3dd2b6a8de9913ce7faf5333 languageName: node linkType: hard -"@webassemblyjs/utf8@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/utf8@npm:1.11.5" - checksum: d8f67a5650d9bf26810da76e72d0547211a44f30f35657953f547e08185facb39ff326920bddec96d35b5cc65e4e66b1f23c6461847e2f93fad2a60b0bb20211 +"@webassemblyjs/utf8@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/utf8@npm:1.13.2" + checksum: 95ec6052f30eefa8d50c9b2a3394d08b17d53a4aa52821451d41d774c126fa8f39b988fbf5bff56da86852a87c16d676e576775a4071e5e5ccf020cc85a4b281 languageName: node linkType: hard -"@webassemblyjs/wasm-edit@npm:^1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.5" +"@webassemblyjs/wasm-edit@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.14.1" dependencies: - "@webassemblyjs/ast": 1.11.5 - "@webassemblyjs/helper-buffer": 1.11.5 - "@webassemblyjs/helper-wasm-bytecode": 1.11.5 - "@webassemblyjs/helper-wasm-section": 1.11.5 - "@webassemblyjs/wasm-gen": 1.11.5 - "@webassemblyjs/wasm-opt": 1.11.5 - "@webassemblyjs/wasm-parser": 1.11.5 - "@webassemblyjs/wast-printer": 1.11.5 - checksum: 790142a1e282848201c7b68860aabc0141ee44a98a62c3f0af05f8de3cc69b439c3af54ae9a06acbbfbf7fd192b30ee97fb31eda3e08973cae373534ad2135c7 + "@webassemblyjs/ast": 1.14.1 + "@webassemblyjs/helper-buffer": 1.14.1 + "@webassemblyjs/helper-wasm-bytecode": 1.13.2 + "@webassemblyjs/helper-wasm-section": 1.14.1 + "@webassemblyjs/wasm-gen": 1.14.1 + "@webassemblyjs/wasm-opt": 1.14.1 + "@webassemblyjs/wasm-parser": 1.14.1 + "@webassemblyjs/wast-printer": 1.14.1 + checksum: 9341c3146bb1b7863f03d6050c2a66990f20384ca137388047bbe1feffacb599e94fca7b7c18287d17e2449ffb4005fdc7f41f674a6975af9ad8522756f8ffff languageName: node linkType: hard -"@webassemblyjs/wasm-gen@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.5" +"@webassemblyjs/wasm-gen@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.14.1" dependencies: - "@webassemblyjs/ast": 1.11.5 - "@webassemblyjs/helper-wasm-bytecode": 1.11.5 - "@webassemblyjs/ieee754": 1.11.5 - "@webassemblyjs/leb128": 1.11.5 - "@webassemblyjs/utf8": 1.11.5 - checksum: 0122df4e5ce52d873f19f34b3ebe8237072e9e6a69667cbec42a2d98ba49f85ea2ed3d935195e6a7ad4f64b9dd7da42883f057fe1103d2062bc90f3428b063fe + "@webassemblyjs/ast": 1.14.1 + "@webassemblyjs/helper-wasm-bytecode": 1.13.2 + "@webassemblyjs/ieee754": 1.13.2 + "@webassemblyjs/leb128": 1.13.2 + "@webassemblyjs/utf8": 1.13.2 + checksum: 401b12bec7431c4fc29d9414bbe40d3c6dc5be04d25a116657c42329f5481f0129f3b5834c293f26f0e42681ceac9157bf078ce9bdb6a7f78037c650373f98b2 languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.5" +"@webassemblyjs/wasm-opt@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.14.1" dependencies: - "@webassemblyjs/ast": 1.11.5 - "@webassemblyjs/helper-buffer": 1.11.5 - "@webassemblyjs/wasm-gen": 1.11.5 - "@webassemblyjs/wasm-parser": 1.11.5 - checksum: f9416b0dece071e308616fb30e560f0c3c53b5bb23cc4409781b8c47d31e935b27e9a248c65aee9dd9136271e37a4c5cb0971b27e5adf623020fbb298423fe55 + "@webassemblyjs/ast": 1.14.1 + "@webassemblyjs/helper-buffer": 1.14.1 + "@webassemblyjs/wasm-gen": 1.14.1 + "@webassemblyjs/wasm-parser": 1.14.1 + checksum: 60c697a9e9129d8d23573856df0791ba33cea4a3bc2339044cae73128c0983802e5e50a42157b990eeafe1237eb8e7653db6de5f02b54a0ae7b81b02dcdf2ae9 languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.11.5, @webassemblyjs/wasm-parser@npm:^1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.5" +"@webassemblyjs/wasm-parser@npm:1.14.1, @webassemblyjs/wasm-parser@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.14.1" dependencies: - "@webassemblyjs/ast": 1.11.5 - "@webassemblyjs/helper-api-error": 1.11.5 - "@webassemblyjs/helper-wasm-bytecode": 1.11.5 - "@webassemblyjs/ieee754": 1.11.5 - "@webassemblyjs/leb128": 1.11.5 - "@webassemblyjs/utf8": 1.11.5 - checksum: 094b3df07532cd2a1db91710622cbaf3d7467a361f9f73dc564999385a472fcc08497d8ccf9294bd7c8813d5e2056c06a81e032abb60520168899605fde9b12c + "@webassemblyjs/ast": 1.14.1 + "@webassemblyjs/helper-api-error": 1.13.2 + "@webassemblyjs/helper-wasm-bytecode": 1.13.2 + "@webassemblyjs/ieee754": 1.13.2 + "@webassemblyjs/leb128": 1.13.2 + "@webassemblyjs/utf8": 1.13.2 + checksum: 93f1fe2676da465b4e824419d9812a3d7218de4c3addd4e916c04bc86055fa134416c1b67e4b7cbde8d728c0dce2721d06cc0bfe7a7db7c093a0898009937405 languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/wast-printer@npm:1.11.5" +"@webassemblyjs/wast-printer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wast-printer@npm:1.14.1" dependencies: - "@webassemblyjs/ast": 1.11.5 + "@webassemblyjs/ast": 1.14.1 "@xtuc/long": 4.2.2 - checksum: c2995224c56b403be7fce7afbb3ad6b2ceadce07a47b28bce745eabb0435fa363c0180bca907d28703ece02422d0de219e689253b55de288c79b8f92416c1d71 + checksum: 517881a0554debe6945de719d100b2d8883a2d24ddf47552cdeda866341e2bb153cd824a864bc7e2a61190a4b66b18f9899907e0074e9e820d2912ac0789ea60 languageName: node linkType: hard @@ -3457,12 +3495,12 @@ __metadata: languageName: node linkType: hard -"acorn-import-assertions@npm:^1.9.0": - version: 1.9.0 - resolution: "acorn-import-assertions@npm:1.9.0" +"acorn-import-phases@npm:^1.0.3": + version: 1.0.4 + resolution: "acorn-import-phases@npm:1.0.4" peerDependencies: - acorn: ^8 - checksum: 944fb2659d0845c467066bdcda2e20c05abe3aaf11972116df457ce2627628a81764d800dd55031ba19de513ee0d43bb771bc679cc0eda66dc8b4fade143bc0c + acorn: ^8.14.0 + checksum: e669cccfb6711af305150fcbfddcf4485fffdc4547a0ecabebe94103b47124cc02bfd186240061c00ac954cfb0461b4ecc3e203e138e43042b7af32063fa9510 languageName: node linkType: hard @@ -3482,7 +3520,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.7.1, acorn@npm:^8.8.2": +"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.8.2": version: 8.10.0 resolution: "acorn@npm:8.10.0" bin: @@ -3491,6 +3529,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.15.0": + version: 8.15.0 + resolution: "acorn@npm:8.15.0" + bin: + acorn: bin/acorn + checksum: 309c6b49aedf1a2e34aaf266de06de04aab6eb097c02375c66fdeb0f64556a6a823540409914fb364d9a11bc30d79d485a2eba29af47992d3490e9886c4391c3 + languageName: node + linkType: hard + "address@npm:^1.0.1, address@npm:^1.1.2": version: 1.2.1 resolution: "address@npm:1.2.1" @@ -3551,7 +3598,7 @@ __metadata: languageName: node linkType: hard -"ajv-keywords@npm:^5.0.0": +"ajv-keywords@npm:^5.0.0, ajv-keywords@npm:^5.1.0": version: 5.1.0 resolution: "ajv-keywords@npm:5.1.0" dependencies: @@ -3586,6 +3633,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^8.9.0": + version: 8.17.1 + resolution: "ajv@npm:8.17.1" + dependencies: + fast-deep-equal: ^3.1.3 + fast-uri: ^3.0.1 + json-schema-traverse: ^1.0.0 + require-from-string: ^2.0.2 + checksum: 1797bf242cfffbaf3b870d13565bd1716b73f214bb7ada9a497063aada210200da36e3ed40237285f3255acc4feeae91b1fb183625331bad27da95973f7253d9 + languageName: node + linkType: hard + "algoliasearch-helper@npm:^3.13.3": version: 3.14.2 resolution: "algoliasearch-helper@npm:3.14.2" @@ -3882,6 +3941,15 @@ __metadata: languageName: node linkType: hard +"baseline-browser-mapping@npm:^2.9.0": + version: 2.9.19 + resolution: "baseline-browser-mapping@npm:2.9.19" + bin: + baseline-browser-mapping: dist/cli.js + checksum: 5a9979a501f43d06188d6b4c1e5d540b3c5104d03439603af4bda0f1698b60ae2a44180fb7bdaeb9eea5118eb484a34e454211eb8cf0d104809fc668a0b2eb18 + languageName: node + linkType: hard + "batch@npm:0.6.1": version: 0.6.1 resolution: "batch@npm:0.6.1" @@ -4002,7 +4070,7 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.0.0, browserslist@npm:^4.14.5, browserslist@npm:^4.18.1, browserslist@npm:^4.21.10, browserslist@npm:^4.21.4, browserslist@npm:^4.22.1, browserslist@npm:^4.22.2": +"browserslist@npm:^4.0.0, browserslist@npm:^4.18.1, browserslist@npm:^4.21.10, browserslist@npm:^4.21.4, browserslist@npm:^4.22.1, browserslist@npm:^4.22.2": version: 4.22.3 resolution: "browserslist@npm:4.22.3" dependencies: @@ -4016,6 +4084,21 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.28.1": + version: 4.28.1 + resolution: "browserslist@npm:4.28.1" + dependencies: + baseline-browser-mapping: ^2.9.0 + caniuse-lite: ^1.0.30001759 + electron-to-chromium: ^1.5.263 + node-releases: ^2.0.27 + update-browserslist-db: ^1.2.0 + bin: + browserslist: cli.js + checksum: 895357d912ae5a88a3fa454d2d280e9869e13432df30ca8918e206c0783b3b59375b178fdaf16d0041a1cf21ac45c8eb0a20f96f73dbd9662abf4cf613177a1e + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -4145,6 +4228,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001759": + version: 1.0.30001768 + resolution: "caniuse-lite@npm:1.0.30001768" + checksum: 6d040e5b477446cc2c1d20100ac4b42a899a2fb3b862861d39ab9a9750c23a8ec69972496d5b6b16fd32b51bc74a9094b0cf3be6cc233f1e4d81b1c03d7a60a5 + languageName: node + linkType: hard + "ccount@npm:^2.0.0": version: 2.0.1 resolution: "ccount@npm:2.0.1" @@ -5242,6 +5332,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.5.263": + version: 1.5.286 + resolution: "electron-to-chromium@npm:1.5.286" + checksum: e18483f490aaf4cffb6e93e770bd5b6cf45997252ae10a0332ed3a853ac5764eab8681e6f18ca6741500e5ea487a473154d8630ad1543a9bd4dd66cf0f32a8e2 + languageName: node + linkType: hard + "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -5293,13 +5390,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.15.0": - version: 5.15.0 - resolution: "enhanced-resolve@npm:5.15.0" +"enhanced-resolve@npm:^5.19.0": + version: 5.19.0 + resolution: "enhanced-resolve@npm:5.19.0" dependencies: graceful-fs: ^4.2.4 - tapable: ^2.2.0 - checksum: fbd8cdc9263be71cc737aa8a7d6c57b43d6aa38f6cc75dde6fcd3598a130cc465f979d2f4d01bb3bf475acb43817749c79f8eef9be048683602ca91ab52e4f11 + tapable: ^2.3.0 + checksum: e7b30fa85a7831c79ad7b0aa15cde50e07eb9e770bc19266005821a596cf324f79d3b580223dccbd61e01a515cf4be09e1474745a4c47ad41d2d499b860314a5 languageName: node linkType: hard @@ -5340,10 +5437,10 @@ __metadata: languageName: node linkType: hard -"es-module-lexer@npm:^1.2.1": - version: 1.2.1 - resolution: "es-module-lexer@npm:1.2.1" - checksum: c4145b853e1491eaa5d591e4580926d242978c38071ad3d09165c3b6d50314cc0ae3bf6e1dec81a9e53768b9299df2063d2e4a67d7742a5029ddeae6c4fc26f0 +"es-module-lexer@npm:^2.0.0": + version: 2.0.0 + resolution: "es-module-lexer@npm:2.0.0" + checksum: 6290c43cc9bf6c9f9167b4be8c0105137401fbbd9d503d89880f7e811286cd33ab628407e7dea3c14d41cf9e634e580e5d9952907003a88c7fb2461de6f1b2c1 languageName: node linkType: hard @@ -5354,6 +5451,13 @@ __metadata: languageName: node linkType: hard +"escalade@npm:^3.2.0": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 47b029c83de01b0d17ad99ed766347b974b0d628e848de404018f3abee728e987da0d2d370ad4574aa3d5b5bfc368754fd085d69a30f8e75903486ec4b5b709e + languageName: node + linkType: hard + "escape-goat@npm:^4.0.0": version: 4.0.0 resolution: "escape-goat@npm:4.0.0" @@ -5644,6 +5748,13 @@ __metadata: languageName: node linkType: hard +"fast-uri@npm:^3.0.1": + version: 3.1.0 + resolution: "fast-uri@npm:3.1.0" + checksum: daab0efd3548cc53d0db38ecc764d125773f8bd70c34552ff21abdc6530f26fa4cb1771f944222ca5e61a0a1a85d01a104848ff88c61736de445d97bd616ea7e + languageName: node + linkType: hard + "fast-url-parser@npm:1.1.3": version: 1.1.3 resolution: "fast-url-parser@npm:1.1.3" @@ -6115,6 +6226,13 @@ __metadata: languageName: node linkType: hard +"graceful-fs@npm:^4.2.11": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + "gray-matter@npm:^4.0.3": version: 4.0.3 resolution: "gray-matter@npm:4.0.3" @@ -7289,10 +7407,10 @@ __metadata: languageName: node linkType: hard -"loader-runner@npm:^4.2.0": - version: 4.3.0 - resolution: "loader-runner@npm:4.3.0" - checksum: a90e00dee9a16be118ea43fec3192d0b491fe03a32ed48a4132eb61d498f5536a03a1315531c19d284392a8726a4ecad71d82044c28d7f22ef62e029bf761569 +"loader-runner@npm:^4.3.1": + version: 4.3.1 + resolution: "loader-runner@npm:4.3.1" + checksum: 14689a39a79b286d3d15f2199384d6132d62ea707abd6c7e50dc8a1f80c20cbfdd5344f7e6b4a7346974696689ab1a96f8ec7d1e8bf206c5264561502658bd3c languageName: node linkType: hard @@ -8631,6 +8749,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.27": + version: 2.0.27 + resolution: "node-releases@npm:2.0.27" + checksum: a9a54079d894704c2ec728a690b41fbc779a710f5d47b46fa3e460acff08a3e7dfa7108e5599b2db390aa31dac062c47c5118317201f12784188dc5b415f692d + languageName: node + linkType: hard + "nopt@npm:^6.0.0": version: 6.0.0 resolution: "nopt@npm:6.0.0" @@ -9087,6 +9212,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: e1cf46bf84886c79055fdfa9dcb3e4711ad259949e3565154b004b260cd356c5d54b31a1437ce9782624bf766272fe6b0154f5f0c744fb7af5d454d2b60db045 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -10431,7 +10563,7 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.1, schema-utils@npm:^3.2.0": +"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.1": version: 3.3.0 resolution: "schema-utils@npm:3.3.0" dependencies: @@ -10454,6 +10586,18 @@ __metadata: languageName: node linkType: hard +"schema-utils@npm:^4.3.0, schema-utils@npm:^4.3.3": + version: 4.3.3 + resolution: "schema-utils@npm:4.3.3" + dependencies: + "@types/json-schema": ^7.0.9 + ajv: ^8.9.0 + ajv-formats: ^2.1.1 + ajv-keywords: ^5.1.0 + checksum: 4e20404962fd45d5feb5942f7c9ab334a3d3dab94e15001049bd49e2959015f2c59089353953d4976fe664462c79121dea50392968182d4e2c4b75803f822fa3 + languageName: node + linkType: hard + "section-matter@npm:^1.0.0": version: 1.0.0 resolution: "section-matter@npm:1.0.0" @@ -10539,6 +10683,15 @@ __metadata: languageName: node linkType: hard +"serialize-javascript@npm:^6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" + dependencies: + randombytes: ^2.1.0 + checksum: c4839c6206c1d143c0f80763997a361310305751171dd95e4b57efee69b8f6edd8960a0b7fbfc45042aadff98b206d55428aee0dc276efe54f100899c7fa8ab7 + languageName: node + linkType: hard + "serve-handler@npm:^6.1.5": version: 6.1.5 resolution: "serve-handler@npm:6.1.5" @@ -11104,13 +11257,20 @@ __metadata: languageName: node linkType: hard -"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0": +"tapable@npm:^2.0.0": version: 2.2.1 resolution: "tapable@npm:2.2.1" checksum: 3b7a1b4d86fa940aad46d9e73d1e8739335efd4c48322cb37d073eb6f80f5281889bf0320c6d8ffcfa1a0dd5bfdbd0f9d037e252ef972aca595330538aac4d51 languageName: node linkType: hard +"tapable@npm:^2.3.0": + version: 2.3.0 + resolution: "tapable@npm:2.3.0" + checksum: ada1194219ad550e3626d15019d87a2b8e77521d8463ab1135f46356e987a4c37eff1e87ffdd5acd573590962e519cc81e8ea6f7ed632c66bb58c0f12bd772a4 + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.2.1 resolution: "tar@npm:6.2.1" @@ -11125,7 +11285,29 @@ __metadata: languageName: node linkType: hard -"terser-webpack-plugin@npm:^5.3.7, terser-webpack-plugin@npm:^5.3.9": +"terser-webpack-plugin@npm:^5.3.16": + version: 5.3.16 + resolution: "terser-webpack-plugin@npm:5.3.16" + dependencies: + "@jridgewell/trace-mapping": ^0.3.25 + jest-worker: ^27.4.5 + schema-utils: ^4.3.0 + serialize-javascript: ^6.0.2 + terser: ^5.31.1 + peerDependencies: + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + checksum: 4a9ba15a0917fa0de565f6d722cac1c5291fbb517a9afe3a2cce7edf851f0e02ee44ea45e2547aeb4fb7d599df3f1ccb04ba405879839d5425481c7180655679 + languageName: node + linkType: hard + +"terser-webpack-plugin@npm:^5.3.9": version: 5.3.9 resolution: "terser-webpack-plugin@npm:5.3.9" dependencies: @@ -11161,6 +11343,20 @@ __metadata: languageName: node linkType: hard +"terser@npm:^5.31.1": + version: 5.46.0 + resolution: "terser@npm:5.46.0" + dependencies: + "@jridgewell/source-map": ^0.3.3 + acorn: ^8.15.0 + commander: ^2.20.0 + source-map-support: ~0.5.20 + bin: + terser: bin/terser + checksum: 39d28f3723e84e80ddb4576a441adb12a6d365258fb9262e25f8b6d1e4514954e81f711008ee2ad9927f00b860a5bcbd4c1db7a6873d0f712bdcc667fb7b7557 + languageName: node + linkType: hard + "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" @@ -11468,6 +11664,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.2.0": + version: 1.2.3 + resolution: "update-browserslist-db@npm:1.2.3" + dependencies: + escalade: ^3.2.0 + picocolors: ^1.1.1 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 6f209a97ae8eacdd3a1ef2eb365adf49d1e2a757e5b2dd4ac87dc8c99236cbe3e572d3e605a87dd7b538a11751b71d9f93edc47c7405262a293a493d155316cd + languageName: node + linkType: hard + "update-notifier@npm:^6.0.2": version: 6.0.2 resolution: "update-notifier@npm:6.0.2" @@ -11598,13 +11808,13 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.4.0": - version: 2.4.0 - resolution: "watchpack@npm:2.4.0" +"watchpack@npm:^2.5.1": + version: 2.5.1 + resolution: "watchpack@npm:2.5.1" dependencies: glob-to-regexp: ^0.4.1 graceful-fs: ^4.1.2 - checksum: 23d4bc58634dbe13b86093e01c6a68d8096028b664ab7139d58f0c37d962d549a940e98f2f201cecdabd6f9c340338dc73ef8bf094a2249ef582f35183d1a131 + checksum: 44a6030e923fbbe2cbc51cd7fb7abdff58bc35ba68d6c3ca46e63b46f8b3502c7253e6ada384387e946df5515d3854227a84cec49eb88a315186f5c9a67a3e79 languageName: node linkType: hard @@ -11723,47 +11933,48 @@ __metadata: languageName: node linkType: hard -"webpack-sources@npm:^3.2.3": - version: 3.2.3 - resolution: "webpack-sources@npm:3.2.3" - checksum: 989e401b9fe3536529e2a99dac8c1bdc50e3a0a2c8669cbafad31271eadd994bc9405f88a3039cd2e29db5e6d9d0926ceb7a1a4e7409ece021fe79c37d9c4607 +"webpack-sources@npm:^3.3.3": + version: 3.3.3 + resolution: "webpack-sources@npm:3.3.3" + checksum: 243d438ec4dfe805cca20fa66d111114b1f277b8ecfa95bb6ee0a6c7d996aee682539952028c2b203a6c170e6ef56f71ecf3e366e90bf1cb58b0ae982176b651 languageName: node linkType: hard "webpack@npm:^5.88.1": - version: 5.88.2 - resolution: "webpack@npm:5.88.2" - dependencies: - "@types/eslint-scope": ^3.7.3 - "@types/estree": ^1.0.0 - "@webassemblyjs/ast": ^1.11.5 - "@webassemblyjs/wasm-edit": ^1.11.5 - "@webassemblyjs/wasm-parser": ^1.11.5 - acorn: ^8.7.1 - acorn-import-assertions: ^1.9.0 - browserslist: ^4.14.5 + version: 5.105.0 + resolution: "webpack@npm:5.105.0" + dependencies: + "@types/eslint-scope": ^3.7.7 + "@types/estree": ^1.0.8 + "@types/json-schema": ^7.0.15 + "@webassemblyjs/ast": ^1.14.1 + "@webassemblyjs/wasm-edit": ^1.14.1 + "@webassemblyjs/wasm-parser": ^1.14.1 + acorn: ^8.15.0 + acorn-import-phases: ^1.0.3 + browserslist: ^4.28.1 chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.15.0 - es-module-lexer: ^1.2.1 + enhanced-resolve: ^5.19.0 + es-module-lexer: ^2.0.0 eslint-scope: 5.1.1 events: ^3.2.0 glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 + graceful-fs: ^4.2.11 json-parse-even-better-errors: ^2.3.1 - loader-runner: ^4.2.0 + loader-runner: ^4.3.1 mime-types: ^2.1.27 neo-async: ^2.6.2 - schema-utils: ^3.2.0 - tapable: ^2.1.1 - terser-webpack-plugin: ^5.3.7 - watchpack: ^2.4.0 - webpack-sources: ^3.2.3 + schema-utils: ^4.3.3 + tapable: ^2.3.0 + terser-webpack-plugin: ^5.3.16 + watchpack: ^2.5.1 + webpack-sources: ^3.3.3 peerDependenciesMeta: webpack-cli: optional: true bin: webpack: bin/webpack.js - checksum: 79476a782da31a21f6dd38fbbd06b68da93baf6a62f0d08ca99222367f3b8668f5a1f2086b7bb78e23172e31fa6df6fa7ab09b25e827866c4fc4dc2b30443ce2 + checksum: 15ee99e08e5ff88a34e84641b99bfe1416d4e0f7fc8929e50ca33294cf731188ce233ce9f311f51298abdc106ae03e8b2321dc74a8120f90ddeeec43ba744659 languageName: node linkType: hard diff --git a/package.json b/package.json index 7ccbce417d3f13..9f7054852fb578 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "1.26.0", + "version": "1.26.5", "private": true, "repository": { "type": "git", diff --git a/packages/app-next/CHANGELOG.md b/packages/app-next/CHANGELOG.md index 8b24a1e2d12692..fbd5b574d90dbb 100644 --- a/packages/app-next/CHANGELOG.md +++ b/packages/app-next/CHANGELOG.md @@ -1,5 +1,97 @@ # example-app-next +## 0.0.13 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-pagerduty@0.7.7 + - @backstage/plugin-linguist@0.1.20 + - @backstage/plugin-linguist-common@0.1.3 + +## 0.0.12 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.26.4 + - @backstage/plugin-adr@0.6.18 + - @backstage/plugin-airbrake@0.3.35 + - @backstage/plugin-apache-airflow@0.2.25 + - @backstage/plugin-azure-devops@0.4.4 + - @backstage/plugin-azure-sites@0.1.24 + - @backstage/plugin-badges@0.2.59 + - @backstage/plugin-cloudbuild@0.5.2 + - @backstage/plugin-code-coverage@0.2.28 + - @backstage/plugin-cost-insights@0.12.24 + - @backstage/plugin-dynatrace@10.0.4 + - @backstage/plugin-entity-feedback@0.2.18 + - @backstage/plugin-explore@0.4.21 + - @backstage/plugin-gcalendar@0.3.28 + - @backstage/plugin-gcp-projects@0.3.51 + - @backstage/plugin-github-actions@0.6.16 + - @backstage/plugin-gocd@0.1.41 + - @backstage/plugin-graphiql@0.3.8 + - @backstage/plugin-jenkins@0.9.10 + - @backstage/plugin-kafka@0.3.35 + - @backstage/plugin-lighthouse@0.4.20 + - @backstage/plugin-microsoft-calendar@0.1.17 + - @backstage/plugin-newrelic@0.3.50 + - @backstage/plugin-newrelic-dashboard@0.3.10 + - @backstage/plugin-octopus-deploy@0.2.17 + - @backstage/plugin-playlist@0.2.9 + - @backstage/plugin-puppetdb@0.1.18 + - @backstage/plugin-rollbar@0.4.35 + - @backstage/plugin-sentry@0.5.20 + - @backstage/plugin-shortcuts@0.3.24 + - @backstage/plugin-stackstorm@0.1.16 + - @backstage/plugin-tech-insights@0.3.27 + - @backstage/plugin-tech-radar@0.7.4 + - @backstage/app-defaults@1.5.4 + - app-next-example-plugin@0.0.10 + - @backstage/catalog-model@1.4.5 + - @backstage/core-app-api@1.12.4 + - @backstage/core-compat-api@0.2.4 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-app-api@0.6.4 + - @backstage/frontend-plugin-api@0.6.4 + - @backstage/integration-react@1.1.26 + - @backstage/theme@0.5.3 + - @backstage/plugin-api-docs@0.11.4 + - @backstage/plugin-app-visualizer@0.1.5 + - @backstage/plugin-catalog@1.19.0 + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-catalog-graph@0.4.4 + - @backstage/plugin-catalog-import@0.10.10 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-catalog-unprocessed-entities@0.2.3 + - @backstage/plugin-devtools@0.1.13 + - @backstage/plugin-home@0.7.3 + - @backstage/plugin-kubernetes@0.11.9 + - @backstage/plugin-linguist@0.1.19 + - @backstage/plugin-linguist-common@0.1.2 + - @backstage/plugin-org@0.6.24 + - @backstage/plugin-pagerduty@0.7.6 + - @backstage/plugin-permission-react@0.4.22 + - @backstage/plugin-scaffolder@1.19.3 + - @backstage/plugin-scaffolder-react@1.8.4 + - @backstage/plugin-search@1.4.10 + - @backstage/plugin-search-common@1.2.11 + - @backstage/plugin-search-react@1.7.10 + - @backstage/plugin-techdocs@1.10.4 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.9 + - @backstage/plugin-techdocs-react@1.2.3 + - @backstage/plugin-todo@0.2.39 + - @backstage/plugin-user-settings@0.8.5 + +## 0.0.11 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-todo@0.2.39 + ## 0.0.10 ### Patch Changes diff --git a/packages/app-next/package.json b/packages/app-next/package.json index d98cc91a57d7de..52b919ea3c5bea 100644 --- a/packages/app-next/package.json +++ b/packages/app-next/package.json @@ -1,6 +1,6 @@ { "name": "example-app-next", - "version": "0.0.10", + "version": "0.0.13", "private": true, "repository": { "type": "git", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 1d298af75235a1..335033f5bc84f5 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,102 @@ # example-app +## 0.2.99 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-pagerduty@0.7.7 + - @backstage/plugin-nomad@0.1.16 + - @backstage/plugin-linguist@0.1.20 + - @backstage/plugin-linguist-common@0.1.3 + +## 0.2.98 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.26.4 + - @backstage/plugin-adr@0.6.18 + - @backstage/plugin-airbrake@0.3.35 + - @backstage/plugin-apache-airflow@0.2.25 + - @backstage/plugin-azure-devops@0.4.4 + - @backstage/plugin-azure-sites@0.1.24 + - @backstage/plugin-badges@0.2.59 + - @backstage/plugin-cloudbuild@0.5.2 + - @backstage/plugin-code-coverage@0.2.28 + - @backstage/plugin-cost-insights@0.12.24 + - @backstage/plugin-dynatrace@10.0.4 + - @backstage/plugin-entity-feedback@0.2.18 + - @backstage/plugin-explore@0.4.21 + - @backstage/plugin-gcalendar@0.3.28 + - @backstage/plugin-gcp-projects@0.3.51 + - @backstage/plugin-github-actions@0.6.16 + - @backstage/plugin-github-pull-requests-board@0.2.1 + - @backstage/plugin-gocd@0.1.41 + - @backstage/plugin-graphiql@0.3.8 + - @backstage/plugin-jenkins@0.9.10 + - @backstage/plugin-kafka@0.3.35 + - @backstage/plugin-lighthouse@0.4.20 + - @backstage/plugin-microsoft-calendar@0.1.17 + - @backstage/plugin-newrelic@0.3.50 + - @backstage/plugin-newrelic-dashboard@0.3.10 + - @backstage/plugin-octopus-deploy@0.2.17 + - @backstage/plugin-playlist@0.2.9 + - @backstage/plugin-puppetdb@0.1.18 + - @backstage/plugin-rollbar@0.4.35 + - @backstage/plugin-sentry@0.5.20 + - @backstage/plugin-shortcuts@0.3.24 + - @backstage/plugin-stack-overflow@0.1.30 + - @backstage/plugin-stackstorm@0.1.16 + - @backstage/plugin-tech-insights@0.3.27 + - @backstage/plugin-tech-radar@0.7.4 + - @backstage/app-defaults@1.5.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/core-app-api@1.12.4 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-app-api@0.6.4 + - @backstage/integration-react@1.1.26 + - @backstage/theme@0.5.3 + - @backstage/plugin-api-docs@0.11.4 + - @backstage/plugin-auth-react@0.1.0 + - @backstage/plugin-catalog@1.19.0 + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-catalog-graph@0.4.4 + - @backstage/plugin-catalog-import@0.10.10 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-catalog-unprocessed-entities@0.2.3 + - @backstage/plugin-devtools@0.1.13 + - @backstage/plugin-home@0.7.3 + - @backstage/plugin-kubernetes@0.11.9 + - @backstage/plugin-kubernetes-cluster@0.0.10 + - @backstage/plugin-linguist@0.1.19 + - @backstage/plugin-linguist-common@0.1.2 + - @backstage/plugin-nomad@0.1.15 + - @backstage/plugin-notifications@0.2.0 + - @backstage/plugin-org@0.6.24 + - @backstage/plugin-pagerduty@0.7.6 + - @backstage/plugin-permission-react@0.4.22 + - @backstage/plugin-scaffolder@1.19.3 + - @backstage/plugin-scaffolder-react@1.8.4 + - @backstage/plugin-search@1.4.10 + - @backstage/plugin-search-common@1.2.11 + - @backstage/plugin-search-react@1.7.10 + - @backstage/plugin-signals@0.0.5 + - @backstage/plugin-techdocs@1.10.4 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.9 + - @backstage/plugin-techdocs-react@1.2.3 + - @backstage/plugin-todo@0.2.39 + - @backstage/plugin-user-settings@0.8.5 + +## 0.2.97 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-todo@0.2.39 + ## 0.2.96 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index f1911474e4b7ea..f81225803597d8 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "example-app", - "version": "0.2.96", + "version": "0.2.99", "backstage": { "role": "frontend" }, diff --git a/packages/backend-app-api/CHANGELOG.md b/packages/backend-app-api/CHANGELOG.md index 15d50cac236a04..4f820bc9e237f2 100644 --- a/packages/backend-app-api/CHANGELOG.md +++ b/packages/backend-app-api/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/backend-app-api +## 0.7.2 + +### Patch Changes + +- b6b59c5: Redact `meta` fields too with the logger + +## 0.7.1 + +### Patch Changes + +- 3554ebe: Move the JWKS registration outside of the lifecycle middleware + ## 0.7.0 ### Minor Changes diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json index 072efa7de87d4a..542f1747d14f38 100644 --- a/packages/backend-app-api/package.json +++ b/packages/backend-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-app-api", "description": "Core API used by Backstage backend apps", - "version": "0.7.0", + "version": "0.7.2", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-app-api/src/logging/WinstonLogger.ts b/packages/backend-app-api/src/logging/WinstonLogger.ts index 8a3eb281002cf2..8d4b37bb8d423d 100644 --- a/packages/backend-app-api/src/logging/WinstonLogger.ts +++ b/packages/backend-app-api/src/logging/WinstonLogger.ts @@ -85,16 +85,20 @@ export class WinstonLogger implements RootLoggerService { let redactionPattern: RegExp | undefined = undefined; - return { - format: format(info => { - if (redactionPattern && typeof info.message === 'string') { - info.message = info.message.replace(redactionPattern, '[REDACTED]'); - } - if (redactionPattern && typeof info.stack === 'string') { - info.stack = info.stack.replace(redactionPattern, '[REDACTED]'); + const replace = (obj: TransformableInfo) => { + for (const key in obj) { + if (obj.hasOwnProperty(key)) { + if (typeof obj[key] === 'object') { + obj[key] = replace(obj[key] as TransformableInfo); + } else if (typeof obj[key] === 'string') { + obj[key] = obj[key]?.replace(redactionPattern, '[REDACTED]'); + } } - return info; - })(), + } + return obj; + }; + return { + format: format(replace)(), add(newRedactions) { let added = 0; for (const redactionToTrim of newRedactions) { diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts b/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts index 60c6dcd3c0e69d..5e3a26252fa583 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts @@ -75,8 +75,8 @@ export const httpRouterServiceFactory = createServiceFactory( config, }); - router.use(createLifecycleMiddleware({ lifecycle })); router.use(createAuthIntegrationRouter({ auth })); + router.use(createLifecycleMiddleware({ lifecycle })); router.use(credentialsBarrier.middleware); router.use(createCookieAuthRefreshMiddleware({ auth, httpAuth })); diff --git a/packages/backend-next/CHANGELOG.md b/packages/backend-next/CHANGELOG.md index 70dac3ac7f1bbf..f05d83c8136713 100644 --- a/packages/backend-next/CHANGELOG.md +++ b/packages/backend-next/CHANGELOG.md @@ -1,5 +1,68 @@ # example-backend-next +## 0.0.28 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-nomad-backend@0.1.20 + - @backstage/plugin-linguist-backend@0.5.16 + +## 0.0.27 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-adr-backend@0.4.15 + - @backstage/plugin-azure-devops-backend@0.6.5 + - @backstage/plugin-badges-backend@0.4.1 + - @backstage/plugin-entity-feedback-backend@0.2.15 + - @backstage/plugin-jenkins-backend@0.4.5 + - @backstage/plugin-lighthouse-backend@0.4.11 + - @backstage/plugin-playlist-backend@0.3.22 + - @backstage/plugin-sonarqube-backend@0.2.20 + - @backstage/backend-defaults@0.2.17 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/backend-tasks@0.5.22 + - @backstage/catalog-model@1.4.5 + - @backstage/plugin-app-backend@0.3.65 + - @backstage/plugin-auth-backend@0.22.4 + - @backstage/plugin-auth-backend-module-github-provider@0.1.14 + - @backstage/plugin-auth-backend-module-guest-provider@0.1.3 + - @backstage/plugin-auth-node@0.4.12 + - @backstage/plugin-catalog-backend@1.21.1 + - @backstage/plugin-catalog-backend-module-backstage-openapi@0.2.0 + - @backstage/plugin-catalog-backend-module-openapi@0.1.35 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.15 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.4 + - @backstage/plugin-devtools-backend@0.3.3 + - @backstage/plugin-kubernetes-backend@0.17.0 + - @backstage/plugin-linguist-backend@0.5.15 + - @backstage/plugin-nomad-backend@0.1.19 + - @backstage/plugin-notifications-backend@0.2.0 + - @backstage/plugin-permission-backend@0.5.41 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.1.14 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-node@0.7.28 + - @backstage/plugin-proxy-backend@0.4.15 + - @backstage/plugin-scaffolder-backend@1.22.4 + - @backstage/plugin-scaffolder-backend-module-github@0.2.7 + - @backstage/plugin-search-backend@1.5.7 + - @backstage/plugin-search-backend-module-catalog@0.1.22 + - @backstage/plugin-search-backend-module-explore@0.1.22 + - @backstage/plugin-search-backend-module-techdocs@0.1.22 + - @backstage/plugin-search-backend-node@1.2.21 + - @backstage/plugin-signals-backend@0.1.3 + - @backstage/plugin-techdocs-backend@1.10.4 + - @backstage/plugin-todo-backend@0.3.17 + +## 0.0.26 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-todo-backend@0.3.17 + ## 0.0.25 ### Patch Changes diff --git a/packages/backend-next/package.json b/packages/backend-next/package.json index 757e4b269f3424..d1c1fa70cb2bf1 100644 --- a/packages/backend-next/package.json +++ b/packages/backend-next/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-next", - "version": "0.0.25", + "version": "0.0.28", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index b0bf1a8b9107cc..f80cf545a3f403 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,82 @@ # example-backend +## 0.2.100 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-nomad-backend@0.1.20 + - @backstage/plugin-linguist-backend@0.5.16 + - example-app@0.2.99 + +## 0.2.99 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-adr-backend@0.4.15 + - @backstage/plugin-azure-devops-backend@0.6.5 + - @backstage/plugin-azure-sites-common@0.1.4 + - @backstage/plugin-badges-backend@0.4.1 + - @backstage/plugin-code-coverage-backend@0.2.32 + - @backstage/plugin-entity-feedback-backend@0.2.15 + - @backstage/plugin-explore-backend@0.0.28 + - @backstage/plugin-jenkins-backend@0.4.5 + - @backstage/plugin-kafka-backend@0.3.16 + - @backstage/plugin-lighthouse-backend@0.4.11 + - @backstage/plugin-playlist-backend@0.3.22 + - @backstage/plugin-rollbar-backend@0.1.63 + - @backstage/plugin-tech-insights-backend@0.5.32 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.50 + - @backstage/plugin-tech-insights-node@0.6.1 + - example-app@0.2.98 + - @backstage/backend-common@0.21.7 + - @backstage/backend-tasks@0.5.22 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/integration@1.10.0 + - @backstage/plugin-app-backend@0.3.65 + - @backstage/plugin-auth-backend@0.22.4 + - @backstage/plugin-auth-node@0.4.12 + - @backstage/plugin-catalog-backend@1.21.1 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.15 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.4 + - @backstage/plugin-catalog-node@1.11.1 + - @backstage/plugin-devtools-backend@0.3.3 + - @backstage/plugin-events-backend@0.3.4 + - @backstage/plugin-events-node@0.3.3 + - @backstage/plugin-kubernetes-backend@0.17.0 + - @backstage/plugin-linguist-backend@0.5.15 + - @backstage/plugin-nomad-backend@0.1.19 + - @backstage/plugin-permission-backend@0.5.41 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-node@0.7.28 + - @backstage/plugin-proxy-backend@0.4.15 + - @backstage/plugin-scaffolder-backend@1.22.4 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.18 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.3.3 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.34 + - @backstage/plugin-search-backend@1.5.7 + - @backstage/plugin-search-backend-module-catalog@0.1.22 + - @backstage/plugin-search-backend-module-elasticsearch@1.4.0 + - @backstage/plugin-search-backend-module-explore@0.1.22 + - @backstage/plugin-search-backend-module-pg@0.5.26 + - @backstage/plugin-search-backend-module-techdocs@0.1.22 + - @backstage/plugin-search-backend-node@1.2.21 + - @backstage/plugin-signals-backend@0.1.3 + - @backstage/plugin-signals-node@0.1.3 + - @backstage/plugin-techdocs-backend@1.10.4 + - @backstage/plugin-todo-backend@0.3.17 + +## 0.2.98 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-todo-backend@0.3.17 + - example-app@0.2.97 + ## 0.2.97 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index aa128febbbf3c5..fe9f0d6608271d 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.97", + "version": "0.2.100", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 6a466591b29d89..4c5473f87f4052 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/cli +## 0.26.4 + +### Patch Changes + +- ee1ab19: Add support for `versions:migrate` to do code changes. Can be skipped with `--no-code-changes` +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/cli-common@0.1.13 + - @backstage/cli-node@0.2.5 + - @backstage/config@1.2.0 + - @backstage/config-loader@1.8.0 + - @backstage/errors@1.2.4 + - @backstage/eslint-plugin@0.1.7 + - @backstage/integration@1.10.0 + - @backstage/release-manifests@0.0.11 + - @backstage/types@1.1.1 + ## 0.26.3 ### Patch Changes diff --git a/packages/cli/cli-report.md b/packages/cli/cli-report.md index a913b63f60f57c..819b1a22619f68 100644 --- a/packages/cli/cli-report.md +++ b/packages/cli/cli-report.md @@ -622,5 +622,6 @@ Usage: backstage-cli versions:migrate [options] Options: --pattern + --skip-code-changes -h, --help ``` diff --git a/packages/cli/package.json b/packages/cli/package.json index ca061ea9c431c9..ebd828792bf8c1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.26.3", + "version": "0.26.4", "publishConfig": { "access": "public" }, @@ -120,6 +120,7 @@ "react-dev-utils": "^12.0.0-next.60", "react-refresh": "^0.14.0", "recursive-readdir": "^2.2.2", + "replace-in-file": "^7.1.0", "rollup": "^4.0.0", "rollup-plugin-dts": "^6.1.0", "rollup-plugin-esbuild": "^6.1.1", diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 609c7b5946c750..fe2392614802ef 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -402,6 +402,10 @@ export function registerCommands(program: Command) { '--pattern ', 'Override glob for matching packages to upgrade', ) + .option( + '--skip-code-changes', + 'Skip code changes and only update package.json files', + ) .description( 'Migrate any plugins that have been moved to the @backstage-community namespace automatically', ) diff --git a/packages/cli/src/commands/versions/bump.test.ts b/packages/cli/src/commands/versions/bump.test.ts index a6537423c896f9..c8174639a6af33 100644 --- a/packages/cli/src/commands/versions/bump.test.ts +++ b/packages/cli/src/commands/versions/bump.test.ts @@ -216,6 +216,7 @@ describe('bump', () => { 'bumping @backstage/core in b to ^1.0.6', 'bumping @backstage/theme in b to ^2.0.0', 'Running yarn install to install new versions', + 'Checking for moved packages to the @backstage-community namespace...', '⚠️ The following packages may have breaking changes:', ' @backstage/theme : 1.0.0 ~> 2.0.0', ' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md', @@ -323,6 +324,7 @@ describe('bump', () => { 'bumping @backstage/core in b to ^1.0.6', 'bumping @backstage/theme in b to ^2.0.0', 'Skipping yarn install', + 'Checking for moved packages to the @backstage-community namespace...', '⚠️ The following packages may have breaking changes:', ' @backstage/theme : 1.0.0 ~> 2.0.0', ' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md', @@ -437,6 +439,7 @@ describe('bump', () => { 'bumping @backstage/core in a to ^1.0.6', 'Your project is now at version 0.0.1, which has been written to backstage.json', 'Running yarn install to install new versions', + 'Checking for moved packages to the @backstage-community namespace...', '⚠️ The following packages may have breaking changes:', ' @backstage/theme : 1.0.0 ~> 5.0.0', ' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md', @@ -640,6 +643,7 @@ describe('bump', () => { 'bumping @backstage/core in a to ^1.0.6', 'Your project is now at version 1.0.0, which has been written to backstage.json', 'Running yarn install to install new versions', + 'Checking for moved packages to the @backstage-community namespace...', '⚠️ The following packages may have breaking changes:', ' @backstage/theme : 1.0.0 ~> 5.0.0', ' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md', @@ -745,6 +749,7 @@ describe('bump', () => { 'bumping @backstage/theme in b to ^2.0.0', 'Skipping backstage.json update as custom pattern is used', 'Running yarn install to install new versions', + 'Checking for moved packages to the @backstage-community namespace...', '⚠️ The following packages may have breaking changes:', ' @backstage-extra/custom-two : 1.0.0 ~> 2.0.0', ' @backstage/theme : 1.0.0 ~> 2.0.0', @@ -968,6 +973,7 @@ describe('bump', () => { 'bumping @backstage/core in b to ^1.0.6', 'bumping @backstage/theme in b to ^2.0.0', 'Running yarn install to install new versions', + 'Checking for moved packages to the @backstage-community namespace...', '⚠️ The following packages may have breaking changes:', ' @backstage/theme : 1.0.0 ~> 2.0.0', ' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md', diff --git a/packages/cli/src/commands/versions/bump.ts b/packages/cli/src/commands/versions/bump.ts index dc0aa275300b25..aad5a7831f9d67 100644 --- a/packages/cli/src/commands/versions/bump.ts +++ b/packages/cli/src/commands/versions/bump.ts @@ -266,9 +266,12 @@ export default async (opts: OptionValues) => { } if (!opts.skipMigrate) { + console.log(); + const changed = await migrateMovedPackages({ pattern: opts.pattern, }); + if (changed && !opts.skipInstall) { await runYarnInstall(); } diff --git a/packages/cli/src/commands/versions/migrate.test.ts b/packages/cli/src/commands/versions/migrate.test.ts index 46c7f9bfb801cc..043e1893a423b0 100644 --- a/packages/cli/src/commands/versions/migrate.test.ts +++ b/packages/cli/src/commands/versions/migrate.test.ts @@ -120,6 +120,7 @@ describe('versions:migrate', () => { }); expectLogsToMatch(logs, [ + 'Checking for moved packages to the @backstage-community namespace...', 'Found a moved package @backstage/custom@^1.0.1 -> @backstage-community/custom in a (dependencies)', 'Found a moved package @backstage/custom-two@^1.0.0 -> @backstage-community/custom-two in a (dependencies)', 'Found a moved package @backstage/custom@^1.1.0 -> @backstage-community/custom in b (dependencies)', @@ -164,4 +165,181 @@ describe('versions:migrate', () => { }, }); }); + + it('should replace the occurences of the moved package in files inside the correct package', async () => { + mockDir.setContent({ + 'package.json': JSON.stringify({ + workspaces: { + packages: ['packages/*'], + }, + }), + node_modules: { + '@backstage': { + custom: { + 'package.json': JSON.stringify({ + name: '@backstage-extra/custom', + version: '1.0.1', + backstage: { + moved: '@backstage-community/custom', + }, + }), + }, + 'custom-two': { + 'package.json': JSON.stringify({ + name: '@backstage-extra/custom-two', + version: '1.0.0', + backstage: { + moved: '@backstage-community/custom-two', + }, + }), + }, + }, + }, + packages: { + a: { + 'package.json': JSON.stringify({ + name: 'a', + dependencies: { + '@backstage/core': '^1.0.5', + '@backstage/custom': '^1.0.1', + '@backstage/custom-two': '^1.0.0', + }, + }), + src: { + 'index.ts': "import { myThing } from '@backstage/custom';", + 'index.test.ts': "import { myThing } from '@backstage/custom-two';", + }, + }, + b: { + 'package.json': JSON.stringify({ + name: 'b', + dependencies: { + '@backstage/core': '^1.0.3', + '@backstage/theme': '^1.0.0', + '@backstage/custom': '^1.1.0', + '@backstage/custom-two': '^1.0.0', + }, + }), + }, + }, + }); + + jest.spyOn(run, 'run').mockResolvedValue(undefined); + + await withLogCollector(async () => { + await migrate({}); + }); + + expect(run.run).toHaveBeenCalledTimes(1); + expect(run.run).toHaveBeenCalledWith( + 'yarn', + ['install'], + expect.any(Object), + ); + + const indexA = await fs.readFile( + mockDir.resolve('packages/a/src/index.ts'), + 'utf-8', + ); + + expect(indexA).toEqual( + "import { myThing } from '@backstage-community/custom';", + ); + + const indexTestA = await fs.readFile( + mockDir.resolve('packages/a/src/index.test.ts'), + 'utf-8', + ); + + expect(indexTestA).toEqual( + "import { myThing } from '@backstage-community/custom-two';", + ); + }); + + it('should replaces the occurences of changed packages, and is careful', async () => { + mockDir.setContent({ + 'package.json': JSON.stringify({ + workspaces: { + packages: ['packages/*'], + }, + }), + node_modules: { + '@backstage': { + custom: { + 'package.json': JSON.stringify({ + name: '@backstage-extra/custom', + version: '1.0.1', + backstage: { + moved: '@backstage-community/custom', + }, + }), + }, + 'custom-two': { + 'package.json': JSON.stringify({ + name: '@backstage-extra/custom-two', + version: '1.0.0', + }), + }, + }, + }, + packages: { + a: { + 'package.json': JSON.stringify({ + name: 'a', + dependencies: { + '@backstage/core': '^1.0.5', + '@backstage/custom': '^1.0.1', + '@backstage/custom-two': '^1.0.0', + }, + }), + src: { + 'index.ts': "import { myThing } from '@backstage/custom';", + 'index.test.ts': "import { myThing } from '@backstage/custom-two';", + }, + }, + b: { + 'package.json': JSON.stringify({ + name: 'b', + dependencies: { + '@backstage/core': '^1.0.3', + '@backstage/theme': '^1.0.0', + '@backstage/custom': '^1.1.0', + '@backstage/custom-two': '^1.0.0', + }, + }), + }, + }, + }); + + jest.spyOn(run, 'run').mockResolvedValue(undefined); + + await withLogCollector(async () => { + await migrate({}); + }); + + expect(run.run).toHaveBeenCalledTimes(1); + expect(run.run).toHaveBeenCalledWith( + 'yarn', + ['install'], + expect.any(Object), + ); + + const indexA = await fs.readFile( + mockDir.resolve('packages/a/src/index.ts'), + 'utf-8', + ); + + expect(indexA).toEqual( + "import { myThing } from '@backstage-community/custom';", + ); + + const indexTestA = await fs.readFile( + mockDir.resolve('packages/a/src/index.test.ts'), + 'utf-8', + ); + + expect(indexTestA).toEqual( + "import { myThing } from '@backstage/custom-two';", + ); + }); }); diff --git a/packages/cli/src/commands/versions/migrate.ts b/packages/cli/src/commands/versions/migrate.ts index f824fa2b966029..321a78ef9fa251 100644 --- a/packages/cli/src/commands/versions/migrate.ts +++ b/packages/cli/src/commands/versions/migrate.ts @@ -15,15 +15,33 @@ */ import { BackstagePackageJson, PackageGraph } from '@backstage/cli-node'; import chalk from 'chalk'; -import { resolve as resolvePath } from 'path'; +import { resolve as resolvePath, join as joinPath } from 'path'; import { OptionValues } from 'commander'; import { readJson, writeJson } from 'fs-extra'; import { minimatch } from 'minimatch'; import { runYarnInstall } from './bump'; +import replace from 'replace-in-file'; + +declare module 'replace-in-file' { + export default function (config: { + files: string | string[]; + processor: (content: string, file: string) => string; + ignore?: string | string[]; + allowEmptyPaths?: boolean; + }): Promise< + { + file: string; + hasChanged: boolean; + numMatches?: number; + numReplacements?: number; + }[] + >; +} export default async (options: OptionValues) => { const changed = await migrateMovedPackages({ pattern: options.pattern, + skipCodeChanges: options.skipCodeChanges, }); if (changed) { @@ -31,29 +49,20 @@ export default async (options: OptionValues) => { } }; -export async function migrateMovedPackages(options?: { pattern?: string }) { +export async function migrateMovedPackages(options?: { + pattern?: string; + skipCodeChanges?: boolean; +}) { + console.log( + 'Checking for moved packages to the @backstage-community namespace...', + ); const packages = await PackageGraph.listTargetPackages(); - - const thingsThatHaveMoved = new Map< - string, - { - dependencies: { [k: string]: string }; - devDependencies: { [k: string]: string }; - peerDependencies: { [k: string]: string }; - } - >(); - let didAnythingChange = false; for (const pkg of packages) { const pkgName = pkg.packageJson.name; - thingsThatHaveMoved.set(pkgName, { - dependencies: {}, - devDependencies: {}, - peerDependencies: {}, - }); - let didPackageChange = false; + const movedPackages = new Map(); for (const depType of [ 'dependencies', @@ -87,6 +96,7 @@ export async function migrateMovedPackages(options?: { pattern?: string }) { const movedPackageName = packageInfo.backstage?.moved; if (movedPackageName) { + movedPackages.set(depName, movedPackageName); console.log( chalk.yellow( `Found a moved package ${depName}@${depVersion} -> ${movedPackageName} in ${pkgName} (${depType})`, @@ -106,6 +116,33 @@ export async function migrateMovedPackages(options?: { pattern?: string }) { await writeJson(resolvePath(pkg.dir, 'package.json'), pkg.packageJson, { spaces: 2, }); + + if (!options?.skipCodeChanges) { + // Replace all occurrences of the old package names in the code. + const files = await replace({ + files: joinPath(pkg.dir, 'src', '**'), + allowEmptyPaths: true, + processor: content => { + return Array.from(movedPackages.entries()).reduce( + (newContent, [oldName, newName]) => { + return newContent + .replace(new RegExp(`"${oldName}"`, 'g'), `"${newName}"`) + .replace(new RegExp(`'${oldName}'`, 'g'), `'${newName}'`) + .replace(new RegExp(`${oldName}/`, 'g'), `${newName}/`); + }, + content, + ); + }, + }); + + if (files.length > 0) { + console.log( + chalk.green( + `Updated ${files.length} files in ${pkgName} to use the new package names`, + ), + ); + } + } } } diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index da04ef9e2b43b9..643a672813484b 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/core-components +## 0.14.6 + +### Patch Changes + +- 36054e3: Fixed an internal circular import that broke Jest mocks. + +## 0.14.5 + +### Patch Changes + +- a29ed8d: The `SignInPage` guest provider will now fall back to legacy guest auth if the backend request fails, allowing guest auth without a running backend. + ## 0.14.4 ### Patch Changes diff --git a/packages/core-components/package.json b/packages/core-components/package.json index 9f632bcc7fe1df..25f2ad6dc6e7b1 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.14.4", + "version": "0.14.6", "publishConfig": { "access": "public" }, diff --git a/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx b/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx index 852622c74199af..9ee9c5525fc2a5 100644 --- a/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx +++ b/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx @@ -18,7 +18,7 @@ import { makeStyles } from '@material-ui/core/styles'; import TabUI, { TabProps } from '@material-ui/core/Tab'; import Tabs from '@material-ui/core/Tabs'; import React, { useCallback, useEffect, useState } from 'react'; -import { Link } from '@backstage/core-components'; +import { Link } from '../../components/Link'; // TODO(blam): Remove this implementation when the Tabs are ready // This is just a temporary solution to implementing tabs for now diff --git a/packages/core-components/src/layout/SignInPage/guestProvider.tsx b/packages/core-components/src/layout/SignInPage/guestProvider.tsx index 3867caed5a748a..145b653a82db44 100644 --- a/packages/core-components/src/layout/SignInPage/guestProvider.tsx +++ b/packages/core-components/src/layout/SignInPage/guestProvider.tsx @@ -60,7 +60,11 @@ const Component: ProviderComponent = ({ discoveryApi, }); - const identityResponse = await getIdentity(identity); + const identityResponse = await getIdentity(identity).catch(error => { + // eslint-disable-next-line no-console + console.warn(`Failed to sign in as a guest, ${error}`); + return undefined; + }); if (!identityResponse) { // eslint-disable-next-line no-alert @@ -108,7 +112,11 @@ const loader: ProviderLoader = async apis => { provider: 'guest', discoveryApi: apis.get(discoveryApiRef)!, }); - const identityResponse = await getIdentity(identity); + const identityResponse = await getIdentity(identity).catch(error => { + // eslint-disable-next-line no-console + console.warn(`Failed to sign in as a guest, ${error}`); + return undefined; + }); if (!identityResponse && !useLegacyGuestToken) { return undefined; diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index 4f13e2c25a5062..eb7105668ff3a0 100644 --- a/packages/techdocs-cli-embedded-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,5 +1,24 @@ # techdocs-cli-embedded-app +## 0.2.96 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.26.4 + - @backstage/app-defaults@1.5.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/core-app-api@1.12.4 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/integration-react@1.1.26 + - @backstage/test-utils@1.5.4 + - @backstage/theme@0.5.3 + - @backstage/plugin-catalog@1.19.0 + - @backstage/plugin-techdocs@1.10.4 + - @backstage/plugin-techdocs-react@1.2.3 + ## 0.2.95 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index 2a90a90246f520..c6f776015c9f59 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,6 +1,6 @@ { "name": "techdocs-cli-embedded-app", - "version": "0.2.95", + "version": "0.2.96", "private": true, "backstage": { "role": "frontend" diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 5f7d2d2ddc68a2..eb4335dfd3c7d0 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @techdocs/cli +## 1.8.10 + +### Patch Changes + +- 15768bc: Fix cookie endpoint mock for `serve` + ## 1.8.9 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 7525e53afcf65e..d909be2181b420 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "1.8.9", + "version": "1.8.10", "publishConfig": { "access": "public" }, diff --git a/packages/techdocs-cli/src/lib/httpServer.ts b/packages/techdocs-cli/src/lib/httpServer.ts index 252004c7def2ec..c38bc86d7a4a69 100644 --- a/packages/techdocs-cli/src/lib/httpServer.ts +++ b/packages/techdocs-cli/src/lib/httpServer.ts @@ -62,7 +62,7 @@ export default class HTTPServer { // This endpoind is used by the frontend to issue a cookie for the user. // But the MkDocs server doesn't expose it as a the Backestage backend does. // So we need to fake it here to prevent 404 errors. - if (request.url === '/api/techdocs/cookie') { + if (request.url === '/api/techdocs/.backstage/auth/v1/cookie') { const oneHourInMilliseconds = 60 * 60 * 1000; const expiresAt = new Date(Date.now() + oneHourInMilliseconds); const cookie = { expiresAt: expiresAt.toISOString() }; diff --git a/plugins/adr-backend/CHANGELOG.md b/plugins/adr-backend/CHANGELOG.md index 657da1b6b2d472..be8c97c611dcb6 100644 --- a/plugins/adr-backend/CHANGELOG.md +++ b/plugins/adr-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-adr-backend +## 0.4.15 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-adr-common@0.2.23 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration@1.10.0 + - @backstage/plugin-search-common@1.2.11 + ## 0.4.14 ### Patch Changes diff --git a/plugins/adr-backend/README.md b/plugins/adr-backend/README.md index 73af5137bacb20..81dd865846af7b 100644 --- a/plugins/adr-backend/README.md +++ b/plugins/adr-backend/README.md @@ -1,117 +1,3 @@ -# ADR Backend +# Deprecated -This ADR backend plugin is primarily responsible for the following: - -- Provides a `DefaultAdrCollatorFactory`, which can be used in the search backend to index ADR documents associated with entities to your Backstage Search. - -- Provides endpoints that use UrlReaders for getting ADR documents (used in the [ADR frontend plugin](../adr/README.md)). - -## Install - -## Setup your `integrations` config - -First off you'll need to setup your `integrations` config inside your `app-config.yaml`. You can skip this step if it's already setup previously, and if you need help configuring this you can read the [integrations documentation](https://backstage.io/docs/integrations/) - -### Up and Running - -Here's how to get the backend up and running: - -1. First we need to add the `@backstage/plugin-adr-backend` package to your backend: - -```sh -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-adr-backend -``` - -2. Then we will create a new file named `packages/backend/src/plugins/adr.ts`, and add the - following to it: - -```ts -import { createRouter } from '@backstage/plugin-adr-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - reader: env.reader, - cacheClient: env.cache.getClient(), - logger: env.logger, - }); -} -``` - -3. Next we wire this into the overall backend router, edit `packages/backend/src/index.ts`: - -```ts -import adr from './plugins/adr'; -// ... -async function main() { - // ... - // Add this line under the other lines that follow the useHotMemoize pattern - const adrEnv = useHotMemoize(module, () => createEnv('adr')); - // ... - // Insert this line under the other lines that add their routers to apiRouter in the same way - apiRouter.use('/adr', await adr(adrEnv)); -``` - -4. Now run `yarn start-backend` from the repo root - -### New Backend System - -The ADR backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - const backend = createBackend(); - -+ backend.add(import('@backstage/plugin-adr-backend')); - -// ... other feature additions - - backend.start(); -``` - -## Indexing ADR documents for search - -Before you are able to start indexing ADR documents to search, you need to go through the [search getting started guide](https://backstage.io/docs/features/search/getting-started). - -When you have your `packages/backend/src/plugins/search.ts` file ready to make modifications, install this plugin and add the following code snippet to add the `DefaultAdrCollatorFactory`. Also make sure to set up the frontend [ADR plugin](../adr/README.md) so search results can be routed correctly. - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-adr-backend -``` - -```ts -import { DefaultAdrCollatorFactory } from '@backstage/plugin-adr-backend'; - -... - -indexBuilder.addCollator({ - schedule, - factory: DefaultAdrCollatorFactory.fromConfig({ - cache: env.cache, - config: env.config, - discovery: env.discovery, - logger: env.logger, - reader: env.reader, - tokenManager: env.tokenManager, - }), -}); -``` - -### Parsing custom ADR document formats - -By default, the `DefaultAdrCollatorFactory` will parse and index documents that follow [MADR v3.0.0](https://github.com/adr/madr/tree/3.0.0) and [MADR v2.x](https://github.com/adr/madr/tree/2.1.2) standard file name and template format. If you use a different ADR format and file name convention, you can configure `DefaultAdrCollatorFactory` with custom `adrFilePathFilterFn` and `parser` options (see type definitions for details): - -```ts -DefaultAdrCollatorFactory.fromConfig({ - ... - parser: myCustomAdrParser, - adrFilePathFilterFn: myCustomAdrFilePathFilter, - ... -}) -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-adr-backend` instead. diff --git a/plugins/adr-backend/package.json b/plugins/adr-backend/package.json index 4230954e11c701..90f7eb29a007f5 100644 --- a/plugins/adr-backend/package.json +++ b/plugins/adr-backend/package.json @@ -1,31 +1,35 @@ { "name": "@backstage/plugin-adr-backend", - "version": "0.4.14", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "version": "0.4.15", + "backstage": { + "role": "backend-plugin", + "moved": "@backstage-community/plugin-adr-backend" + }, "publishConfig": { "access": "public", "main": "dist/index.cjs.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "backend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/adr-backend" }, + "license": "Apache-2.0", + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist" + ], "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", + "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/backend-common": "workspace:^", @@ -50,7 +54,5 @@ "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, - "files": [ - "dist" - ] + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-adr-backend instead." } diff --git a/plugins/adr-common/CHANGELOG.md b/plugins/adr-common/CHANGELOG.md index 61a608b1d01837..efb68499965ab5 100644 --- a/plugins/adr-common/CHANGELOG.md +++ b/plugins/adr-common/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-adr-common +## 0.2.23 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/integration@1.10.0 + - @backstage/plugin-search-common@1.2.11 + ## 0.2.22 ### Patch Changes diff --git a/plugins/adr-common/README.md b/plugins/adr-common/README.md index 38b5b7433c43c6..7c074e84b8de75 100644 --- a/plugins/adr-common/README.md +++ b/plugins/adr-common/README.md @@ -1,3 +1,3 @@ -# ADR Common +# Deprecated -Common types and functionalities for the ADR plugin. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-adr-common` instead. diff --git a/plugins/adr-common/package.json b/plugins/adr-common/package.json index 603ce8448bd069..41e2fa9a1efdba 100644 --- a/plugins/adr-common/package.json +++ b/plugins/adr-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-adr-common", - "version": "0.2.22", + "version": "0.2.23", "description": "Common functionalities for the adr plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-adr-common" }, "publishConfig": { "access": "public", @@ -41,5 +42,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-adr-common instead." } diff --git a/plugins/adr/CHANGELOG.md b/plugins/adr/CHANGELOG.md index 13836e5e6445a2..907744889c10a5 100644 --- a/plugins/adr/CHANGELOG.md +++ b/plugins/adr/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-adr +## 0.6.18 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-adr-common@0.2.23 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-plugin-api@0.6.4 + - @backstage/integration-react@1.1.26 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-search-common@1.2.11 + - @backstage/plugin-search-react@1.7.10 + ## 0.6.17 ### Patch Changes diff --git a/plugins/adr/README.md b/plugins/adr/README.md index 3e8647a8fa431c..aa3e89ce1f4f7c 100644 --- a/plugins/adr/README.md +++ b/plugins/adr/README.md @@ -1,161 +1,3 @@ -# Architecture Decision Records (ADR) Plugin +# Deprecated -Welcome to the ADR plugin! - -This plugin allows you to explore ADRs (Architecture Decision Records) associated with your entities, as well as discover ADRs across other entities using Backstage Search. Use this to inform your own architectural decisions based on the experiences of previous projects. - -![ADR tab](./docs/adr-tab.png) - -## Setup - -1. Install this plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-adr -``` - -2. Make sure the [ADR backend plugin](../adr-backend/README.md) is installed. - -3. [Configure integrations](https://backstage.io/docs/integrations/) for all sites you would like to pull ADRs from. - -### Entity Pages - -1. Add the plugin as a tab to your Entity pages: - -```jsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { EntityAdrContent, isAdrAvailable } from '@backstage/plugin-adr'; - -... -// Note: Add to any other Pages as well (e.g. defaultEntityPage and websiteEntityPage) -const serviceEntityPage = ( - - {/* other tabs... */} - - - - -``` - -2. Add `backstage.io/adr-location` annotation to your `catalog-info.yaml`: - -```yaml -metadata: - annotations: - backstage.io/adr-location: -``` - -The value for `backstage.io/adr-location` should be a path relative to your `catalog-info.yaml` file or a absolute URL to the directory which contains your ADR markdown files. - -For example, if you have the following directory structure, you would set `backstage.io/adr-location: docs/adrs`: - -``` -repo-root/ - README.md - src/ - catalog-info.yaml - docs/ - adrs/ - 0001-use-adrs.md - 0002-use-cloud.md -``` - -### Search - -First, make sure to setup Backstage Search with the [ADR backend plugin](../adr-backend/README.md). -Afterwards, add the following code snippet to use `AdrSearchResultListItem` when the type of the search results is `adr`: - -```tsx -// In packages/app/src/components/search/SearchPage.tsx -import { AdrSearchResultListItem } from '@backstage/plugin-adr'; -import { AdrDocument } from '@backstage/plugin-adr-common'; - -... -// Optional - Add type to side pane -, - }, - ]} -/> -... - -// In results - - {({ results }) => ( - - {results.map(({ type, document, highlight, rank }) => { - switch (type) { - ... - case 'adr': - return ( - - ); - ... - } - })} - - )} - -``` - -## Custom ADR formats - -By default, this plugin will parse ADRs according to the format specified by the [Markdown Architecture Decision Record (MADR) v2.x template](https://github.com/adr/madr/tree/2.1.2) or the [Markdown Any Decision Record (MADR) 3.x template](https://github.com/adr/madr/tree/3.0.0). If your ADRs are written using a different format, you can apply the following customizations to correctly identify and parse your documents: - -### Custom Filename/Path Format - -In order to ensure the plugin fetches the correct ADR files (e.g. ignoring your template file), you can pass in an optional `filePathFilterFn` parameter to `EntityAdrContent` which will be called with each file path relative to the ADR location specified by `backstage.io/adr-location`. For example, the follow custom filter function will ignore the ADR template file and include files with a specific naming convention including those under a specified sub-directory: - -```tsx -const myCustomFilterFn: AdrFilePathFilterFn = (path: string): boolean => { - if (path === '0000-adr-template.md') { - return false; - } - // Match all files following the pattern NNNN-title-with-dashes.md including those under decided-adrs/ - return /^(decided-adrs\/)?\d{4}-.+\.md$/.test(path); -} - -... - - -``` - -### Custom Content Decorators - -Your ADR Markdown content will typically be rendered in the UI as is with the exception of relative links/embeds being rewritten as absolute URLs so they can be linked correctly (e.g. `./my-diagram.png` => `/my-diagram.png`). Depending on your ADR format, you may want to apply additional transformations to the content (e.g. hiding or formatting front matter in a different way). You can do so by passing in a list of custom content decorators for the optional `contentDecorators` parameter. Note that passing in this parameter will override the default decorators. If you want to include the default ones, make sure to add them as well: - -```tsx -import { - AdrReader, - ... -} from '@backstage/plugin-adr'; - -... - -const myCustomDecorator: AdrContentDecorator = ({ content }) => { - return { content: applyCustomContentTransformation(content) }; -}; - -... - - -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-adr` instead. diff --git a/plugins/adr/package.json b/plugins/adr/package.json index a9908fe98c4cee..37826b2a3336a9 100644 --- a/plugins/adr/package.json +++ b/plugins/adr/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-adr", - "version": "0.6.17", + "version": "0.6.18", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-adr" }, "publishConfig": { "access": "public" @@ -70,5 +71,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-adr instead." } diff --git a/plugins/airbrake-backend/CHANGELOG.md b/plugins/airbrake-backend/CHANGELOG.md index f5ebe4ef70c873..628ac07934cdd4 100644 --- a/plugins/airbrake-backend/CHANGELOG.md +++ b/plugins/airbrake-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-airbrake-backend +## 0.3.15 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + ## 0.3.14 ### Patch Changes diff --git a/plugins/airbrake-backend/README.md b/plugins/airbrake-backend/README.md index 21056229de5ebf..5a4a3ba3caf309 100644 --- a/plugins/airbrake-backend/README.md +++ b/plugins/airbrake-backend/README.md @@ -1,32 +1,3 @@ -# airbrake-backend +# Deprecated -The Airbrake backend plugin provides a simple proxy to the Airbrake API while hiding away the secret API key from the frontend. - -## How to use - -See the [Airbrake plugin instructions](../airbrake/README.md#how-to-use). - -## Local Development - -This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. - -1. Add the required config to your `app-config.local.yaml`: - - ```yaml - airbrake: - apiKey: ${AIRBRAKE_API_KEY} - ``` - -2. Set the environment variable `AIRBRAKE_API_KEY` with your [API - key](https://airbrake.io/docs/api/#authentication). You can also write it - directly into the config file above for convenience - but beware of - accidentally leaking the key. - -3. Go into the plugin's directory and run it in standalone mode by running `yarn start`. - -Access it from http://localhost:7007/api/airbrake. Or use the [Airbrake plugin in standalone mode](../airbrake/README.md#local-development) which will talk to it automatically. - -Here are some example endpoints: - -- http://localhost:7007/api/airbrake/health -- http://localhost:7007/api/airbrake/api/v4/projects +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-airbrake-backend` instead. diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index df8b43921fd406..658a41c738c4a2 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -1,31 +1,36 @@ { "name": "@backstage/plugin-airbrake-backend", - "version": "0.3.14", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "version": "0.3.15", + "backstage": { + "role": "backend-plugin", + "moved": "@backstage-community/plugin-airbrake-backend" + }, "publishConfig": { "access": "public", "main": "dist/index.cjs.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "backend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/airbrake-backend" }, + "license": "Apache-2.0", + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist", + "config.d.ts" + ], "scripts": { - "start": "backstage-cli package start", "build": "backstage-cli package build", + "clean": "backstage-cli package clean", "lint": "backstage-cli package lint", - "test": "backstage-cli package test", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", - "clean": "backstage-cli package clean" + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/backend-common": "workspace:^", @@ -44,9 +49,6 @@ "@types/supertest": "^2.0.8", "supertest": "^6.1.6" }, - "files": [ - "dist", - "config.d.ts" - ], - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-airbrake-backend instead." } diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md index 0143474741aba5..162c80d76f576c 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-airbrake +## 0.3.35 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/dev-utils@1.0.31 + - @backstage/test-utils@1.5.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.3.34 ### Patch Changes diff --git a/plugins/airbrake/README.md b/plugins/airbrake/README.md index 2426a6eb8a52ca..0dff15fa8818ae 100644 --- a/plugins/airbrake/README.md +++ b/plugins/airbrake/README.md @@ -1,143 +1,3 @@ -# Airbrake +# Deprecated -The Airbrake plugin provides connectivity between Backstage and Airbrake (https://airbrake.io/). - -## How to use - -1. Install the Frontend plugin: - - ```bash - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-airbrake - ``` - -2. Install the Backend plugin: - - ```bash - # From your Backstage root directory - yarn --cwd packages/backend add @backstage/plugin-airbrake-backend - ``` - -3. Add the `EntityAirbrakeContent` and `isAirbrakeAvailable` to `packages/app/src/components/catalog/EntityPage.tsx` for all the entity pages you want Airbrake to be in: - - ```typescript jsx - import { - EntityAirbrakeContent, - isAirbrakeAvailable, - } from '@backstage/plugin-airbrake'; - - const serviceEntityPage = ( - - - - - - ); - - const websiteEntityPage = ( - - - - - - ); - - const defaultEntityPage = ( - - - - - - ); - ``` - -4. Create `packages/backend/src/plugins/airbrake.ts` with these contents: - - ```typescript - import { Router } from 'express'; - import { PluginEnvironment } from '../types'; - import { - createRouter, - extractAirbrakeConfig, - } from '@backstage/plugin-airbrake-backend'; - - export default async function createPlugin( - env: PluginEnvironment, - ): Promise { - return createRouter({ - logger: env.logger, - airbrakeConfig: extractAirbrakeConfig(env.config), - }); - } - ``` - -5. Setup the Backend code in `packages/backend/src/index.ts`: - - ```typescript - import airbrake from './plugins/airbrake'; - - async function main() { - //... After const createEnv = makeCreateEnv(config) ... - - const airbrakeEnv = useHotMemoize(module, () => createEnv('airbrake')); - - //... After const apiRouter = Router() ... - apiRouter.use('/airbrake', await airbrake(airbrakeEnv)); - } - ``` - -6. Add this config as a top level section in your `app-config.yaml`: - - ```yaml - airbrake: - apiKey: ${AIRBRAKE_API_KEY} - ``` - -7. Set an environment variable `AIRBRAKE_API_KEY` with your [API key](https://airbrake.io/docs/api/#authentication) - before starting Backstage backend. - -8. Add the following annotation to the `catalog-info.yaml` for a repo you want to link to an Airbrake project: - - ```yaml - metadata: - annotations: - airbrake.io/project-id: '123456' - ``` - -#### New Backend System - -The Airbrake backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import('@backstage/plugin-airbrake-backend')); - - backend.start(); -``` - -## Local Development - -Start this plugin in standalone mode by running `yarn start` inside the plugin directory. This method of serving the plugin provides quicker -iteration speed and a faster startup and hot reloads. It is only meant for local development, and the setup for it can -be found inside the [/dev](./dev) directory. - -> A mock API will be used to run it in standalone. If you want to talk to the real API [follow the instructions to start up Airbrake Backend in standalone](../airbrake-backend/README.md#local-development). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-airbrake` instead. diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 897058835034a5..16278a030f7c12 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.3.34", + "version": "0.3.35", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-airbrake" }, "publishConfig": { "access": "public", @@ -57,5 +58,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-airbrake instead." } diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index e3984d5f0ff8b0..9ef90d54ba3ab7 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-allure +## 0.1.51 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.50 ### Patch Changes diff --git a/plugins/allure/README.md b/plugins/allure/README.md index 22348385a3e4f6..3eec6a4a4fa96e 100644 --- a/plugins/allure/README.md +++ b/plugins/allure/README.md @@ -1,40 +1,3 @@ -# [Allure](https://docs.qameta.io/allure/) +# Deprecated -Welcome to the Backstage Allure plugin. This plugin add an entity service page to display Allure test reports related to the service. - -## Install - -```shell -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-allure -``` - -## Configure - -### Configure Allure service - -Add below configuration in the `app-config.yaml`. - -```yaml -allure: - baseUrl: # Example: https://allure.my-company.net or when running allure locally, http://localhost:5050/allure-docker-service -``` - -### Setup entity service page - -Add `EntityAllureReportContent` in the `EntityPage.tsx` like below: - -```diff -+ import { EntityAllureReportContent } from '@backstage/plugin-allure'; - -... - -const serviceEntityPage = ( - - ... -+ -+ -+ - -); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-allure` instead. diff --git a/plugins/allure/package.json b/plugins/allure/package.json index ab4e7f3e31aed7..4914e81d325a54 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-allure", - "version": "0.1.50", + "version": "0.1.51", "description": "A Backstage plugin that integrates with Allure", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-allure" }, "publishConfig": { "access": "public", @@ -69,5 +70,6 @@ } } } - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-allure instead." } diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index db483edd86f832..51516319dbed3d 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-analytics-module-ga +## 0.2.5 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-plugin-api@0.6.4 + ## 0.2.4 ### Patch Changes diff --git a/plugins/analytics-module-ga/README.md b/plugins/analytics-module-ga/README.md index dfea532403bbb7..6cd8eae8529968 100644 --- a/plugins/analytics-module-ga/README.md +++ b/plugins/analytics-module-ga/README.md @@ -1,259 +1,3 @@ -# Analytics Module: Google Analytics +# Deprecated -This plugin provides an opinionated implementation of the Backstage Analytics -API for Google Analytics. Once installed and configured, analytics events will -be sent to GA as your users navigate and use your Backstage instance. - -This plugin contains no other functionality. - -## Installation - -1. Install the plugin package in your Backstage app: - -```sh -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-analytics-module-ga -``` - -2. Wire up the API implementation to your App: - -```tsx -// packages/app/src/apis.ts -import { - analyticsApiRef, - configApiRef, - identityApiRef, -} from '@backstage/core-plugin-api'; -import { GoogleAnalytics } from '@backstage/plugin-analytics-module-ga'; - -export const apis: AnyApiFactory[] = [ - // Instantiate and register the GA Analytics API Implementation. - createApiFactory({ - api: analyticsApiRef, - deps: { configApi: configApiRef, identityApi: identityApiRef }, - factory: ({ configApi, identityApi }) => - GoogleAnalytics.fromConfig(configApi, { - identityApi, - }), - }), -]; -``` - -3. Configure the plugin in your `app-config.yaml`: - -The following is the minimum configuration required to start sending analytics -events to GA. All that's needed is your Universal Analytics tracking ID: - -```yaml -# app-config.yaml -app: - analytics: - ga: - trackingId: UA-0000000-0 -``` - -4. Update CSP in your `app-config.yaml`: - -The following is the minimal content security policy required to load scripts from GA. - -```yaml -backend: - csp: - connect-src: ["'self'", 'http:', 'https:'] - # Add these two lines below - script-src: ["'self'", "'unsafe-eval'", 'https://www.google-analytics.com'] - img-src: ["'self'", 'data:', 'https://www.google-analytics.com'] -``` - -## Configuration - -In order to be able to analyze usage of your Backstage instance _by plugin_, we -strongly recommend configuring at least one [custom dimension][what-is-a-custom-dimension] -to capture Plugin IDs associated with events, including page views. - -1. First, [configure the custom dimension in GA][configure-custom-dimension]. - Be sure to set the Scope to `hit`, and name it something like `Plugin`. Note - the index of the dimension you just created (e.g. `1`, if this is the first - custom dimension you've created in your GA property). -2. Then, add a mapping to your `app.analytics.ga` configuration that instructs - the plugin to capture Plugin IDs on the custom dimension you just created. - It should look like this: - -```yaml -app: - analytics: - ga: - trackingId: UA-0000000-0 - customDimensionsMetrics: - - type: dimension - index: 1 - source: context - key: pluginId -``` - -You can configure additional custom dimension and metric collection by adding -more entries to the `customDimensionsMetrics` array: - -```yaml -app: - analytics: - ga: - customDimensionsMetrics: - - type: dimension - index: 1 - source: context - key: pluginId - - type: dimension - index: 2 - source: context - key: routeRef - - type: dimension - index: 3 - source: context - key: extension - - type: metric - index: 1 - source: attributes - key: someEventContextAttr -``` - -### User IDs - -This plugin supports accurately deriving user-oriented metrics (like monthly -active users) using Google Analytics' [user ID views][ga-user-id-view]. To -enable this... - -1. Be sure you've gone through the process of setting up a user ID view in your - Backstage instance's Google Analytics property (see docs linked above). -2. Make sure you instantiate `GoogleAnalytics` with an `identityApi` instance - passed to it, as shown in the installation section above. -3. Set `app.analytics.ga.identity` to either `required` or `optional` in your - `app.config.yaml`, like this: - - ```yaml - app: - analytics: - ga: - trackingId: UA-0000000-0 - identity: optional - ``` - - Set `identity` to `optional` if you need accurate session counts, including - cases where users do not sign in at all. Use `required` if you need all hits - to be associated with a user ID without exception (and don't mind if some - sessions are not captured, such as those where no sign in occur). - -Note that, to comply with GA policies, the value of the User ID is -pseudonymized before being sent to GA. By default, it is a `sha256` hash of the -current user's `userEntityRef` as returned by the `identityApi`. To set a -different value, provide a `userIdTransform` function alongside `identityApi` -when you instantiate `GoogleAnalytics`. This function will be passed the -`userEntityRef` as an argument and should resolve to the value you wish to set -as the user ID. For example: - -```typescript -import { - analyticsApiRef, - configApiRef, - identityApiRef, -} from '@backstage/core-plugin-api'; -import { GoogleAnalytics } from '@backstage/plugin-analytics-module-ga'; - -export const apis: AnyApiFactory[] = [ - createApiFactory({ - api: analyticsApiRef, - deps: { configApi: configApiRef, identityApi: identityApiRef }, - factory: ({ configApi, identityApi }) => - GoogleAnalytics.fromConfig(configApi, { - identityApi, - userIdTransform: async (userEntityRef: string): Promise => { - return customHashingFunction(userEntityRef); - }, - }), - }), -]; -``` - -### Enabling Site Search - -If you wish to see all of the search events in the [Site Search](https://support.google.com/analytics/answer/1012264) -section of Google Analytics, you can enable sending virtual pageviews on every `search` event like so: - -```yaml -app: - analytics: - ga: - virtualSearchPageView: - mode: only # Defaults to 'disabled' - mountPath: /virtual-search # Defaults to '/search' - searchQuery: term # Defaults to 'query' - categoryQuery: sc # Omitted by default -``` - -Available `mode`s are: - -- `disabled` - no virtual pageviews are sent, default behavior -- `only` - sends virtual pageviews _instead_ of `search` events -- `both` - sends both virtual pageviews _and_ `search` events - -Virtual pageviews will be sent to the path specified in the `mountPath`, the search term will be -set as the value for query parameter `searchQuery` and category (if provided) will be set as the value for -query parameter `categoryQuery`, e.g. the example config above will result in -virtual pageviews being sent to `/virtual-search?term=SearchTermHere&sc=CategoryHere`. - -### Debugging and Testing - -In pre-production environments, you may wish to set additional configurations -to turn off reporting to Analytics and/or print debug statements to the -console. You can do so like this: - -```yaml -app: - analytics: - ga: - testMode: true # Prevents data being sent to GA - debug: true # Logs analytics event to the web console -``` - -You might commonly set the above in an `app-config.local.yaml` file, which is -normally `gitignore`'d but loaded and merged in when Backstage is bootstrapped. - -## Development - -If you would like to contribute improvements to this plugin, the easiest way to -make and test changes is to do the following: - -1. Clone the main Backstage monorepo `git clone git@github.com:backstage/backstage.git` -2. Install all dependencies `yarn install` -3. If one does not exist, create an `app-config.local.yaml` file in the root of - the monorepo and add config for this plugin (see below) -4. Enter this plugin's working directory: `cd plugins/analytics-provider-ga` -5. Start the plugin in isolation: `yarn start` -6. Navigate to the playground page at `http://localhost:3000/ga` -7. Open the web console to see events fire when you navigate or when you - interact with instrumented components. - -Code for the isolated version of the plugin can be found inside the [/dev](./dev) -directory. Changes to the plugin are hot-reloaded. - -### Recommended Dev Config - -Paste this into your `app-config.local.yaml` while developing this plugin: - -```yaml -app: - analytics: - ga: - trackingId: UA-0000000-0 - debug: true - testMode: true - customDimensionsMetrics: - - type: dimension - index: 1 - source: context - key: pluginId -``` - -[what-is-a-custom-dimension]: https://support.google.com/analytics/answer/2709828 -[configure-custom-dimension]: https://support.google.com/analytics/answer/2709828#configuration -[ga-user-id-view]: https://support.google.com/analytics/answer/3123669 +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-analytics-module-ga` instead. diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 0f6bd99e7c5c82..30999a899ea16c 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.2.4", + "version": "0.2.5", "backstage": { - "role": "frontend-plugin-module" + "role": "frontend-plugin-module", + "moved": "@backstage-community/plugin-analytics-module-ga" }, "publishConfig": { "access": "public", @@ -52,5 +53,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-analytics-module-ga instead." } diff --git a/plugins/analytics-module-ga4/CHANGELOG.md b/plugins/analytics-module-ga4/CHANGELOG.md index 96228fb37a343f..5dd20cad4a37ca 100644 --- a/plugins/analytics-module-ga4/CHANGELOG.md +++ b/plugins/analytics-module-ga4/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-analytics-module-ga4 +## 0.2.5 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-plugin-api@0.6.4 + ## 0.2.4 ### Patch Changes diff --git a/plugins/analytics-module-ga4/README.md b/plugins/analytics-module-ga4/README.md index dad9b88a27197c..7e56de55653f69 100644 --- a/plugins/analytics-module-ga4/README.md +++ b/plugins/analytics-module-ga4/README.md @@ -1,233 +1,3 @@ -# Analytics Module: Google Analytics 4 +# Deprecated -This plugin provides an opinionated implementation of the Backstage Analytics -API for Google Analytics 4. Once installed and configured, analytics events will -be sent to GA as your users navigate and use your Backstage instance. - -This plugin contains no other functionality. - -## Installation - -1. Install the plugin package in your Backstage app: - -```sh -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-analytics-module-ga4 -``` - -2. Wire up the API implementation to your App: - -```tsx -// packages/app/src/apis.ts -import { - analyticsApiRef, - configApiRef, - identityApiRef, -} from '@backstage/core-plugin-api'; -import { GoogleAnalytics4 } from '@backstage/plugin-analytics-module-ga4'; - -export const apis: AnyApiFactory[] = [ - // Instantiate and register the GA Analytics API Implementation. - createApiFactory({ - api: analyticsApiRef, - deps: { configApi: configApiRef, identityApi: identityApiRef }, - factory: ({ configApi, identityApi }) => - GoogleAnalytics4.fromConfig(configApi, { - identityApi, - }), - }), -]; -``` - -3. Configure the plugin in your `app-config.yaml`: - -The following is the minimum configuration required to start sending analytics -events to GA. All that's needed is your GA4 measurement ID: - -```yaml -# app-config.yaml -app: - analytics: - ga4: - measurementId: G-0000000-0 -``` - -4. Update CSP in your `app-config.yaml`: - -The following is the minimal content security policy required to load scripts from GA. - -```yaml -backend: - csp: - connect-src: ["'self'", 'http:', 'https:'] - # Add these two lines below - script-src: - [ - "'self'", - "'unsafe-eval'", - 'https://www.google-analytics.com', - 'https://www.googletagmanager.com', - ] - img-src: ["'self'", 'data:', 'https://www.google-analytics.com'] -``` - -## Configuration - -In order to be able to analyze usage of your Backstage instance by plugin, we recommend configuring [a content grouping](#enabling-content-grouping). -Additional dimensional data can be captured using custom dimensions, like this: - -1. First, [configure the custom dimension in GA] [configure-custom-dimension]. - Be sure to set the Scope to `Event`, and name it `dimension1`. -2. Then, add a mapping to your `app.analytics.ga4` configuration that instructs - the plugin to capture Plugin IDs on the custom dimension you just created. - It should look like this: -3. `allowedContexts` config accepts array of string, where each entry is a context parameter that will be sent in the event. - context names will be prefixed by `c_`. -4. `allowedAttributes` config accepts array of string, where each entry is an attribute that will be sent in the event. - attribute names will be prefixed by `a_`. -5. `allowedContexts` and `allowedAttributes` are optional, if not provided, no additional context and attributes will be sent. -6. if `allowedContexts` or `allowedAttributes` is set to '\*', all context and attributes will be sent. -7. `enableSendPageView` is used to send default events and is disabled by default. - -```yaml -app: - analytics: - ga4: - measurementId: G-0000000-0 - allowedContexts: ['pluginId'] -``` - -```yaml -app: - analytics: - ga4: - allowedContexts: ['pluginId'] - allowedAttributes: ['someEventContextAttr'] -``` - -### User IDs - -This plugin supports accurately deriving user-oriented metrics (like monthly -active users) using Google Analytics' [user ID views][ga-user-id-view]. To -enable this... - -1. Be sure you've gone through the process of setting up a user ID view in your - Backstage instance's Google Analytics property (see docs linked above). -2. Make sure you instantiate `GoogleAnalytics` with an `identityApi` instance - passed to it, as shown in the installation section above. -3. Set `app.analytics.ga4.identity` to either `required` or `optional` in your - `app.config.yaml`, like this: - - ```yaml - app: - analytics: - ga4: - measurementId: G-0000000-0 - identity: optional - ``` - - Set `identity` to `optional` if you need accurate session counts, including - cases where users do not sign in at all. Use `required` if you need all hits - to be associated with a user ID without exception (and don't mind if some - sessions are not captured, such as those where no sign in occur). - -Note that, to comply with GA policies, the value of the User ID is -pseudonymized before being sent to GA. By default, it is a `sha256` hash of the -current user's `userEntityRef` as returned by the `identityApi`. To set a -different value, provide a `userIdTransform` function alongside `identityApi` -when you instantiate `GoogleAnalytics`. This function will be passed the -`userEntityRef` as an argument and should resolve to the value you wish to set -as the user ID. For example: - -```typescript -import { - analyticsApiRef, - configApiRef, - identityApiRef, -} from '@backstage/core-plugin-api'; -import { GoogleAnalytics } from '@backstage/plugin-analytics-module-ga'; - -export const apis: AnyApiFactory[] = [ - createApiFactory({ - api: analyticsApiRef, - deps: { configApi: configApiRef, identityApi: identityApiRef }, - factory: ({ configApi, identityApi }) => - GoogleAnalytics4.fromConfig(configApi, { - identityApi, - userIdTransform: async (userEntityRef: string): Promise => { - return customHashingFunction(userEntityRef); - }, - }), - }), -]; -``` - -### Enabling content grouping - -Content groups enable you to categorize pages and screens into custom buckets which you can see -metrics for related groups of information. -More about content grouping here [content groups][content-grouping]. -It's recommended to enable content grouping by PluginId. `contentGrouping` supports `routeRef` and extension. - -```yaml -app: - analytics: - ga4: - contentGrouping: pluginId -``` - -Please note, content grouping takes 24hrs to show up in the Google Analytics dashboard. - -### Debugging and Testing - -In pre-production environments, you may wish to set additional configurations -to turn off reporting to Analytics and/or print debug statements to the -console. You can do so like this: - -```yaml -app: - analytics: - ga4: - testMode: true # Prevents data being sent to GA - debug: true # Logs analytics event to the web console -``` - -You might commonly set the above in an `app-config.local.yaml` file, which is -normally `gitignore`'d but loaded and merged in when Backstage is bootstrapped. - -## Development - -If you would like to contribute improvements to this plugin, the easiest way to -make and test changes is to do the following: - -1. Clone the main Backstage monorepo `git clone git@github.com:backstage/backstage.git` -2. Install all dependencies `yarn install` -3. If one does not exist, create an `app-config.local.yaml` file in the root of - the monorepo and add config for this plugin (see below) -4. Enter this plugin's working directory: `cd plugins/analytics-provider-ga4` -5. Start the plugin in isolation: `yarn start` -6. Navigate to the playground page at `http://localhost:3000/ga4` -7. Open the web console to see events fire when you navigate or when you - interact with instrumented components. - -Code for the isolated version of the plugin can be found inside the [/dev](./dev) -directory. Changes to the plugin are hot-reloaded. - -#### Recommended Dev Config - -Paste this into your `app-config.local.yaml` while developing this plugin: - -```yaml -app: - analytics: - ga4: - measurementId: G-0000000-0 - debug: true - testMode: true - allowedContexts: ['pluginId'] -``` - -[what-is-a-custom-dimension]: https://support.google.com/analytics/answer/2709828 -[configure-custom-dimension]: https://support.google.com/analytics/answer/10075209?hl=en# -[ga-user-id-view]: https://support.google.com/analytics/answer/3123669 -[content-grouping]: https://support.google.com/analytics/answer/11523339?hl=en +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-analytics-module-ga4` instead. diff --git a/plugins/analytics-module-ga4/package.json b/plugins/analytics-module-ga4/package.json index 887e35380ec898..6199c7f385118f 100644 --- a/plugins/analytics-module-ga4/package.json +++ b/plugins/analytics-module-ga4/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-analytics-module-ga4", - "version": "0.2.4", + "version": "0.2.5", "backstage": { - "role": "frontend-plugin-module" + "role": "frontend-plugin-module", + "moved": "@backstage-community/plugin-analytics-module-ga4" }, "publishConfig": { "access": "public", @@ -53,5 +54,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-analytics-module-ga4 instead." } diff --git a/plugins/analytics-module-newrelic-browser/CHANGELOG.md b/plugins/analytics-module-newrelic-browser/CHANGELOG.md index 81612f0a3437a7..d46a98b0609548 100644 --- a/plugins/analytics-module-newrelic-browser/CHANGELOG.md +++ b/plugins/analytics-module-newrelic-browser/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-analytics-module-newrelic-browser +## 0.1.5 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-plugin-api@0.6.4 + ## 0.1.4 ### Patch Changes diff --git a/plugins/analytics-module-newrelic-browser/README.md b/plugins/analytics-module-newrelic-browser/README.md index d607a4f446e4b2..d1ab509a8ae762 100644 --- a/plugins/analytics-module-newrelic-browser/README.md +++ b/plugins/analytics-module-newrelic-browser/README.md @@ -1,135 +1,3 @@ -# Analytics Module: New Relic Browser +# Deprecated -This plugin provides an opinionated implementation of the Backstage Analytics API for New Relic Browser. Once installed and configured, analytics events will be sent to New Relic as your users navigate and use your Backstage instance. - -This plugin contains no other functionality. - -## Installation - -1. Install the plugin package in your Backstage app: - -```sh -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-analytics-module-newrelic-browser -``` - -2. Wire up the API implementation to your App: - -```tsx -// packages/app/src/apis.ts -import { - analyticsApiRef, - configApiRef, - identityApiRef, -} from '@backstage/core-plugin-api'; -import { NewRelicBrowser } from '@backstage/plugin-analytics-module-newrelic-browser'; - -export const apis: AnyApiFactory[] = [ - // Instantiate and register the New Relic Browser API Implementation. - createApiFactory({ - api: analyticsApiRef, - deps: { configApi: configApiRef, identityApi: identityApiRef }, - factory: ({ configApi, identityApi }) => - NewRelicBrowser.fromConfig(configApi, { - identityApi, - }), - }), -]; -``` - -3. Configure the plugin in your `app-config.yaml`: - -The following is the minimum configuration required to start sending analytics -events to New Relic Browser. You find this information when creating a new application -in New Relic Browser using the Copy/Paste method. - -```yaml -# app-config.yaml -app: - analytics: - newRelic: - endpoint: 'bam.nr-data.net', - accountId: '1234567' - applicationId: '987654321' - licenseKey: 'NRJS-12a3456bc78de9123f4' -``` - -> Note: Depending on New Relic's data center you are using you'll want to change the `endpoint` to `bam.eu01.nr-data.net` for the EU data center. Refer to [this document](https://docs.newrelic.com/docs/new-relic-solutions/get-started/networks/#data-ingest) for available endpoints. - -## Configuration - -By default the distributed tracing and cookies features are disabled. You can enable them by adding the following to your `app-config.yaml`: - -```yaml -# app-config.yaml -app: - analytics: - newRelic: - ... - distributedTracing: true - cookiesEnabled: true -``` - -### User IDs - -This plugin supports sending user context to New Relic Browser by providing a User ID. This requires instantiating the `NewRelicBrowser` instance with an `identityApi` instance passed to it, but this is optional. If omitted the plugin will not send user context to New Relic Browser. - -By default the user ID is calculated as a SHA-256 hash of the current user's `userEntityRef` as returned by the `identityApi`. To set a -different value, provide a `userIdTransform` function alongside `identityApi` when you instantiate `NewRelicBrowser`. This function will be passed the `userEntityRef` as an argument and should resolve to the value you wish to set as the user ID. For example: - -```typescript -import { - analyticsApiRef, - configApiRef, - identityApiRef, -} from '@backstage/core-plugin-api'; -import { GoogleAnalytics } from '@backstage/plugin-analytics-module-newrelic-browser'; - -export const apis: AnyApiFactory[] = [ - createApiFactory({ - api: analyticsApiRef, - deps: { configApi: configApiRef, identityApi: identityApiRef }, - factory: ({ configApi, identityApi }) => - NewRelicBrowser.fromConfig(configApi, { - identityApi, - userIdTransform: async (userEntityRef: string): Promise => { - return customHashingFunction(userEntityRef); - }, - }), - }), -]; -``` - -## Development - -If you would like to contribute improvements to this plugin, the easiest way to -make and test changes is to do the following: - -1. Clone the main Backstage monorepo `git clone git@github.com:backstage/backstage.git` -2. Install all dependencies `yarn install` -3. If one does not exist, create an `app-config.local.yaml` file in the root of - the monorepo and add config for this plugin (see below) -4. Enter this plugin's working directory: `cd plugins/analytics-provider-newrelic-browser` -5. Start the plugin in isolation: `yarn start` -6. Navigate to the playground page at `http://localhost:3000/newrelic` -7. Open the web console to see events fire when you navigate or when you - interact with instrumented components. - -Code for the isolated version of the plugin can be found inside the [/dev](./dev) -directory. Changes to the plugin are hot-reloaded. - -#### Recommended Dev Config - -Paste this into your `app-config.local.yaml` while developing this plugin: - -```yaml -app: - analytics: - newRelic: - accountId: '1234567' - applicationId: '987654321' - licenseKey: 'NRJS-12a3456bc78de9123f4' - distributedTracingEnabled: true - cookiesEnabled: true - useEuEndpoint: false -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-analytics-module-newrelic-browser` instead. diff --git a/plugins/analytics-module-newrelic-browser/package.json b/plugins/analytics-module-newrelic-browser/package.json index b0e530ef6b553b..f544648b8e7d95 100644 --- a/plugins/analytics-module-newrelic-browser/package.json +++ b/plugins/analytics-module-newrelic-browser/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-analytics-module-newrelic-browser", - "version": "0.1.4", + "version": "0.1.5", "backstage": { - "role": "frontend-plugin-module" + "role": "frontend-plugin-module", + "moved": "@backstage-community/plugin-analytics-module-newrelic-browser" }, "publishConfig": { "access": "public", @@ -47,5 +48,6 @@ "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-analytics-module-newrelic-browser instead." } diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index a868e45af6fd3c..27fed73cb12b8c 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-apache-airflow +## 0.2.25 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + ## 0.2.24 ### Patch Changes diff --git a/plugins/apache-airflow/README.md b/plugins/apache-airflow/README.md index 305a94f0810209..986d8e1ca2e06c 100644 --- a/plugins/apache-airflow/README.md +++ b/plugins/apache-airflow/README.md @@ -1,147 +1,3 @@ -# Apache Airflow Plugin +# Deprecated -Welcome to the apache-airflow plugin! - -This plugin serves as frontend to the REST API exposed by Apache Airflow. -Note only [Airflow v2 (and later)](https://airflow.apache.org/docs/apache-airflow/stable/deprecated-rest-api-ref.html) integrate with the plugin. - -## Feature Requests & Ideas - -- [ ] Add support for running multiple instances of Airflow for monitoring - various deployment stages or business domains. ([Suggested by @JGoldman110](https://github.com/backstage/backstage/issues/735#issuecomment-985063468)) -- [ ] Make owner chips in the DAG table clickable, resolving to a user or group - in the entity catalog. ([Suggested by @julioz](https://github.com/backstage/backstage/pull/8348#discussion_r764766295)) - -## Installation - -1. Install the plugin with `yarn` in the root of your Backstage directory - -```sh -yarn --cwd packages/app add @backstage/plugin-apache-airflow -``` - -2. Import and use the plugin extension in `spp/src/App.tsx` - -```diff ---- a/packages/app/src/App.tsx -+++ b/packages/app/src/App.tsx -@@ -86,6 +86,7 @@ import { providers } from './identityProviders'; - import * as plugins from './plugins'; - - import { techDocsPage } from './components/techdocs/TechDocsPage'; -+import { ApacheAirflowPage } from '@backstage/plugin-apache-airflow'; - - const app = createApp({ - apis, -@@ -203,6 +204,7 @@ const routes = ( - element={} - /> - } /> -+ } /> - - ); -``` - -If you just want to embed the DAGs into an existing page, you can use the `ApacheAirflowDagTable` - -```tsx -import { ApacheAirflowDagTable } from '@backstage/plugin-apache-airflow'; - -export function SomeEntityPage(): JSX.Element { - return ( - - - - ); -} -``` - -## Configuration - -For links to the Airflow instance, the `baseUrl` must be defined in -`app-config.yaml`. - -```yaml -apacheAirflow: - baseUrl: https://your.airflow.instance.com -``` - -This plugin uses the Backstage proxy to securely communicate with the Apache -Airflow API. Add the following to your `app-config.yaml` to enable this -configuration: - -```yaml -proxy: - '/airflow': - target: https://your.airflow.instance.com/api/v1 - headers: - Authorization: ${AIRFLOW_BASIC_AUTH_HEADER} -``` - -In your production deployment of Backstage, you would also need to ensure that -you've set the `AIRFLOW_BASIC_AUTH_HEADER` environment variable before starting -the backend. - -While working locally, you may wish to hard-code your API key in your -`app-config.local.yaml` like this: - -```yaml -# app-config.local.yaml -proxy: - '/airflow': - target: http://localhost:8080/api/v1 - headers: - Authorization: Basic YWlyZmxvdzphaXJmbG93 -``` - -Where the basic authorization token is the base64 encoding of the username and -password of your instance. - -```sh -echo -n "airflow:airflow" | base64 -w0 -``` - -## Development - -For local development, you can setup a local Airflow instance for development -purposes by [running Airflow with Docker Compose][2]. - -To verify that Airflow is running, and the API is functioning as expected, you -can run the following `curl` command: - -```sh -curl -X GET \ - --user "airflow:airflow" \ - localhost:8080/api/v1/dags -``` - -To run the Backstage proxy, you will have to run start the `example-backend` -plugin. - -```sh -yarn workspace example-backend start -``` - -To verify that the proxy is configured correctly, you can curl the Backstage -proxy endpoint. If using basic authentication, you will have to base64 encode -the username and password: - -```sh -curl http://localhost:7007/api/proxy/airflow/dags -``` - -And finally, to run an instance of this plugin, you can run: - -```sh -yarn start -``` - -[1]: https://airflow.apache.org/docs/apache-airflow/stable/security/api.html -[2]: https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html -[3]: https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-apache-airflow` instead. diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 0dc6234400f170..f6fc1fa51f6680 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.2.24", + "version": "0.2.25", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-apache-airflow" }, "publishConfig": { "access": "public", @@ -58,5 +59,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-apache-airflow instead." } diff --git a/plugins/apollo-explorer/CHANGELOG.md b/plugins/apollo-explorer/CHANGELOG.md index 6b0a49aebff3ea..9d6fa663a500b5 100644 --- a/plugins/apollo-explorer/CHANGELOG.md +++ b/plugins/apollo-explorer/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-apollo-explorer +## 0.2.1 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + ## 0.2.0 ### Minor Changes diff --git a/plugins/apollo-explorer/README.md b/plugins/apollo-explorer/README.md index bc06612cab6c00..614a12b7c73cf6 100644 --- a/plugins/apollo-explorer/README.md +++ b/plugins/apollo-explorer/README.md @@ -1,104 +1,3 @@ -# apollo-explorer +# Deprecated -Welcome to the Apollo Explorer plugin! - -This plugin allows users to directly embed an [Apollo](https://www.apollographql.com) graph explorer directly into -Backstage! - -## Getting started - -### Getting an Apollo Graph Reference - -First things first, you will need an Apollo account, and a graph imported into your account. This is beyond the scope of -this plugin, so if you are totally new to Apollo, please reference their official -documentation [here](https://www.apollographql.com/docs). - -Once you have a graph set up in Apollo, we need to grab the graph reference. First, go to your Apollo graphs home page and choose the graph you wish to embed. - -![Apollo Graph List](./docs/img/apollo-graph-list.png) - -Once you are in your graph explorer, click the dropdown next to the share icon and select `Share as Embedded` - -![Share as Embedded](./docs/img/share-as-embedded.png) - -This modal contains a number of useful properties, all of which can be passed to the plugin via the component properties, but the only mandatory input we need from here is the `graphRef`. - -![Graph Ref](./docs/img/graph-ref.png) - -Hold on to this snippet for a second while we set up the plugin ✨ - -### Installing the Backstage Plugin - -First, add the plugin to your Backstage app - -```shell -yarn --cwd packages/app add @backstage/plugin-apollo-explorer -``` - -Then, in `packages/app/src/App.tsx` add the plugin as a `Route` - -```typescript -import { ApolloExplorerPage } from '@backstage/plugin-apollo-explorer'; - -const routes = ( - - {/* other routes... */} - - } - /> -``` - -Then, in `packages/app/src/components/Root/Root.tsx` add a sidebar item so users can find your beautiful plugin! - -```typescript - -``` - -That's it! You should now see an `Apollo Explorer` item in your sidebar, and if you click it, you should see your graph(s) load and direct you to authenticate via Apollo! - -![Needs Auth](./docs/img/needs-auth.png) - -Once you authenticate, your graph is ready to use 🚀 - -![Logged In](./docs/img/logged-in.png) - -### Authentication Tokens for Apollo Studio - -If you need to utilize an ApiRef to supply a token to Apollo, you may do so using an ApiHolder. - -In `packages/app/src/App.tsx` perform the following modifications from above. The import `ssoAuthApiRef` is used as an example and **does not exist**. - -```typescript -import { ApolloExplorerPage, EndpointProps } from '@backstage/plugin-apollo-explorer'; -import { ssoAuthApiRef } from '@companyxyz/devkit'; -import { ApiHolder } from '@backstage/core-plugin-api'; - -async function authCallback(options: { apiHolder: ApiHolder }): Promise<{token: string}> { - const sso = options.apiHolder.get(ssoAuthApiRef) - return await sso.getToken() -} - -const routes = ( - - {/* other routes... */} - - } - /> -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-apollo-explorer` instead. diff --git a/plugins/apollo-explorer/package.json b/plugins/apollo-explorer/package.json index bc4c4635b531e6..4a5b6b3c516a91 100644 --- a/plugins/apollo-explorer/package.json +++ b/plugins/apollo-explorer/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-apollo-explorer", - "version": "0.2.0", + "version": "0.2.1", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-apollo-explorer" }, "publishConfig": { "access": "public", @@ -52,5 +53,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-apollo-explorer instead." } diff --git a/plugins/auth-react/CHANGELOG.md b/plugins/auth-react/CHANGELOG.md index eb21584bbcd5cc..4294c2eaafac3e 100644 --- a/plugins/auth-react/CHANGELOG.md +++ b/plugins/auth-react/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-auth-react +## 0.1.1 + +### Patch Changes + +- efa0e83: When using `CookieAuthRefreshProvider` or `useCookieAuthRefresh`, a 404 response from the cookie endpoint will now be treated as if cookie auth is disabled and is not needed. + ## 0.1.0 ### Minor Changes diff --git a/plugins/auth-react/package.json b/plugins/auth-react/package.json index 625798ee6e0a5b..75ae04f9861145 100644 --- a/plugins/auth-react/package.json +++ b/plugins/auth-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-react", - "version": "0.1.0", + "version": "0.1.1", "description": "Web library for the auth plugin", "backstage": { "role": "web-library" diff --git a/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.test.tsx b/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.test.tsx index df5c833953d105..422f392e937343 100644 --- a/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.test.tsx +++ b/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.test.tsx @@ -217,6 +217,39 @@ describe('useCookieAuthRefresh', () => { ); }); + it('should handle 404 as disabled cookie auth', async () => { + const { result } = renderHook( + () => useCookieAuthRefresh({ pluginId: 'techdocs' }), + { + wrapper: ({ children }) => ( + + {children} + + ), + }, + ); + + await waitFor(() => + expect(result.current).toEqual({ + status: 'success', + data: { expiresAt: expect.any(Date) }, + }), + ); + }); + it('should call the api to get the cookie and use it', async () => { const { result } = renderHook( () => useCookieAuthRefresh({ pluginId: 'techdocs' }), diff --git a/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.tsx b/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.tsx index 244491f7e64f86..a6860ad1850050 100644 --- a/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.tsx +++ b/plugins/auth-react/src/hooks/useCookieAuthRefresh/useCookieAuthRefresh.tsx @@ -24,6 +24,7 @@ import { useAsync, useMountEffect } from '@react-hookz/web'; import { ResponseError } from '@backstage/errors'; const COOKIE_PATH = '/.backstage/auth/v1/cookie'; +const ONE_YEAR_MS = 365 * 24 * 3600_000; /** * @public @@ -54,6 +55,14 @@ export function useCookieAuthRefresh(options: { credentials: 'include', }); if (!response.ok) { + // If we get a 404 from the cookie endpoint we assume that it does not + // exist and cookie auth is not needed. For all active tabs we don't + // schedule another refresh for the forseeable future, but new tabs will + // still check if cookie auth has been added to the deployment. + // TODO(Rugvip): Once the legacy backend system is no longer supported we should remove this check + if (response.status === 404) { + return { expiresAt: new Date(Date.now() + ONE_YEAR_MS) }; + } throw await ResponseError.fromResponse(response); } const data = await response.json(); diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index 86f57690692ddd..b5039c37896e57 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-azure-devops-backend +## 0.6.5 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-azure-devops-common@0.4.2 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration@1.10.0 + - @backstage/plugin-auth-node@0.4.12 + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-catalog-node@1.11.1 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-node@0.7.28 + ## 0.6.4 ### Patch Changes diff --git a/plugins/azure-devops-backend/README.md b/plugins/azure-devops-backend/README.md index d15d740ab19cfe..437ff3a8fe0fe9 100644 --- a/plugins/azure-devops-backend/README.md +++ b/plugins/azure-devops-backend/README.md @@ -1,154 +1,3 @@ -# Azure DevOps Backend +# Deprecated -Simple plugin that proxies requests to the [Azure DevOps](https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-6.1) API. - -## Setup - -The following sections will help you get the Azure DevOps Backend plugin setup and running. - -### Credentials - -In order to support **Multiple Organizations** as well as **Service Principals** and **Managed Identity** the Azure DevOps plugin relies on the `integrations.azure` section of your `app-config.yaml` being properly configured to be able to access the needed credentials. More details on this can be found in the [Azure DevOps Locations](https://backstage.io/docs/integrations/azure/locations) documentation. - -### Single Organization Configuration - -For those with a single organization the Azure DevOps plugin requires the following YAML configuration to be added to your `app-config.yaml`: - -```yaml -azureDevOps: - host: dev.azure.com - organization: my-company -``` - -Configuration Details: - -- `host` can be the same as the ones used for the `integration` section -- `organization` is your Azure DevOps Services (cloud) Organization name or for Azure DevOps Server (on-premise) this will be your Collection name - -> Note: The credentials in this setup would still need to be defined in your `integrations.azure` section of your `app-config.yaml` as noted in the [Credentials](#credentials) section above. - -### Up and Running - -Here's how to get the backend up and running: - -1. First we need to add the `@backstage/plugin-azure-devops-backend` package to your backend: - - ```sh - # From your Backstage root directory - yarn --cwd packages/backend add @backstage/plugin-azure-devops-backend - ``` - -2. Then we will create a new file named `packages/backend/src/plugins/azure-devops.ts`, and add the - following to it: - - ```ts - import { createRouter } from '@backstage/plugin-azure-devops-backend'; - import { Router } from 'express'; - import type { PluginEnvironment } from '../types'; - - export default function createPlugin( - env: PluginEnvironment, - ): Promise { - return createRouter({ - logger: env.logger, - config: env.config, - reader: env.reader, - }); - } - ``` - -3. Next we wire this into the overall backend router, edit `packages/backend/src/index.ts`: - - ```ts - import azureDevOps from './plugins/azure-devops'; - // ... - async function main() { - // ... - // Add this line under the other lines that follow the useHotMemoize pattern - const azureDevOpsEnv = useHotMemoize(module, () => createEnv('azure-devops')); - // ... - // Insert this line under the other lines that add their routers to apiRouter in the same way - apiRouter.use('/azure-devops', await azureDevOps(azureDevOpsEnv)); - ``` - -4. Now run `yarn start-backend` from the repo root -5. Finally open `http://localhost:7007/api/azure-devops/health` in a browser and it should return `{"status":"ok"}` - -#### New Backend System - -The Azure DevOps backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import('@backstage/plugin-azure-devops-backend')); - - backend.start(); -``` - -## Processor - -The Azure DevOps backend plugin includes the `AzureDevOpsAnnotatorProcessor` which will automatically add the needed annotations for you. Here's how to install it: - -```diff - import { CatalogBuilder } from '@backstage/plugin-catalog-backend'; - import { ScaffolderEntitiesProcessor } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model'; - import { Router } from 'express'; - import { PluginEnvironment } from '../types'; -+ import { AzureDevOpsAnnotatorProcessor } from '@backstage/plugin-azure-devops-backend'; - - export default async function createPlugin( - env: PluginEnvironment, - ): Promise { - const builder = await CatalogBuilder.create(env); - builder.addProcessor(new ScaffolderEntitiesProcessor()); -+ builder.addProcessor(AzureDevOpsAnnotatorProcessor.fromConfig(env.config)); - const { processingEngine, router } = await builder.build(); - await processingEngine.start(); - return router; - } -``` - -To use this with the New Backend System you'll want to create a [backend module extension for the Catalog](https://backstage.io/docs/backend-system/building-backends/migrating#other-catalog-extensions) if you haven't already. Here's a basic example of this assuming you are only adding the `AzureDevOpsAnnotatorProcessor`, this would go in your `packages/backend/index.ts`: - -```diff - import { createBackend } from '@backstage/backend-defaults'; -+ import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; -+ import { coreServices, createBackendModule } from '@backstage/backend-plugin-api'; -+ import { AzureDevOpsAnnotatorProcessor } from '@backstage/plugin-azure-devops-backend'; - -+ const catalogModuleCustomExtensions = createBackendModule({ -+ pluginId: 'catalog', // name of the plugin that the module is targeting -+ moduleId: 'custom-extensions', -+ register(env) { -+ env.registerInit({ -+ deps: { -+ catalog: catalogProcessingExtensionPoint, -+ config: coreServices.rootConfig, -+ }, -+ async init({ catalog, config }) { -+ catalog.addProcessor(AzureDevOpsAnnotatorProcessor.fromConfig(config)); -+ }, -+ }); -+ }, -+ }); - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(catalogModuleCustomExtensions()); - - backend.start(); -``` - -## Links - -- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/azure-devops) -- [The Backstage homepage](https://backstage.io) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-azure-devops-backend` instead. diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index c018866d62b200..a14bfb88ca3347 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -1,31 +1,36 @@ { "name": "@backstage/plugin-azure-devops-backend", - "version": "0.6.4", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "version": "0.6.5", + "backstage": { + "role": "backend-plugin", + "moved": "@backstage-community/plugin-azure-devops-backend" + }, "publishConfig": { "access": "public", "main": "dist/index.cjs.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "backend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/azure-devops-backend" }, + "license": "Apache-2.0", + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist", + "config.d.ts" + ], "scripts": { - "start": "backstage-cli package start", "build": "backstage-cli package build", + "clean": "backstage-cli package clean", "lint": "backstage-cli package lint", - "test": "backstage-cli package test", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", - "clean": "backstage-cli package clean" + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/backend-common": "workspace:^", @@ -54,9 +59,6 @@ "@types/supertest": "^2.0.8", "supertest": "^6.1.6" }, - "files": [ - "dist", - "config.d.ts" - ], - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-azure-devops-backend instead." } diff --git a/plugins/azure-devops-common/CHANGELOG.md b/plugins/azure-devops-common/CHANGELOG.md index bc15d508e9bf8b..ed22f32141bfbe 100644 --- a/plugins/azure-devops-common/CHANGELOG.md +++ b/plugins/azure-devops-common/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-azure-devops-common +## 0.4.2 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-permission-common@0.7.13 + ## 0.4.1 ### Patch Changes diff --git a/plugins/azure-devops-common/README.md b/plugins/azure-devops-common/README.md new file mode 100644 index 00000000000000..4ae22368b9dc9c --- /dev/null +++ b/plugins/azure-devops-common/README.md @@ -0,0 +1,3 @@ +# Deprecated + +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-azure-devops-common` instead. diff --git a/plugins/azure-devops-common/package.json b/plugins/azure-devops-common/package.json index ada36f1eba3bf6..df1697960cf3da 100644 --- a/plugins/azure-devops-common/package.json +++ b/plugins/azure-devops-common/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-azure-devops-common", - "version": "0.4.1", + "version": "0.4.2", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-azure-devops-common" }, "publishConfig": { "access": "public", @@ -40,5 +41,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-azure-devops-common instead." } diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 64b1c840f8b555..3e4b5d97ffa3b4 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-azure-devops +## 0.4.4 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-azure-devops-common@0.4.2 + - @backstage/catalog-model@1.4.5 + - @backstage/core-compat-api@0.2.4 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/frontend-plugin-api@0.6.4 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-permission-react@0.4.22 + ## 0.4.3 ### Patch Changes diff --git a/plugins/azure-devops/README.md b/plugins/azure-devops/README.md index 836590c29de927..a6bc07e9a81646 100644 --- a/plugins/azure-devops/README.md +++ b/plugins/azure-devops/README.md @@ -1,399 +1,3 @@ -# Azure DevOps Plugin +# Deprecated -Website: [https://dev.azure.com/](https://dev.azure.com/) - -## Features - -### Azure Pipelines - -Lists the top _n_ builds for a given Azure Repo where _n_ is a configurable value - -![Azure Pipelines Builds Example](./docs/azure-devops-builds.png) - -### Azure Repos - -Lists the top _n_ Active, Completed, or Abandoned Pull Requests for a given repository where _n_ is a configurable value - -![Azure Repos Pull Requests Example](./docs/azure-devops-pull-requests.png) - -### Azure Repos Git Tags - -Lists all Git Tags for a given repository - -![Azure Repos Git Tags Example](./docs/azure-devops-git-tags.png) - -### Azure Readme - -Readme for a given repository - -![Azure Readme Example](./docs/azure-devops-readme.png) - -## Setup - -The following sections will help you get the Azure DevOps plugin setup and running - -### Azure DevOps Backend - -You need to setup the [Azure DevOps backend plugin](https://github.com/backstage/backstage/tree/master/plugins/azure-devops-backend) before you move forward with any of these steps if you haven't already - -### Entity Annotation - -To be able to use the Azure DevOps plugin you need to add the following annotation to any entities you want to use it with: - -```yaml -dev.azure.com/project-repo: / -``` - -Let's break this down a little: `` will be the name of your Team Project and `` will be the name of your repository which needs to be part of the Team Project you entered for ``. - -Here's what that will look like in action: - -```yaml -# Example catalog-info.yaml entity definition file -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - dev.azure.com/project-repo: my-project/my-repo -spec: - type: service - # ... -``` - -#### Mono repos - -If you have multiple entities within a single repo, you will need to specify which pipelines belong to each entity, like this: - -```yaml -dev.azure.com/project-repo: / -dev.azure.com/build-definition: -``` - -Then to display the `README` file that belongs to each entity you would do this: - -```yaml -dev.azure.com/readme-path: //.md -``` - -#### Pipeline in different project to repo - -If your pipeline is in a different project to the source code, you will need to specify this in the project annotation. - -```yaml -dev.azure.com/project-repo: / -dev.azure.com/build-definition: -dev.azure.com/project: -``` - -#### Azure Pipelines Only - -If you are only using Azure Pipelines along with a different SCM tool then you can use the following two annotations to see Builds: - -```yaml -dev.azure.com/project: -dev.azure.com/build-definition: -``` - -In this case `` will be the name of your Team Project and `` will be the name of the Build Definition you would like to see Builds for, and it's possible to add more Builds separated by a comma. If the Build Definition name has spaces in it make sure to put quotes around it. - -#### Multiple Organizations - -If you have multiple organizations you'll need to also add this annotation: - -```yaml -dev.azure.com/host-org: / -``` - -For this annotation `` will match the `host` value in the `integrations.azure` section in your `app-config.yaml` and `` will be the name of the Organization that is part of the `host`. Let's break this down with an example: - -Say we have the following `integrations.azure` section: - -```yaml -integrations: - azure: - - host: dev.azure.com - credentials: - - organizations: - - my-org - - my-other-org - clientId: ${AZURE_CLIENT_ID} - clientSecret: ${AZURE_CLIENT_SECRET} - tenantId: ${AZURE_TENANT_ID} - - organizations: - - another-org - clientId: ${AZURE_CLIENT_ID} - - host: server.company.com - credentials: - - organizations: - - yet-another-org - personalAccessToken: ${PERSONAL_ACCESS_TOKEN} -``` - -If the entity we are viewing lives in the `my-other-org` organization then the `dev.azure.com/host-org` annotation would look like this: - -```yaml -dev.azure.com/host-org: dev.azure.com/my-other-org -``` - -And if the entity was from `yet-another-org` it would look like this: - -```yaml -dev.azure.com/host-org: server.company.com/yet-another-org -``` - -**Note:** To save you time, effort, and confusion setting up these annotations manually you can use the `AzureDevOpsAnnotatorProcessor` processor which will add the `dev.azure.com/host-org` and `dev.azure.com/project-repo` annotations for you with the correct values. The Azure DevOps backend plugin has details on how to [add this processor](https://github.com/backstage/backstage/tree/master/plugins/azure-devops-backend#processor). - -### Azure Pipelines Component - -To get the Azure Pipelines component working you'll need to do the following two steps: - -1. First we need to add the `@backstage/plugin-azure-devops` package to your frontend app: - - ```bash - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-azure-devops - ``` - -2. Second we need to add the `EntityAzurePipelinesContent` extension to the entity page in your app. How to do this will depend on which annotation you are using in your entities: - - 1. If you are using the `dev.azure.com/project-repo` annotation then you'll want to do the following: - - ```tsx - // In packages/app/src/components/catalog/EntityPage.tsx - import { - EntityAzurePipelinesContent, - isAzureDevOpsAvailable, - } from '@backstage/plugin-azure-devops'; - - // For example in the CI/CD section - const cicdContent = ( - - // ... - - - - // ... - - ``` - - 2. If you are using the `dev.azure.com/project` and `dev.azure.com/build-definition` annotations then you'll want to do this: - - ```tsx - // In packages/app/src/components/catalog/EntityPage.tsx - import { - EntityAzurePipelinesContent, - isAzurePipelinesAvailable, - } from '@backstage/plugin-azure-devops'; - - // For example in the CI/CD section - const cicdContent = ( - - // ... - - - - // ... - - ``` - -**Notes:** - -- The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation -- The `defaultLimit` property on the `EntityAzurePipelinesContent` will set the max number of Builds you would like to see, if not set this will default to 10 - -### Azure Repos Component - -To get the Azure Repos component working you'll need to do the following two steps: - -1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: - - ```bash - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-azure-devops - ``` - -2. Second we need to add the `EntityAzurePullRequestsContent` extension to the entity page in your app: - - ```tsx - // In packages/app/src/components/catalog/EntityPage.tsx - import { - EntityAzurePullRequestsContent, - isAzureDevOpsAvailable, - } from '@backstage/plugin-azure-devops'; - - // For example in the Service section - const serviceEntityPage = ( - - // ... - - - - // ... - - ``` - -**Notes:** - -- You'll need to add the `EntityLayout.Route` above from step 2 to all the entity sections you want to see Pull Requests in. For example if you wanted to see Pull Requests when looking at Website entities then you would need to add this to the `websiteEntityPage` section. -- The `if` prop is optional on the `EntityLayout.Route`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation -- The `defaultLimit` property on the `EntityAzurePullRequestsContent` will set the max number of Pull Requests you would like to see, if not set this will default to 10 - -### Git Tags Component - -To get the Git Tags component working you'll need to do the following two steps: - -1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: - - ```bash - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-azure-devops - ``` - -2. Second we need to add the `EntityAzureGitTagsContent` extension to the entity page in your app: - - ```tsx - // In packages/app/src/components/catalog/EntityPage.tsx - import { - EntityAzureGitTagsContent, - isAzureDevOpsAvailable, - } from '@backstage/plugin-azure-devops'; - - // For example in the Service section - const serviceEntityPage = ( - - // ... - - - - // ... - - ``` - -**Notes:** - -- You'll need to add the `EntityLayout.Route` above from step 2 to all the entity sections you want to see Git Tags in. For example if you wanted to see Git Tags when looking at Website entities then you would need to add this to the `websiteEntityPage` section. -- The `if` prop is optional on the `EntityLayout.Route`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation - -### Git README - -To get the README component working you'll need to do the following two steps: - -1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: - - ```bash - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-azure-devops - ``` - -2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: - - ```tsx - // In packages/app/src/components/catalog/EntityPage.tsx - import { - EntityAzureReadmeCard, - isAzureDevOpsAvailable, - } from '@backstage/plugin-azure-devops'; - - // As it is a card, you can customize it the way you prefer - // For example in the Service section - - const overviewContent = ( - - - - - ... - - - - - - - - ); - ``` - -**Notes:** - -- You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. -- The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation -- The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% - -## Permission Framework - -Azure DevOps plugin supports the permission framework for PRs, GitTags, Pipelines and Readme features. - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-azure-devops-common -``` - -New Backend you can skip the below and proceed with [permission configuration](#configure-permission) - -To enable permissions for the legacy backend system in `packages/backend/src/plugins/azure-devops.ts` add the following. - -```diff -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return createRouter({ - logger: env.logger, - config: env.config, - reader: env.reader, -+ permissions: env.permissions, - }); -} -``` - -### Configure Permission - -To apply the permission rules add the following in `packages/backend/src/plugins/permissions.ts`. - -> Note: the following is just an example of how you might want to setup permissions, as an Adopter you can configure this to fit your needs. Also all the permissions are Resource Permissions as they work with an Entity with the exception of `azureDevOpsPullRequestDashboardReadPermission`. - -```diff - -+ import { -+ azureDevOpsPullRequestReadPermission, -+ azureDevOpsPipelineReadPermission, -+ azureDevOpsGitTagReadPermission, -+ azureDevOpsReadmeReadPermission, -+ azureDevOpsPullRequestDashboardReadPermission } from '@backstage/plugin-azure-devops-common'; -+ import { -+ AuthorizeResult, -+ PolicyDecision, -+ isPermission, -+ } from '@backstage/plugin-permission-common'; -+ import { -+ catalogConditions, -+ createCatalogConditionalDecision, -+ } from '@backstage/plugin-catalog-backend/alpha'; -... -async handle( - request: PolicyQuery, - user?: BackstageIdentityResponse, -): Promise { -+ if ( isPermission(request.permission, azureDevOpsPullRequestReadPermission) || -+ isPermission(request.permission, azureDevOpsPipelineReadPermission) || -+ isPermission(request.permission, azureDevOpsGitTagReadPermission) || -+ isPermission(request.permission, azureDevOpsReadmeReadPermission)) { -+ return createCatalogConditionalDecision( -+ request.permission, -+ catalogConditions.isEntityOwner({ -+ claims: user?.identity.ownershipEntityRefs ?? [], -+ }), -+ ); -+ } - -+ if ( isPermission(request.permission, azureDevOpsPullRequestDashboardReadPermission) { -+ return { -+ result: AuthorizeResult.ALLOW, -+ }; -+ } - - return { - result: AuthorizeResult.ALLOW, - }; -} -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-azure-devops` instead. diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index 3a454ce094580e..ff9e9392d55cde 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.4.3", + "version": "0.4.4", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-azure-devops" }, "publishConfig": { "access": "public" @@ -73,5 +74,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-azure-devops instead." } diff --git a/plugins/azure-sites-backend/CHANGELOG.md b/plugins/azure-sites-backend/CHANGELOG.md index 12341c45016c25..2ad36ff7da1670 100644 --- a/plugins/azure-sites-backend/CHANGELOG.md +++ b/plugins/azure-sites-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-azure-sites-backend +## 0.3.5 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-azure-sites-common@0.1.4 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-client@1.6.4 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-node@1.11.1 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-node@0.7.28 + ## 0.3.4 ### Patch Changes diff --git a/plugins/azure-sites-backend/README.md b/plugins/azure-sites-backend/README.md index 18c51239c3a5f4..c88160dfbf8c9b 100644 --- a/plugins/azure-sites-backend/README.md +++ b/plugins/azure-sites-backend/README.md @@ -1,137 +1,3 @@ -# Azure Sites Backend +# Deprecated -Simple plugin that proxies requests to the Azure Portal API through Azure SDK JavaScript libraries. - -_Inspired by [roadie.io AWS Lambda plugin](https://roadie.io/backstage/plugins/aws-lambda/)_ - -## Setup - -The following sections will help you get the Azure Sites Backend plugin setup and running. - -### Configuration - -The Azure plugin requires the following YAML to be added to your app-config.yaml: - -```yaml -azureSites: - domain: - tenantId: - clientId: - clientSecret: - allowedSubscriptions: - - id: -``` - -Configuration Details: - -- `domain` can be found by visiting the [Directories + Subscriptions settings page](https://portal.azure.com/#settings/directory). Alternatively you can inspect the [Azure home](https://portal.azure.com/#home) URL - `https://portal.azure.com/#@/`. -- `tenantId` can be found by visiting [Azure Directory Overview page](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade). -- (Optional) `clientId` and `clientSecret` can be the same values you used for [Azure DevOps Backend](https://github.com/backstage/backstage/tree/master/plugins/azure-devops-backend) or [Azure Integration](https://backstage.io/docs/integrations/azure/org#app-registration) as long as this App Registration has permissions to read your function apps. -- (Optional) `allowedSubscriptions` is an array of `id` that will be used to iterate over and look for the specified functions' app. `id` can be found the [Subscriptions page](https://portal.azure.com/#view/Microsoft_Azure_Billing/SubscriptionsBlade). - -### Integrating - -Here's how to get the backend plugin up and running: - -#### Legacy Backend System - -1. First we need to add the `@backstage/plugin-azure-sites-backend` package to your backend: - - ```sh - # From the Backstage root directory - yarn --cwd packages/backend add @backstage/plugin-azure-sites-backend - ``` - -2. Then we will create a new file named `packages/backend/src/plugins/azure-sites.ts`, and add the following to it: - - ```ts - import { - createRouter, - AzureSitesApi, - } from '@backstage/plugin-azure-sites-backend'; - import { Router } from 'express'; - import { PluginEnvironment } from '../types'; - import { CatalogClient } from '@backstage/catalog-client'; - - export default async function createPlugin( - env: PluginEnvironment, - ): Promise { - const catalogApi = new CatalogClient({ discoveryApi: env.discovery }); - return await createRouter({ - logger: env.logger, - azureSitesApi: AzureSitesApi.fromConfig(env.config), - permissions: env.permissions, - catalogApi, - }); - } - ``` - -3. Next we wire this into the overall backend router, edit `packages/backend/src/index.ts`: - - ```ts - import azureSites from './plugins/azure-sites'; - - // Removed for clarity... - - async function main() { - // ... - // Add this line under the other lines that follow the useHotMemoize pattern - const azureSitesEnv = useHotMemoize(module, () => - createEnv('azure-sites'), - ); - - // ... - // Insert this line under the other lines that add their routers to apiRouter in the same way - apiRouter.use('/azure-sites', await azureSites(azureSitesEnv)); - } - ``` - -4. Enable permissions and that the below is just an example policy that forbids anyone but the owner of the catalog entity to trigger actions towards a site tied to an entity, edit your `packages/backend/src/plugins/permission.ts` - - ```diff - // packages/backend/src/plugins/permission.ts - + import { azureSitesActionPermission } from '@backstage/plugin-azure-sites-common'; - ... - class TestPermissionPolicy implements PermissionPolicy { - - async handle(): Promise { - + async handle(request: PolicyQuery, user?: BackstageIdentityResponse): Promise { - if (isPermission(request.permission, azureSitesActionPermission)) { - return createCatalogConditionalDecision( - request.permission, - catalogConditions.isEntityOwner({ - claims: user?.identity.ownershipEntityRefs ?? [], - }), - ); - } - ... - return { - result: AuthorizeResult.ALLOW, - }; - } - ``` - -#### New Backend System - -The Azure Sites backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import('@backstage/plugin-azure-sites-backend')); - - // ... - - backend.start(); -``` - -#### Start Backed & Test - -1. Now run `yarn start-backend` from the repo root. - -2. Finally, open `http://localhost:7007/api/azure/health` in a browser, it should return `{"status":"ok"}`. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-azure-sites-backend` instead. diff --git a/plugins/azure-sites-backend/package.json b/plugins/azure-sites-backend/package.json index ff1858791399d4..41b7879924993a 100644 --- a/plugins/azure-sites-backend/package.json +++ b/plugins/azure-sites-backend/package.json @@ -1,35 +1,39 @@ { "name": "@backstage/plugin-azure-sites-backend", - "version": "0.3.4", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "version": "0.3.5", + "backstage": { + "role": "backend-plugin", + "moved": "@backstage-community/plugin-azure-sites-backend" + }, "publishConfig": { "access": "public", "main": "dist/index.cjs.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "backend-plugin" - }, + "keywords": [ + "backstage", + "azure" + ], "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/azure-sites-backend" }, - "keywords": [ - "backstage", - "azure" + "license": "Apache-2.0", + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist" ], "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", + "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@azure/arm-appservice": "^14.0.0", @@ -53,7 +57,5 @@ "@backstage/cli": "workspace:^", "@types/supertest": "^2.0.8" }, - "files": [ - "dist" - ] + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-azure-sites-backend instead." } diff --git a/plugins/azure-sites-common/CHANGELOG.md b/plugins/azure-sites-common/CHANGELOG.md index 81e51f94652261..0c9edde81033a4 100644 --- a/plugins/azure-sites-common/CHANGELOG.md +++ b/plugins/azure-sites-common/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-azure-sites-common +## 0.1.4 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-permission-common@0.7.13 + ## 0.1.3 ### Patch Changes diff --git a/plugins/azure-sites-common/README.md b/plugins/azure-sites-common/README.md new file mode 100644 index 00000000000000..f219e21f5eec9d --- /dev/null +++ b/plugins/azure-sites-common/README.md @@ -0,0 +1,3 @@ +# Deprecated + +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-azure-sites-common` instead. diff --git a/plugins/azure-sites-common/package.json b/plugins/azure-sites-common/package.json index a5f5f16dbe733d..02bbee6526eb05 100644 --- a/plugins/azure-sites-common/package.json +++ b/plugins/azure-sites-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-azure-sites-common", - "version": "0.1.3", + "version": "0.1.4", "description": "Common functionalities for the azure plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-azure-sites-common" }, "publishConfig": { "access": "public", @@ -42,5 +43,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-azure-sites-common instead." } diff --git a/plugins/azure-sites/CHANGELOG.md b/plugins/azure-sites/CHANGELOG.md index 4d5dc87bb52bd7..361e9670e1c2f7 100644 --- a/plugins/azure-sites/CHANGELOG.md +++ b/plugins/azure-sites/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-azure-sites +## 0.1.24 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-azure-sites-common@0.1.4 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/theme@0.5.3 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-react@0.4.22 + ## 0.1.23 ### Patch Changes diff --git a/plugins/azure-sites/README.md b/plugins/azure-sites/README.md index 80f923a897bfa5..2a62384104eab4 100644 --- a/plugins/azure-sites/README.md +++ b/plugins/azure-sites/README.md @@ -1,73 +1,3 @@ -# Azure Sites Plugin +# Deprecated -Azure Sites (Apps & Functions) plugin support for a given entity. View the current status of the site, quickly jump to site's Overview page, or Log Stream page. - -![preview of Azure table](docs/functions-table.png) - -_Inspired by [roadie.io AWS Lamda plugin](https://roadie.io/backstage/plugins/aws-lambda/)_ - -## Features - -- Azure overview table - -## Plugin Setup - -The following sections will help you get the Azure plugin setup and running - -### Azure Sites Backend - -You need to set up the [Azure Sites Backend plugin](https://github.com/backstage/backstage/tree/master/plugins/azure-sites-backend) before you move forward with any of these steps if you haven't already. - -### Entity Annotation - -To be able to use the Azure Sites plugin you need to add the following annotation to any entities you want to use it with: - -```yaml -azure.com/microsoft-web-sites: -``` - -`` supports case-insensitive exact / partial value. - -Example of Partial Matching: - -Let's say you have a number of functions apps, spread out over different regions (and possibly different subscriptions), and they follow a naming convention: - -``` -func-testapp-eu -func-testapp-ca -func-testapp-us -``` - -The annotation you will use to have the three functions' app appear in the overview table would look like this: - -```yaml -azure.com/microsoft-web-sites: func-testapp -``` - -### Install the component - -1. Install the plugin - -```sh -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-azure-sites -``` - -2. Add widget component to your Backstage instance: - -```ts -// In packages/app/src/components/catalog/EntityPage.tsx -import { EntityAzureSitesOverviewWidget, isAzureWebSiteNameAvailable } from '@backstage/plugin-azure-sites'; - -... - -const serviceEntityPage = ( - - //... - Boolean(isAzureWebSiteNameAvailable(e))} path="/azure" title="Azure"> - - - //... - -); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-azure-sites` instead. diff --git a/plugins/azure-sites/package.json b/plugins/azure-sites/package.json index d39e7ea9756f18..ee11f7cf8bf846 100644 --- a/plugins/azure-sites/package.json +++ b/plugins/azure-sites/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-azure-sites", - "version": "0.1.23", + "version": "0.1.24", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-azure-sites" }, "publishConfig": { "access": "public", @@ -64,5 +65,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-azure-sites instead." } diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index d40bd67c106222..94727ea7c9fdc2 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-badges-backend +## 0.4.1 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/plugin-auth-node@0.4.12 + ## 0.4.0 ### Minor Changes diff --git a/plugins/badges-backend/README.md b/plugins/badges-backend/README.md index 4e35b30c13e4fb..15be73153eb98c 100644 --- a/plugins/badges-backend/README.md +++ b/plugins/badges-backend/README.md @@ -1,186 +1,3 @@ -# Badges Backend +# Deprecated -Backend plugin for serving badges to the `@backstage/plugin-badges` plugin. -Default implementation uses -[badge-maker](https://www.npmjs.com/package/badge-maker) for creating the -badges, in SVG. - -Currently, only entity badges are implemented. i.e. badges that may have entity -specific information in them, and as such, are served from an entity specific -endpoint. - -## Installation - -Install the `@backstage/plugin-badges-backend` package in your backend package: - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-badges-backend -``` - -Add the plugin using the following default setup for -`src/plugins/badges.ts`: - -```ts -import { - createRouter, - createDefaultBadgeFactories, -} from '@backstage/plugin-badges-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - config: env.config, - discovery: env.discovery, - badgeFactories: createDefaultBadgeFactories(), - tokenManager: env.tokenManager, - logger: env.logger, - identity: env.identity, - }); -} -``` - -The `createDefaultBadgeFactories()` returns an object with badge factories to -the badges-backend `createRouter()` to forward to the default badge builder. To -customize the available badges, provide a custom set of badge factories. See -further down for an example of a custom badge factories function. - -Finally, you have to make the following changes in `src/index.ts`: - -```ts -// 1. import the plugin -import badges from './plugins/badges'; - -... - -const config = await loadBackendConfig({ - argv: process.argv, - logger: rootLogger, -}); -const createEnv = makeCreateEnv(config); - - ... - // 2. Create a PluginEnvironment for the Badges plugin - const badgesEnv = useHotMemoize(module, () => createEnv('badges')); - - ... - - const apiRouter = Router(); - ... - // 3. Register the badges plugin in the router - apiRouter.use('/badges', await badges(badgesEnv)); - ... - apiRouter.use(notFoundHandler()); -``` - -### New Backend System - -The Badges backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import('@backstage/plugin-badges-backend')); - - backend.start(); -``` - -## Badge builder - -Badges are created by classes implementing the `BadgeBuilder` type. The default -badge builder uses badge factories to turn a `BadgeContext` into a `Badge` spec -for the `badge-maker` to create the SVG image. - -### Default badges - -A set of default badge factories are defined in -[badges.ts](https://github.com/backstage/backstage/tree/master/plugins/badges-backend/src/badges.ts) -as examples. - -Additional badges may be provided in your application by defining custom badge -factories, and provide them to the badge builder. - -### Custom badges - -To provide custom badges, create a badge factories function, and use that when -creating the badges backend router. - -```ts -import type { Badge, BadgeContext, BadgeFactories } from '@backstage/plugin-badges-backend'; -export const createMyCustomBadgeFactories = (): BadgeFactories => ({ - : { - createBadge: (context: BadgeContext): Badge | null => { - // ... - return { - label: 'my-badge', - message: 'custom stuff', - // ... - }; - }, - }, - - // optional: include the default badges - // ...createDefaultBadgeFactories(), -}); -``` - -### Badge obfuscation - -When you enable the obfuscation feature, the badges backend will obfuscate the entity names in the badge link. It's useful when you want your badges to be visible to the public, but you don't want to expose the entity names and also to protect your entity names from being enumerated. - -To enable the obfuscation you need to activate the `obfuscation` feature in the `app-config.yaml`: - -```yaml -app: - badges: - obfuscate: true -``` - -:warning: **Warning**: The only endpoint to be publicly available is the `/entity/:entityUuid/:badgeId` endpoint. The other endpoints are meant for trusted internal users and should not be publicly exposed. - -> Note that you cannot use env vars to set the `obfuscate` value. It must be a boolean value and env vars are always strings. - -## API - -The badges backend api exposes two main endpoints for entity badges. The -`/badges` prefix is arbitrary, and the default for the example backend. - -### If obfuscation is disabled (default or apps.badges.obfuscate: false) - -- `/badges/entity/:namespace/:kind/:name/badge-specs` List all defined badges - for a particular entity, in json format. See - [BadgeSpec](https://github.com/backstage/backstage/tree/master/plugins/badges/src/api/types.ts) - from the frontend plugin for a type declaration. - -- `/badges/entity/:namespace/:kind/:name/badge/:badgeId` Get the entity badge as - an SVG image. If the `accept` request header prefers `application/json` the - badge spec as JSON will be returned instead of the image. - -### If obfuscation is enabled (apps.badges.obfuscate: true) - -- `/badges/entity/:namespace/:kind/:name/obfuscated` Get the obfuscated `entity url`. - -> Note that endpoint have a embedded authMiddleware to authenticate the user requesting this endpoint. _It meant to be called from the frontend plugin._ - -- `/badges/entity/:entityUuid/:badgeId` Get the entity badge as an SVG image. If - the `accept` request header prefers `application/json` the badge spec as JSON - will be returned instead of the image. - -- `/badge/entity/:entityUuid/badge-specs` List all defined badges for a - particular entity, in json format. See - [BadgeSpec](https://github.com/backstage/backstage/tree/master/plugins/badges/src/api/types.ts) - from the frontend plugin for a type declaration. - -## Links - -- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/badges) -- [The Backstage homepage](https://backstage.io) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-badges-backend` instead. diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index 5bd6c72d1c2a36..07cfca29a94bea 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-badges-backend", - "version": "0.4.0", + "version": "0.4.1", "description": "A Backstage backend plugin that generates README badges for your entities", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-badges-backend" }, "publishConfig": { "access": "public", @@ -60,5 +61,6 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/catalog-client": "workspace:^", "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-badges-backend instead." } diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index 00a2698e0cfe47..3f5f832a2af7b0 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-badges +## 0.2.59 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.58 ### Patch Changes diff --git a/plugins/badges/README.md b/plugins/badges/README.md index 202b26762d6724..466c0b61e08cbb 100644 --- a/plugins/badges/README.md +++ b/plugins/badges/README.md @@ -1,204 +1,3 @@ -# @backstage/plugin-badges +# Deprecated -The badges plugin offers a set of badges that can be used outside of -your backstage deployment, showing information related to data from -the catalog, such as entity owner and lifecycle data for instance. - -The available badges are setup in the `badges-backend` plugin, see -link below for more details. - -## Entity badges - -To get markdown code for the entity badges, access the `Badges` context menu -(three dots in the upper right corner) of an entity page like this: - -![Badges Context Menu](./doc/badges-context-menu.png) - -This will popup a badges dialog showing all available badges for that entity like this: - -![Badges Dialog](./doc/badges-dialog.png) - -##  Badge obfuscation - -The badges plugin supports obfuscating the badge URL to prevent it from being enumerated if the badges are used in a public context (like in Github repositories). - -To enable obfuscation, set the `obfuscate` option to `true` in the `app.badges` section of your `app-config.yaml`: - -```yaml -app: - badges: - obfuscate: true -``` - -Please note that if you have already set badges in your repositories and you activate the obfuscation you will need to update the badges in your repositories to use the new obfuscated URLs. - -Please note that the backend part needs to be configured to support obfuscation. See the [backend plugin documentation](../badges-backend/README.md) for more details. - -Also, you need to allow your frontend to access the configuration see : - -Example implementation would be in : `packages/app/src/config.d.ts` - -```typescript -export interface Config { - app: { - ... some code - badges: { - /** - * badges obfuscate - * @visibility frontend - */ - obfuscate?: string; - }; - }; -} -``` - -then include in the `packages/app/package.json` : - -```json -"files": [ - "dist", - "config.d.ts" - ], -"configSchema": "config.d.ts", -``` - -## Sample Badges - -Here are some samples of badges for the `artists-lookup` service in the Demo Backstage site: - -- Component: [![Link to artist-lookup in Backstage Demo, Component: artist-lookup](https://demo.backstage.io/api/badges/entity/default/component/artist-lookup/badge/pingback 'Link to artist-lookup in Backstage Demo')](https://demo.backstage.io/catalog/default/component/artist-lookup) -- Lifecycle: [![Entity lifecycle badge, lifecycle: experimental](https://demo.backstage.io/api/badges/entity/default/component/artist-lookup/badge/lifecycle 'Entity lifecycle badge')](https://demo.backstage.io/catalog/default/component/artist-lookup) -- Owner: [![Entity owner badge, owner: team-a](https://demo.backstage.io/api/badges/entity/default/component/artist-lookup/badge/owner 'Entity owner badge')](https://demo.backstage.io/catalog/default/component/artist-lookup) -- Docs: [![Entity docs badge, docs: artist-lookup](https://demo.backstage.io/api/badges/entity/default/component/artist-lookup/badge/docs 'Entity docs badge')](https://demo.backstage.io/catalog/default/component/artist-lookup/docs) - -## Usage - -### Install the package - -Install the `@backstage/plugin-badges` package in your frontend app package: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-badges -``` - -### Register plugin - -This plugin requires explicit registration, so you will need to add it to your App's `plugins.ts` file: - -```ts -import { badgesPlugin } from '@backstage/plugin-badges'; -``` - -If you don't have a `plugins.ts` file see: [troubleshooting](#troubleshooting) - -### Update your EntityPage - -In your `EntityPage.tsx` file located in `packages\app\src\components\catalog` we'll need to make a few changes to get the Badges context menu added to the UI. - -First we need to add the following imports: - -```ts -import { EntityBadgesDialog } from '@backstage/plugin-badges'; -import BadgeIcon from '@material-ui/icons/CallToAction'; -``` - -Next we'll update the React import that looks like this: - -```ts -import React from 'react'; -``` - -To look like this: - -```ts -import React, { ReactNode, useMemo, useState } from 'react'; -``` - -Then we have to add this chunk of code after all the imports but before any of the other code: - -```ts -const EntityLayoutWrapper = (props: { children?: ReactNode }) => { - const [badgesDialogOpen, setBadgesDialogOpen] = useState(false); - - const extraMenuItems = useMemo(() => { - return [ - { - title: 'Badges', - Icon: BadgeIcon, - onClick: () => setBadgesDialogOpen(true), - }, - ]; - }, []); - - return ( - <> - - {props.children} - - setBadgesDialogOpen(false)} - /> - - ); -}; -``` - -The last step is to wrap all the entity pages in the `EntityLayoutWrapper` like this: - -```diff -const defaultEntityPage = ( -+ - - {overviewContent} - - - - - - - - - -+ -); -``` - -Note: the above only shows an example for the `defaultEntityPage` for a full example of this you can look at [this EntityPage](https://github.com/backstage/backstage/blob/1fd9e6f601cabe42af8eb20b5d200ad1988ba309/packages/app/src/components/catalog/EntityPage.tsx#L318) - -## Troubleshooting - -If you don't have a `plugins.ts` file, you can create it with the path `packages/app/src/plugins.ts` and then import it into your `App.tsx`: - -```diff -+ import * as plugins from './plugins'; - -const app = createApp({ - apis, -+ plugins: Object.values(plugins), - bindRoutes({ bind }) { - /* ... */ - }, -}); -``` - -Or simply edit `App.tsx` with: - -```diff -+ import { badgesPlugin } from '@backstage/plugin-badges' - -const app = createApp({ - apis, -+ plugins: [badgesPlugin], - bindRoutes({ bind }) { - /* ... */ - }, -}); -``` - -## Links - -- [Backend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/badges-backend) -- [The Backstage homepage](https://backstage.io) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-badges` instead. diff --git a/plugins/badges/package.json b/plugins/badges/package.json index ef2e0e17e02bee..42fe98297ae5f0 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-badges", - "version": "0.2.58", + "version": "0.2.59", "description": "A Backstage plugin that generates README badges for your entities", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-badges" }, "publishConfig": { "access": "public", @@ -52,5 +53,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-badges instead." } diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index 2d6cb4c3377f4a..7dc5986dbaef53 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-bazaar-backend +## 0.3.16 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + - @backstage/plugin-auth-node@0.4.12 + ## 0.3.15 ### Patch Changes diff --git a/plugins/bazaar-backend/README.md b/plugins/bazaar-backend/README.md index eec1574b7abe03..c01593063099db 100644 --- a/plugins/bazaar-backend/README.md +++ b/plugins/bazaar-backend/README.md @@ -1,52 +1,3 @@ -# Bazaar Backend +# Deprecated -Welcome to the Bazaar backend plugin! - -# Installation - -## Install the package - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-bazaar-backend -``` - -## Adding the plugin to your `packages/backend` - -You'll need to add the plugin to the router in your `backend` package. You can do this by creating a file called `packages/backend/src/plugins/bazaar.ts` - -```typescript -import { PluginEnvironment } from '../types'; -import { createRouter } from '@backstage/plugin-bazaar-backend'; -import { Router } from 'express'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - logger: env.logger, - config: env.config, - database: env.database, - identity: env.identity, - }); -} -``` - -With the `bazaar.ts` router setup in place, add the router to `packages/backend/src/index.ts`: - -```diff -+ import bazaar from './plugins/bazaar'; - -async function main() { - ... - const createEnv = makeCreateEnv(config); - - const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); -+ const bazaarEnv = useHotMemoize(module, () => createEnv('bazaar')); - - const apiRouter = Router(); -+ apiRouter.use('/bazaar', await bazaar(bazaarEnv)); - ... - apiRouter.use(notFoundHandler()); - -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-bazaar-backend` instead. diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 2e908cfb7d99cc..b423c631d7354e 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.3.15", + "version": "0.3.16", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-bazaar-backend" }, "publishConfig": { "access": "public" @@ -59,5 +60,6 @@ "devDependencies": { "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-bazaar-backend instead." } diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index 4f0df69f211dc0..d17e7485fe6b1f 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-bazaar +## 0.2.27 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.26 ### Patch Changes diff --git a/plugins/bazaar/README.md b/plugins/bazaar/README.md index c340baec3eaedb..1de5f730706147 100644 --- a/plugins/bazaar/README.md +++ b/plugins/bazaar/README.md @@ -1,155 +1,3 @@ -# @backstage/plugin-bazaar +# Deprecated -### What is the Bazaar? - -The Bazaar is a place where teams can propose projects for cross-functional team development. Essentially, it’s a marketplace for internal projects suitable for [Inner Sourcing](https://en.wikipedia.org/wiki/Inner_source). By “Inner Sourcing,” we mean projects that are developed internally within a company but follow Open Source best practices. - -### Why? - -Many companies today have a high need to increase the ease of cross-team cooperation. In large organizations, engineers often have limited ways of discovering or announcing projects that could benefit from a wider development effort in terms of different expertise, experiences, and teams spread across the organization. With no good way to find these existing internal projects to join, the possibility of working with Inner Sourcing practices suffers. - -### How? - -The Bazaar allows engineers and teams to open up and announce their new and exciting projects for transparent cooperation in other parts of larger organizations. The Bazaar ensures that new Inner Sourcing-friendly projects gain visibility through Backstage and a way for interested engineers to show their interest and, in the future, contribute with their specific skill set. The Bazaar also provides an easy way to manage, catalog, and browse these Inner Sourcing-friendly projects and components. - -# Note - -You will **need** to also perform the installation instructions in [Bazaar Backend](https://github.com/backstage/backstage/tree/master/plugins/bazaar-backend) in order for this plugin to work. - -## Getting Started - -First install the plugin into your app: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-bazaar -``` - -Modify your app routes in `packages/app/src/App.tsx` to include the `Bazaar` component exported from the plugin, for example: - -```diff -+ import { BazaarPage } from '@backstage/plugin-bazaar'; - -const routes = ( - - - ... -+ } /> - {/* other routes... */} - -``` - -`BazaarPage` can be given the optional properties `fullHeight` and `fullWidth` which are used to adjust the cards styling to fit more or less on the page as required (both default to `true`). - -Add a **Bazaar icon** to the Sidebar to easily access the Bazaar. In `packages/app/src/components/Root.tsx` add: - -```diff -+ import StorefrontIcon from '@material-ui/icons/Storefront'; - - - -+ - {/* ...other sidebar-items */} -``` - -Add a **Bazaar card** to the overview tab on the `packages/app/src/components/catalog/EntityPage.tsx` add: - -```diff -+ import { EntityBazaarInfoCard, isBazaarAvailable } from '@backstage/plugin-bazaar'; - -const overviewContent = ( - - - - -+ -+ -+ -+ -+ -+ -+ - - {/* ...other entity-cards */} -``` - -Add a **Bazaar overview card** to the homepage that displays either the latest projects or random projects. In `packages/app/src/components/home/HomePage.tsx` add: - -```diff -+ import { BazaarOverviewCard } from '@backstage/plugin-bazaar'; - -export const homePage = ( - - - - - -+ -+ -+ - -+ -+ -+ - - {/* ...other homepage items */} -``` - -The property `title` is optional and can be used to customize the title in the card header. If no title is submitted the default titles `Bazaar Random Projects` or `Bazaar Latest Projects` are displayed. - -The properties `fullHeight` and `fullWidth` are also optional and can be used to adjust the cards styling. - -# How does the Bazaar work? - -### Layout - -The latest modified Bazaar projects are displayed in the Bazaar landing page, located at the Bazaar icon in the sidebar. Each project is represented as a card containing its most relevant data to give an overview of the project. It is also possible to sort in alphabetical order or on the number of members. Here you can also search or add project to the Bazaar. - -![home](media/layout.png) - -The "BazaarOverviewCard" can be displayed in Backstage homepage. - -![home](media/overviewCard.png) - -### Workflow - -To add a project to the bazaar, simply click on the `add-project` button and fill in the form. - -The following fields are mandatory: - -- title - title of the project -- description - present your idea and what skills you are looking for -- status - whether or not the project has started -- size - small, medium or large -- responsible - main contact person of the project - -The other fields are: - -- project - link Bazaar project to existing entity in the catalog -- community link - link to where the project members can communicate, e.g. Teams or Discord link -- docs link - link to visit the documentation of the project -- start date -- end date - -When clicking on a Bazaar project a card containing the Bazaar information will show up. If the Bazaar project is linked to an entity, the card is also visible on that entity's EntityPage. From that card it is possible to either link or unlink an entity to a project, edit or delete the project and join the project if it seems interesting to you. Once you have joined a project, you will get access to the community link if it exists. - -![home](media/demo.gif) - -## Future work and ideas - -- Workflow - - - Make it possible for multiple Bazaar project to link to the same catalog entity - -- Bazaar landing page - - - Add a tab 'My page', where your personal data is displayed. For example: your projects and its latest activities etc. - -- Bazaar tab on the EntityPage - - - Fill Bazaar-tab with more content, for example images and achievements - - Show all the members that have joined the project - -- Dialogues - - - Extend the dialogue for adding a project with more fields, e.g. the possibility to add images +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-bazaar` instead. diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 860c08bd22c92b..dc16d26dcb9fdb 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.2.26", + "version": "0.2.27", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-bazaar" }, "publishConfig": { "access": "public", @@ -59,5 +60,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-bazaar instead." } diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index 5a2dbf58fa7c5d..678b0b3c08fb36 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-bitrise +## 0.1.62 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.61 ### Patch Changes diff --git a/plugins/bitrise/README.md b/plugins/bitrise/README.md index 80c3dadac9dc66..356339e116b2de 100644 --- a/plugins/bitrise/README.md +++ b/plugins/bitrise/README.md @@ -1,53 +1,3 @@ -# Bitrise +# Deprecated -Welcome to the Bitrise plugin! - -- View recent Bitrise Builds for a Bitrise application -- Download build artifacts - -## Installation - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-bitrise -``` - -Bitrise Plugin exposes an entity tab component named `EntityBitriseContent`. You can include it in the -[`EntityPage.tsx`](https://github.com/backstage/backstage/blob/master/packages/app/src/components/catalog/EntityPage.tsx)`: - -```tsx -// At the top imports -import { EntityBitriseContent } from '@backstage/plugin-bitrise'; - -// Farther down at the website declaration -const websiteEntityPage = ( - - {/* Place the following section where you want the tab to appear */} - - - -``` - -Your plugin should now appear as a tab at the top of entity pages, particularly for `website` component types. -However, it alerts you to a missing `bitrise.io/app` annotation. - -Add the annotation to your component [catalog-info.yaml](https://github.com/backstage/backstage/blob/master/catalog-info.yaml) as shown in the highlighted example below: - -```yaml -metadata: - annotations: - bitrise.io/app: '' -``` - -The plugin requires to configure a Bitrise API proxy with a `BITRISE_AUTH_TOKEN` for authentication in the [app-config.yaml](https://github.com/backstage/backstage/blob/master/app-config.yaml): - -```yaml -proxy: - '/bitrise': - target: 'https://api.bitrise.io/v0.1' - allowedMethods: ['GET'] - headers: - Authorization: ${BITRISE_AUTH_TOKEN} -``` - -Learn how to generate a new Bitrise token at https://devcenter.bitrise.io/api/authentication. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-bitrise` instead. diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 57958bb45cd18f..0620d9ddaf32f2 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-bitrise", - "version": "0.1.61", + "version": "0.1.62", "description": "A Backstage plugin that integrates towards Bitrise", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-bitrise" }, "publishConfig": { "access": "public", @@ -63,5 +64,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-bitrise instead." } diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 928881f5b41a43..c382b589fb585a 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -68,6 +68,7 @@ "@backstage/plugin-permission-node": "workspace:^", "@backstage/plugin-search-backend-module-catalog": "workspace:^", "@backstage/types": "workspace:^", + "@janus-idp/backstage-plugin-audit-log-node": "^1.1.0", "@opentelemetry/api": "^1.3.0", "@types/express": "^4.17.6", "codeowners-utils": "^1.0.2", diff --git a/plugins/catalog-backend/src/service/createRouter.test.ts b/plugins/catalog-backend/src/service/createRouter.test.ts index 292c4c1b7af717..bb475c23eebc00 100644 --- a/plugins/catalog-backend/src/service/createRouter.test.ts +++ b/plugins/catalog-backend/src/service/createRouter.test.ts @@ -44,6 +44,26 @@ import { Server } from 'http'; import { mockCredentials, mockServices } from '@backstage/backend-test-utils'; import { LocationAnalyzer } from '../ingestion'; +const localhostNames = ['localhost', '127.0.0.1', '::1', '::ffff:127.0.0.1']; +const localhostIps = ['127.0.0.1', '::1', '::ffff:127.0.0.1']; + +const commonAuditLogMeta = { + actor: { + ip: expect.stringMatching(new RegExp(localhostIps.join('|'))), + actorId: 'user:default/mock', + hostname: expect.stringMatching(new RegExp(localhostNames.join('|'))), + }, + request: { + body: {}, + method: 'GET', + params: {}, + query: {}, + }, + isAuditLog: true, + meta: {}, + status: 'succeeded', +}; + describe('createRouter readonly disabled', () => { let entitiesCatalog: jest.Mocked; let locationService: jest.Mocked; @@ -51,6 +71,9 @@ describe('createRouter readonly disabled', () => { let app: express.Express | Server; let refreshService: RefreshService; let locationAnalyzer: jest.Mocked; + const logger = getVoidLogger(); + let loggerSpy: jest.SpyInstance; + let loggerErrorSpy: jest.SpyInstance; beforeAll(async () => { entitiesCatalog = { @@ -74,11 +97,12 @@ describe('createRouter readonly disabled', () => { }; refreshService = { refresh: jest.fn() }; orchestrator = { process: jest.fn() }; + const router = await createRouter({ entitiesCatalog, locationService, orchestrator, - logger: getVoidLogger(), + logger, refreshService, config: new ConfigReader(undefined), permissionIntegrationRouter: express.Router(), @@ -90,6 +114,11 @@ describe('createRouter readonly disabled', () => { }); beforeEach(() => { + loggerSpy = jest.spyOn(logger, 'info'); + loggerErrorSpy = jest.spyOn(logger, 'error'); + }); + + afterEach(() => { jest.resetAllMocks(); }); @@ -104,21 +133,82 @@ describe('createRouter readonly disabled', () => { entityRef: 'Component/default:foo', credentials: mockCredentials.user(), }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityRefresh', + request: { + ...commonAuditLogMeta.request, + body: { entityRef: 'Component/default:foo' }, + url: '/refresh', + method: 'POST', + }, + meta: { + entityRef: 'Component/default:foo', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Refresh attempt for Component/default:foo initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Refresh attempt for Component/default:foo triggered by user:default/mock`, + auditLogCompletionMeta, + ); }); it('should support passing the token in the request body for backwards compatibility', async () => { + const requestBody = { + entityRef: 'Component/default:foo', + authorizationToken: mockCredentials.user.token('user:default/other'), + }; const response = await request(app) .post('/refresh') .set('Content-Type', 'application/json') - .send({ - entityRef: 'Component/default:foo', - authorizationToken: mockCredentials.user.token('user:default/other'), - }); + .send(requestBody); expect(response.status).toBe(200); expect(refreshService.refresh).toHaveBeenCalledWith({ entityRef: 'Component/default:foo', credentials: mockCredentials.user('user:default/other'), }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityRefresh', + request: { + ...commonAuditLogMeta.request, + body: requestBody, + url: '/refresh', + method: 'POST', + }, + meta: { + entityRef: 'Component/default:foo', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Refresh attempt for Component/default:foo initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Refresh attempt for Component/default:foo triggered by user:default/mock`, + auditLogCompletionMeta, + ); }); }); @@ -137,6 +227,31 @@ describe('createRouter readonly disabled', () => { expect(response.status).toEqual(200); expect(response.body).toEqual(entities); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: '/entities', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('parses single and multiple request parameters and passes them down', async () => { @@ -164,6 +279,34 @@ describe('createRouter readonly disabled', () => { }, credentials: mockCredentials.user(), }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: '/entities?filter=a=1,a=2,b=3&filter=c=4', + query: { + filter: ['a=1,a=2,b=3', 'c=4'], + }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -188,6 +331,37 @@ describe('createRouter readonly disabled', () => { nextCursor: expect.any(String), }, }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'QueriedCatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: '/entities/by-query', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + meta: { + totalEntities: 100, + pageInfo: { + nextCursor: expect.any(String), + }, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Queried entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Queried entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('parses initial request', async () => { @@ -224,6 +398,39 @@ describe('createRouter readonly disabled', () => { }, credentials: mockCredentials.user(), }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'QueriedCatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: '/entities/by-query?filter=a=1,a=2,b=3&filter=c=4&orderField=metadata.name,asc&orderField=metadata.uid,desc', + query: { + filter: ['a=1,a=2,b=3', 'c=4'], + orderField: ['metadata.name,asc', 'metadata.uid,desc'], + }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + meta: { + pageInfo: {}, + totalEntities: 0, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Queried entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Queried entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('parses encoded params request', async () => { @@ -264,6 +471,43 @@ describe('createRouter readonly disabled', () => { }, credentials: mockCredentials.user(), }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'QueriedCatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-query?filter=${encodeURIComponent( + 'a=1,a=2,b=3', + )}&filter=c=4&orderField=${encodeURIComponent( + 'metadata.name,asc', + )}&orderField=metadata.uid,desc`, + query: { + filter: ['a=1,a=2,b=3', 'c=4'], + orderField: ['metadata.name,asc', 'metadata.uid,desc'], + }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + meta: { + pageInfo: {}, + totalEntities: 0, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Queried entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Queried entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('parses cursor request', async () => { @@ -293,6 +537,40 @@ describe('createRouter readonly disabled', () => { totalItems: 100, pageInfo: { nextCursor: expect.any(String) }, }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'QueriedCatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-query?cursor=${encodeCursor(cursor)}`, + query: { + cursor: `${encodeCursor(cursor)}`, + }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + meta: { + totalEntities: 100, + pageInfo: { + nextCursor: expect.any(String), + }, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Queried entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Queried entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('parses cursor request with fullTextFilter', async () => { @@ -335,6 +613,40 @@ describe('createRouter readonly disabled', () => { term: 'mySearch', }, }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'QueriedCatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-query?cursor=${encodeCursor(cursor)}`, + query: { + cursor: `${encodeCursor(cursor)}`, + }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + meta: { + totalEntities: 100, + pageInfo: { + nextCursor: expect.any(String), + }, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Queried entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Queried entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('should throw in case of malformed cursor', async () => { @@ -348,21 +660,95 @@ describe('createRouter readonly disabled', () => { pageInfo: { nextCursor: mockCursor() }, }); + const encodedBadCursor = `${Buffer.from( + JSON.stringify({ bad: 'cursor' }), + 'utf8', + ).toString('base64')}`; + let response = await request(app).get( - `/entities/by-query?cursor=${Buffer.from( - JSON.stringify({ bad: 'cursor' }), - 'utf8', - ).toString('base64')}`, + `/entities/by-query?cursor=${encodedBadCursor}`, ); expect(response.status).toEqual(400); expect(response.body.error.message).toMatch(/Malformed cursor/); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'QueriedCatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-query?cursor=${encodedBadCursor}`, + query: { + cursor: `${encodedBadCursor}`, + }, + }, + stage: 'initiation', + }; + const auditLogErrorMeta = { + ...auditLogInitMeta, + stage: 'completion', + status: 'failed', + errors: [ + { + name: 'InputError', + message: expect.stringContaining('Malformed cursor'), + stack: expect.any(String), + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Queried entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Queried entity fetch attempt by user:default/mock failed`, + auditLogErrorMeta, + ); + response = await request(app).get(`/entities/by-query?cursor=badcursor`); expect(response.status).toEqual(400); expect(response.body.error.message).toMatch(/Malformed cursor/); + const auditLogInitMeta2 = { + ...auditLogInitMeta, + request: { + ...auditLogInitMeta.request, + url: `/entities/by-query?cursor=badcursor`, + query: { + cursor: `badcursor`, + }, + }, + }; + const auditLogErrorMeta2 = { + ...auditLogInitMeta2, + stage: 'completion', + status: 'failed', + errors: [ + { + name: 'InputError', + message: expect.stringContaining('Malformed cursor'), + stack: expect.any(String), + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerErrorSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Queried entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta2, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 2, + `Queried entity fetch attempt by user:default/mock failed`, + auditLogErrorMeta2, + ); }); it('should throw in case of invalid limit', async () => { + // TODO(frkong): this error is thrown by the openapi-router so it does not hit the audit logging code for the endpoint const items: Entity[] = [ { apiVersion: 'a', kind: 'b', metadata: { name: 'n' } }, ]; @@ -404,6 +790,41 @@ describe('createRouter readonly disabled', () => { }); expect(response.status).toEqual(200); expect(response.body).toEqual(expect.objectContaining(entity)); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityFetchByUid', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-uid/zzz`, + params: { + uid: 'zzz', + }, + }, + meta: { + uid: 'zzz', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + meta: { + uid: 'zzz', + entityRef: 'b:default/c', + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for entity with uid zzz initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt for entity with uid zzz by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('responds with a 404 for missing entities', async () => { @@ -421,6 +842,48 @@ describe('createRouter readonly disabled', () => { }); expect(response.status).toEqual(404); expect(response.text).toMatch(/uid/); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityFetchByUid', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-uid/zzz`, + params: { + uid: 'zzz', + }, + }, + meta: { + uid: 'zzz', + }, + stage: 'initiation', + }; + const auditLogFailureMeta = { + ...auditLogInitMeta, + stage: 'completion', + status: 'failed', + errors: [ + { + name: 'NotFoundError', + message: 'No entity with uid zzz', + stack: expect.any(String), + }, + ], + meta: { + uid: 'zzz', + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for entity with uid zzz initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for entity with uid zzz by user:default/mock failed`, + auditLogFailureMeta, + ); }); }); @@ -452,6 +915,39 @@ describe('createRouter readonly disabled', () => { }); expect(response.status).toEqual(200); expect(response.body).toEqual(expect.objectContaining(entity)); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityFetchByName', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-name/k/ns/n`, + params: { + kind: 'k', + namespace: 'ns', + name: 'n', + }, + }, + meta: { + entityRef: 'k:ns/n', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for entity with entityRef k:ns/n initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt for entity with entityRef k:ns/n by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('responds with a 404 for missing entities', async () => { @@ -473,32 +969,163 @@ describe('createRouter readonly disabled', () => { }); expect(response.status).toEqual(404); expect(response.text).toMatch(/name/); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityFetchByName', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-name/b/d/c`, + params: { + kind: 'b', + namespace: 'd', + name: 'c', + }, + }, + meta: { + entityRef: 'b:d/c', + }, + stage: 'initiation', + }; + const auditLogFailureMeta = { + ...auditLogInitMeta, + stage: 'completion', + status: 'failed', + errors: [ + { + name: 'NotFoundError', + message: + "No entity named 'c' found, with kind 'b' in namespace 'd'", + stack: expect.any(String), + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for entity with entityRef b:d/c initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for entity with entityRef b:d/c by user:default/mock failed`, + auditLogFailureMeta, + ); }); }); describe('DELETE /entities/by-uid/:uid', () => { it('can remove', async () => { entitiesCatalog.removeEntityByUid.mockResolvedValue(undefined); - + entitiesCatalog.entities.mockResolvedValue({ + entities: [ + { + apiVersion: 'v1', + kind: 'k', + metadata: { + name: 'n', + namespace: 'ns', + }, + }, + ], + pageInfo: { hasNextPage: false }, + }); const response = await request(app).delete('/entities/by-uid/apa'); expect(entitiesCatalog.removeEntityByUid).toHaveBeenCalledTimes(1); expect(entitiesCatalog.removeEntityByUid).toHaveBeenCalledWith('apa', { credentials: mockCredentials.user(), }); expect(response.status).toEqual(204); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityDeletion', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-uid/apa`, + method: 'DELETE', + params: { + uid: 'apa', + }, + }, + meta: { + uid: 'apa', + entityRef: 'k:ns/n', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 204 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Deletion attempt for entity with uid apa initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Deletion attempt for entity with uid apa by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('responds with a 404 for missing entities', async () => { entitiesCatalog.removeEntityByUid.mockRejectedValue( new NotFoundError('nope'), ); - + entitiesCatalog.entities.mockResolvedValue({ + entities: [], + pageInfo: { hasNextPage: false }, + }); const response = await request(app).delete('/entities/by-uid/apa'); expect(entitiesCatalog.removeEntityByUid).toHaveBeenCalledTimes(1); expect(entitiesCatalog.removeEntityByUid).toHaveBeenCalledWith('apa', { credentials: mockCredentials.user(), }); expect(response.status).toEqual(404); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityDeletion', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-uid/apa`, + method: 'DELETE', + params: { + uid: 'apa', + }, + }, + meta: { + uid: 'apa', + }, + stage: 'initiation', + }; + const auditLogFailureMeta = { + ...auditLogInitMeta, + stage: 'completion', + status: 'failed', + meta: {}, + errors: [ + { + name: 'NotFoundError', + message: 'nope', + stack: expect.any(String), + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Deletion attempt for entity with uid apa initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Deletion attempt for entity with uid apa by user:default/mock failed`, + auditLogFailureMeta, + ); }); }); @@ -515,6 +1142,7 @@ describe('createRouter readonly disabled', () => { '{"entityRefs":[7],"fields":7}', '{"entityRefs":[7],"fields":[7]}', ])('properly rejects malformed request body, %p', async p => { + // TODO(frkong): These are rejected by the openapi router as well so no audit logging await expect( request(app) .post('/entities/by-refs') @@ -557,6 +1185,43 @@ describe('createRouter readonly disabled', () => { }); expect(response.status).toEqual(200); expect(response.body).toEqual({ items: [entity] }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityBatchFetch', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-refs?filter=kind=Component`, + method: 'POST', + query: { + filter: ['kind=Component'], + }, + body: { + entityRefs: [entityRef], + fields: ['metadata.name'], + }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + meta: { + entityRefs: [entityRef], + fields: ['metadata.name'], + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Batch entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Batch entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -576,6 +1241,31 @@ describe('createRouter readonly disabled', () => { expect(response.body).toEqual([ { data: { id: 'foo', target: 'example.com', type: 'url' } }, ]); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationFetch', + request: { + ...commonAuditLogMeta.request, + url: `/locations`, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt of locations initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt of locations by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -595,11 +1285,39 @@ describe('createRouter readonly disabled', () => { }); expect(response.status).toEqual(200); - expect(response.body).toEqual({ - id: 'foo', - target: 'example.com', - type: 'url', - }); + expect(response.body).toEqual(location); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationFetchById', + request: { + ...commonAuditLogMeta.request, + url: `/locations/foo`, + params: { id: 'foo' }, + }, + meta: { + id: 'foo', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 200, + body: location, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt of location with id: foo initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt of location with id: foo by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -610,10 +1328,7 @@ describe('createRouter readonly disabled', () => { target: 'c', } as unknown as LocationInput; - const response = await request(app) - .post('/locations') - - .send(spec); + const response = await request(app).post('/locations').send(spec); expect(locationService.createLocation).not.toHaveBeenCalled(); expect(response.status).toEqual(400); @@ -630,10 +1345,7 @@ describe('createRouter readonly disabled', () => { entities: [], }); - const response = await request(app) - .post('/locations') - - .send(spec); + const response = await request(app).post('/locations').send(spec); expect(locationService.createLocation).toHaveBeenCalledTimes(1); expect(locationService.createLocation).toHaveBeenCalledWith(spec, false, { @@ -645,6 +1357,43 @@ describe('createRouter readonly disabled', () => { location: { id: 'a', ...spec }, }), ); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationCreation', + request: { + ...commonAuditLogMeta.request, + method: 'POST', + url: `/locations`, + body: spec, + }, + meta: { + isDryRun: false, + location: { ...spec }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 201, + }, + meta: { + isDryRun: false, + location: { id: 'a', ...spec }, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Creation attempt of location entity for c initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Creation of location entity for c initiated by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); it('supports dry run', async () => { @@ -660,7 +1409,6 @@ describe('createRouter readonly disabled', () => { const response = await request(app) .post('/locations?dryRun=true') - .send(spec); expect(locationService.createLocation).toHaveBeenCalledTimes(1); @@ -673,13 +1421,55 @@ describe('createRouter readonly disabled', () => { location: { id: 'a', ...spec }, }), ); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationCreation', + request: { + ...commonAuditLogMeta.request, + method: 'POST', + url: `/locations?dryRun=true`, + query: { dryRun: 'true' }, + body: spec, + }, + meta: { + isDryRun: true, + location: { ...spec }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 201, + }, + meta: { + isDryRun: true, + location: { id: 'a', ...spec }, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Creation attempt of location entity for c initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Creation of location entity for c initiated by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); describe('DELETE /locations', () => { it('deletes the location', async () => { locationService.deleteLocation.mockResolvedValueOnce(undefined); - + locationService.getLocation.mockResolvedValueOnce({ + id: 'joo', + target: 'test', + type: 'url', + }); const response = await request(app).delete('/locations/foo'); expect(locationService.deleteLocation).toHaveBeenCalledTimes(1); expect(locationService.deleteLocation).toHaveBeenCalledWith('foo', { @@ -687,6 +1477,48 @@ describe('createRouter readonly disabled', () => { }); expect(response.status).toEqual(204); + + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationDeletion', + request: { + ...commonAuditLogMeta.request, + url: `/locations/foo`, + method: 'DELETE', + params: { + id: 'foo', + }, + }, + meta: { + id: 'foo', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + meta: { + location: { + id: 'joo', + target: 'test', + type: 'url', + }, + }, + response: { + status: 204, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Deletion attempt of location with id: foo initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Deletion attempt of location with id: foo by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -714,6 +1546,43 @@ describe('createRouter readonly disabled', () => { target: 'example.com', type: 'url', }); + + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationFetchByEntityRef', + request: { + ...commonAuditLogMeta.request, + url: `/locations/by-entity/c/ns/n`, + params: { + kind: 'c', + namespace: 'ns', + name: 'n', + }, + }, + meta: { + locationRef: 'c:ns/n', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 200, + body: location, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for location c:ns/n initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt for location c:ns/n by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -755,6 +1624,39 @@ describe('createRouter readonly disabled', () => { }, }, }); + + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityValidate', + request: { + ...commonAuditLogMeta.request, + url: `/validate-entity`, + method: 'POST', + body: { + entity, + location: 'url:validate-entity', + }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 200, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Entity validation for entity initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Entity validation for entity by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -792,6 +1694,46 @@ describe('createRouter readonly disabled', () => { }, }, }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityValidate', + request: { + ...commonAuditLogMeta.request, + url: `/validate-entity`, + method: 'POST', + body: { + entity, + location: 'url:validate-entity', + }, + }, + stage: 'initiation', + }; + const auditLogFailureMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 400, + }, + status: 'failed', + errors: [ + { + name: 'Error', + message: 'Invalid entity name', + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Entity validation for entity initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Entity validation for entity initiated by user:default/mock failed`, + auditLogFailureMeta, + ); }); }); @@ -841,6 +1783,41 @@ describe('createRouter readonly disabled', () => { expect(response.body.error.message).toMatch( /The given location.target is not a URL/, ); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationAnalyze', + request: { + ...commonAuditLogMeta.request, + url: `/analyze-location`, + method: 'POST', + body: { location: { type: 'url', target: 'not a url' } }, + }, + stage: 'initiation', + }; + const auditLogFailureMeta = { + ...auditLogInitMeta, + stage: 'completion', + status: 'failed', + errors: [ + { + name: 'InputError', + message: 'The given location.target is not a URL', + stack: expect.any(String), + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Analyze location for location initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Analyze location for location by user:default/mock failed`, + auditLogFailureMeta, + ); }); }); }); @@ -849,6 +1826,9 @@ describe('createRouter readonly enabled', () => { let entitiesCatalog: jest.Mocked; let app: express.Express; let locationService: jest.Mocked; + const logger = getVoidLogger(); + let loggerSpy: jest.SpyInstance; + let loggerErrorSpy: jest.SpyInstance; beforeAll(async () => { entitiesCatalog = { @@ -869,7 +1849,7 @@ describe('createRouter readonly enabled', () => { const router = await createRouter({ entitiesCatalog, locationService, - logger: getVoidLogger(), + logger, config: new ConfigReader({ catalog: { readonly: true, @@ -883,6 +1863,11 @@ describe('createRouter readonly enabled', () => { }); beforeEach(() => { + loggerSpy = jest.spyOn(logger, 'info'); + loggerErrorSpy = jest.spyOn(logger, 'error'); + }); + + afterEach(() => { jest.resetAllMocks(); }); @@ -901,18 +1886,91 @@ describe('createRouter readonly enabled', () => { expect(response.status).toEqual(200); expect(response.body).toEqual(entities); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityFetch', + request: { + ...commonAuditLogMeta.request, + url: `/entities`, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Entity fetch attempt initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Entity fetch attempt by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); describe('DELETE /entities/by-uid/:uid', () => { // this delete is allowed as there is no other way to remove entities it('is allowed', async () => { + entitiesCatalog.entities.mockResolvedValue({ + entities: [ + { + apiVersion: 'v1', + kind: 'k', + metadata: { + name: 'n', + namespace: 'ns', + }, + }, + ], + pageInfo: { hasNextPage: false }, + }); const response = await request(app).delete('/entities/by-uid/apa'); expect(entitiesCatalog.removeEntityByUid).toHaveBeenCalledTimes(1); expect(entitiesCatalog.removeEntityByUid).toHaveBeenCalledWith('apa', { credentials: mockCredentials.user(), }); expect(response.status).toEqual(204); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogEntityDeletion', + request: { + ...commonAuditLogMeta.request, + url: `/entities/by-uid/apa`, + method: 'DELETE', + params: { + uid: 'apa', + }, + }, + meta: { + uid: 'apa', + entityRef: 'k:ns/n', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 204 }, + }; + + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Deletion attempt for entity with uid apa initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Deletion attempt for entity with uid apa by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -933,6 +1991,31 @@ describe('createRouter readonly enabled', () => { expect(response.body).toEqual([ { data: { id: 'foo', target: 'example.com', type: 'url' } }, ]); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationFetch', + request: { + ...commonAuditLogMeta.request, + url: `/locations`, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { status: 200 }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt of locations initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt of locations by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -957,6 +2040,38 @@ describe('createRouter readonly enabled', () => { target: 'example.com', type: 'url', }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationFetchById', + request: { + ...commonAuditLogMeta.request, + url: `/locations/foo`, + params: { id: 'foo' }, + }, + meta: { + id: 'foo', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 200, + body: location, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt of location with id: foo initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt of location with id: foo by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -967,14 +2082,50 @@ describe('createRouter readonly enabled', () => { target: 'c', }; - const response = await request(app) - .post('/locations') - - .send(spec); + const response = await request(app).post('/locations').send(spec); expect(locationService.createLocation).not.toHaveBeenCalled(); expect(response.status).toEqual(403); expect(response.text).toMatch(/not allowed in readonly/); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationCreation', + request: { + ...commonAuditLogMeta.request, + method: 'POST', + url: `/locations`, + body: spec, + }, + meta: { + isDryRun: false, + location: { ...spec }, + }, + stage: 'initiation', + }; + const auditLogErrorMeta = { + ...auditLogInitMeta, + stage: 'completion', + status: 'failed', + errors: [ + { + name: 'NotAllowedError', + message: 'This operation not allowed in readonly mode', + stack: expect.any(String), + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Creation attempt of location entity for c initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Creation of location entity for c initiated by user:default/mock failed`, + auditLogErrorMeta, + ); }); it('supports dry run', async () => { @@ -1003,6 +2154,44 @@ describe('createRouter readonly enabled', () => { location: { id: 'a', ...spec }, }), ); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationCreation', + request: { + ...commonAuditLogMeta.request, + method: 'POST', + url: `/locations?dryRun=true`, + query: { dryRun: 'true' }, + body: spec, + }, + meta: { + isDryRun: true, + location: { ...spec }, + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 201, + }, + meta: { + isDryRun: true, + location: { id: 'a', ...spec }, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Creation attempt of location entity for c initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Creation of location entity for c initiated by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); @@ -1011,6 +2200,46 @@ describe('createRouter readonly enabled', () => { const response = await request(app).delete('/locations/foo'); expect(locationService.deleteLocation).not.toHaveBeenCalled(); expect(response.status).toEqual(403); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationDeletion', + request: { + ...commonAuditLogMeta.request, + method: 'DELETE', + url: `/locations/foo`, + params: { + id: 'foo', + }, + }, + meta: { + id: 'foo', + }, + stage: 'initiation', + }; + const auditLogErrorMeta = { + ...auditLogInitMeta, + stage: 'completion', + status: 'failed', + errors: [ + { + name: 'NotAllowedError', + message: 'This operation not allowed in readonly mode', + stack: expect.any(String), + }, + ], + }; + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerErrorSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Deletion attempt of location with id: foo initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerErrorSpy).toHaveBeenNthCalledWith( + 1, + `Deletion attempt of location with id: foo by user:default/mock failed`, + auditLogErrorMeta, + ); }); }); @@ -1038,6 +2267,42 @@ describe('createRouter readonly enabled', () => { target: 'example.com', type: 'url', }); + const auditLogInitMeta = { + ...commonAuditLogMeta, + eventName: 'CatalogLocationFetchByEntityRef', + request: { + ...commonAuditLogMeta.request, + url: `/locations/by-entity/c/ns/n`, + params: { + kind: 'c', + namespace: 'ns', + name: 'n', + }, + }, + meta: { + locationRef: 'c:ns/n', + }, + stage: 'initiation', + }; + const auditLogCompletionMeta = { + ...auditLogInitMeta, + stage: 'completion', + response: { + status: 200, + body: location, + }, + }; + expect(loggerSpy).toHaveBeenCalledTimes(2); + expect(loggerSpy).toHaveBeenNthCalledWith( + 1, + `Fetch attempt for location c:ns/n initiated by user:default/mock`, + auditLogInitMeta, + ); + expect(loggerSpy).toHaveBeenNthCalledWith( + 2, + `Fetch attempt for location c:ns/n by user:default/mock succeeded`, + auditLogCompletionMeta, + ); }); }); }); diff --git a/plugins/catalog-backend/src/service/createRouter.ts b/plugins/catalog-backend/src/service/createRouter.ts index 508f0bb3d6f05d..41def6f49374bd 100644 --- a/plugins/catalog-backend/src/service/createRouter.ts +++ b/plugins/catalog-backend/src/service/createRouter.ts @@ -56,6 +56,8 @@ import { LoggerService, } from '@backstage/backend-plugin-api'; +import { DefaultAuditLogger } from '@janus-idp/backstage-plugin-audit-log-node'; + /** * Options used by {@link createRouter}. * @@ -103,6 +105,11 @@ export async function createRouter( httpAuth, } = options; + const auditLogger = new DefaultAuditLogger({ + logger, + authService: auth, + httpAuthService: httpAuth, + }); const readonlyEnabled = config.getOptionalBoolean('catalog.readonly') || false; if (readonlyEnabled) { @@ -110,18 +117,68 @@ export async function createRouter( } if (refreshService) { + // TODO: Potentially find a way to track the ancestor that gets refreshed to refresh this entity (as well as the child of that ancestor?) router.post('/refresh', async (req, res) => { const { authorizationToken, ...restBody } = req.body; + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogEntityRefresh', + actorId, + status: 'succeeded', + stage: 'initiation', + metadata: { + entityRef: restBody.entityRef, + }, + request: req, + message: `Refresh attempt for ${restBody.entityRef} initiated by ${actorId}`, + }); - const credentials = authorizationToken - ? await auth.authenticate(authorizationToken) - : await httpAuth.credentials(req); + const credentials = authorizationToken + ? await auth.authenticate(authorizationToken) + : await httpAuth.credentials(req); - await refreshService.refresh({ - ...restBody, - credentials, - }); - res.status(200).end(); + await refreshService.refresh({ + ...restBody, + credentials, + }); + await auditLogger.auditLog({ + eventName: 'CatalogEntityRefresh', + actorId, + status: 'succeeded', + stage: 'completion', + metadata: { + entityRef: restBody.entityRef, + }, + response: { + status: 200, + }, + request: req, + message: `Refresh attempt for ${restBody.entityRef} triggered by ${actorId}`, + }); + res.status(200).end(); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityRefresh', + actorId, + status: 'failed', + stage: 'completion', + level: 'error', + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + metadata: { + entityRef: restBody.entityRef, + }, + request: req, + message: `Refresh attempt for ${restBody.entityRef} by ${actorId} failed`, + }); + throw err; + } }); } @@ -132,187 +189,871 @@ export async function createRouter( if (entitiesCatalog) { router .get('/entities', async (req, res) => { - const { entities, pageInfo } = await entitiesCatalog.entities({ - filter: parseEntityFilterParams(req.query), - fields: parseEntityTransformParams(req.query), - order: parseEntityOrderParams(req.query), - pagination: parseEntityPaginationParams(req.query), - credentials: await httpAuth.credentials(req), - }); + const actorId = await auditLogger.getActorId( + req as unknown as express.Request, + ); + try { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetch', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req as unknown as express.Request, + message: `Entity fetch attempt initiated by ${actorId}`, + }); + const { entities, pageInfo } = await entitiesCatalog.entities({ + filter: parseEntityFilterParams(req.query), + fields: parseEntityTransformParams(req.query), + order: parseEntityOrderParams(req.query), + pagination: parseEntityPaginationParams(req.query), + credentials: await httpAuth.credentials(req), + }); - // Add a Link header to the next page - if (pageInfo.hasNextPage) { - const url = new URL(`http://ignored${req.url}`); - url.searchParams.delete('offset'); - url.searchParams.set('after', pageInfo.endCursor); - res.setHeader('link', `<${url.pathname}${url.search}>; rel="next"`); - } + // Add a Link header to the next page + if (pageInfo.hasNextPage) { + const url = new URL(`http://ignored${req.url}`); + url.searchParams.delete('offset'); + url.searchParams.set('after', pageInfo.endCursor); + res.setHeader('link', `<${url.pathname}${url.search}>; rel="next"`); + } + + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetch', + actorId, + status: 'succeeded', + stage: 'completion', + request: req as unknown as express.Request, + // Let's not log out the entities since this can make the log very big due to it not being paged? + response: { + status: 200, + }, + message: `Entity fetch attempt by ${actorId} succeeded`, + }); - // TODO(freben): encode the pageInfo in the response - res.json(entities); + // TODO(freben): encode the pageInfo in the response + res.json(entities); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetch', + status: 'failed', + stage: 'completion', + level: 'error', + request: req as unknown as express.Request, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Entity fetch attempt by ${actorId} failed`, + }); + throw err; + } }) .get('/entities/by-query', async (req, res) => { - const { items, pageInfo, totalItems } = - await entitiesCatalog.queryEntities({ - limit: req.query.limit, - ...parseQueryEntitiesParams(req.query), - credentials: await httpAuth.credentials(req), + const actorId = await auditLogger.getActorId( + req as unknown as express.Request, + ); + try { + await auditLogger.auditLog({ + eventName: 'QueriedCatalogEntityFetch', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req as unknown as express.Request, + message: `Queried entity fetch attempt initiated by ${actorId}`, }); + const { items, pageInfo, totalItems } = + await entitiesCatalog.queryEntities({ + limit: req.query.limit, + ...parseQueryEntitiesParams(req.query), + credentials: await httpAuth.credentials(req), + }); - res.json({ - items, - totalItems, - pageInfo: { - ...(pageInfo.nextCursor && { - nextCursor: encodeCursor(pageInfo.nextCursor), - }), - ...(pageInfo.prevCursor && { - prevCursor: encodeCursor(pageInfo.prevCursor), - }), - }, - }); + res.json({ + items, + totalItems, + pageInfo: { + ...(pageInfo.nextCursor && { + nextCursor: encodeCursor(pageInfo.nextCursor), + }), + ...(pageInfo.prevCursor && { + prevCursor: encodeCursor(pageInfo.prevCursor), + }), + }, + }); + await auditLogger.auditLog({ + eventName: 'QueriedCatalogEntityFetch', + actorId, + status: 'succeeded', + stage: 'completion', + request: req as unknown as express.Request, + metadata: { + totalEntities: totalItems, + pageInfo: { + ...(pageInfo.nextCursor && { + nextCursor: encodeCursor(pageInfo.nextCursor), + }), + ...(pageInfo.prevCursor && { + prevCursor: encodeCursor(pageInfo.prevCursor), + }), + }, + }, + // Let's not log out the entities since this can make the log very big + response: { + status: 200, + }, + message: `Queried entity fetch attempt by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'QueriedCatalogEntityFetch', + actorId, + status: 'failed', + stage: 'completion', + level: 'error', + request: req as unknown as express.Request, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Queried entity fetch attempt by ${actorId} failed`, + }); + throw err; + } }) .get('/entities/by-uid/:uid', async (req, res) => { const { uid } = req.params; - const { entities } = await entitiesCatalog.entities({ - filter: basicEntityFilter({ 'metadata.uid': uid }), - credentials: await httpAuth.credentials(req), - }); - if (!entities.length) { - throw new NotFoundError(`No entity with uid ${uid}`); + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetchByUid', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req, + metadata: { + uid: uid, + }, + message: `Fetch attempt for entity with uid ${uid} initiated by ${actorId}`, + }); + const { entities } = await entitiesCatalog.entities({ + filter: basicEntityFilter({ 'metadata.uid': uid }), + credentials: await httpAuth.credentials(req), + }); + if (!entities.length) { + throw new NotFoundError(`No entity with uid ${uid}`); + } + res.status(200).json(entities[0]); + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetchByUid', + actorId, + status: 'succeeded', + stage: 'completion', + request: req, + metadata: { + uid: uid, + entityRef: stringifyEntityRef(entities[0]), + }, + response: { + status: 200, + }, + message: `Fetch attempt for entity with uid ${uid} by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetchByUid', + actorId, + status: 'failed', + stage: 'completion', + level: 'error', + request: req, + metadata: { + uid: uid, + }, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Fetch attempt for entity with uid ${uid} by ${actorId} failed`, + }); + throw err; } - res.status(200).json(entities[0]); }) .delete('/entities/by-uid/:uid', async (req, res) => { const { uid } = req.params; - await entitiesCatalog.removeEntityByUid(uid, { - credentials: await httpAuth.credentials(req), - }); - res.status(204).end(); + const actorId = await auditLogger.getActorId(req); + let entityRef: string | undefined; + try { + // Get the entityRef of the UID so users can more easily identity the entity + const { entities } = await entitiesCatalog.entities({ + filter: basicEntityFilter({ 'metadata.uid': uid }), + credentials: await httpAuth.credentials(req), + }); + if (entities.length) { + entityRef = stringifyEntityRef(entities[0]); + } + await auditLogger.auditLog({ + eventName: 'CatalogEntityDeletion', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req, + metadata: { + uid: uid, + entityRef: entityRef, + }, + message: `Deletion attempt for entity with uid ${uid} initiated by ${actorId}`, + }); + await entitiesCatalog.removeEntityByUid(uid, { + credentials: await httpAuth.credentials(req), + }); + await auditLogger.auditLog({ + eventName: 'CatalogEntityDeletion', + actorId, + status: 'succeeded', + stage: 'completion', + request: req, + metadata: { + uid: uid, + entityRef: entityRef, + }, + response: { + status: 204, + }, + message: `Deletion attempt for entity with uid ${uid} by ${actorId} succeeded`, + }); + res.status(204).end(); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityDeletion', + actorId, + status: 'failed', + stage: 'completion', + level: 'error', + request: req, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Deletion attempt for entity with uid ${uid} by ${actorId} failed`, + }); + throw err; + } }) .get('/entities/by-name/:kind/:namespace/:name', async (req, res) => { const { kind, namespace, name } = req.params; - const { entities } = await entitiesCatalog.entities({ - filter: basicEntityFilter({ - kind: kind, - 'metadata.namespace': namespace, - 'metadata.name': name, - }), - credentials: await httpAuth.credentials(req), - }); - if (!entities.length) { - throw new NotFoundError( - `No entity named '${name}' found, with kind '${kind}' in namespace '${namespace}'`, - ); + const entityRef = stringifyEntityRef({ kind, namespace, name }); + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetchByName', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req, + metadata: { + entityRef: entityRef, + }, + message: `Fetch attempt for entity with entityRef ${entityRef} initiated by ${actorId}`, + }); + const { entities } = await entitiesCatalog.entities({ + filter: basicEntityFilter({ + kind: kind, + 'metadata.namespace': namespace, + 'metadata.name': name, + }), + credentials: await httpAuth.credentials(req), + }); + if (!entities.length) { + throw new NotFoundError( + `No entity named '${name}' found, with kind '${kind}' in namespace '${namespace}'`, + ); + } + res.status(200).json(entities[0]); + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetchByName', + actorId, + status: 'succeeded', + stage: 'completion', + request: req, + metadata: { + entityRef: entityRef, + }, + response: { + status: 200, + }, + message: `Fetch attempt for entity with entityRef ${entityRef} by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFetchByName', + actorId, + status: 'failed', + stage: 'completion', + level: 'error', + request: req, + metadata: { + entityRef: entityRef, + }, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Fetch attempt for entity with entityRef ${entityRef} by ${actorId} failed`, + }); + throw err; } - res.status(200).json(entities[0]); }) .get( '/entities/by-name/:kind/:namespace/:name/ancestry', async (req, res) => { const { kind, namespace, name } = req.params; const entityRef = stringifyEntityRef({ kind, namespace, name }); - const response = await entitiesCatalog.entityAncestry(entityRef, { - credentials: await httpAuth.credentials(req), - }); - res.status(200).json(response); + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogEntityAncestryFetch', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req, + metadata: { + entityRef: entityRef, + }, + message: `Fetch attempt for entity ancestor of entity ${entityRef} initiated by ${actorId}`, + }); + const response = await entitiesCatalog.entityAncestry(entityRef, { + credentials: await httpAuth.credentials(req), + }); + res.status(200).json(response); + await auditLogger.auditLog({ + eventName: 'CatalogEntityAncestryFetch', + actorId, + status: 'succeeded', + stage: 'completion', + request: req, + metadata: { + rootEntityRef: response.rootEntityRef, + ancestry: response.items.map(ancestryLink => { + return { + entityRef: stringifyEntityRef(ancestryLink.entity), + parentEntityRefs: ancestryLink.parentEntityRefs, + }; + }), + }, + response: { + status: 200, + }, + message: `Fetch attempt for entity ancestor of entity ${entityRef} by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityAncestryFetch', + actorId, + status: 'failed', + stage: 'completion', + level: 'error', + request: req, + metadata: { + entityRef: entityRef, + }, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Fetch attempt for entity ancestor of entity ${entityRef} by ${actorId} failed`, + }); + throw err; + } }, ) .post('/entities/by-refs', async (req, res) => { - const request = entitiesBatchRequest(req); - const response = await entitiesCatalog.entitiesBatch({ - entityRefs: request.entityRefs, - filter: parseEntityFilterParams(req.query), - fields: parseEntityTransformParams(req.query, request.fields), - credentials: await httpAuth.credentials(req), - }); - res.status(200).json(response); + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogEntityBatchFetch', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req, + message: `Batch entity fetch attempt initiated by ${actorId}`, + }); + const request = entitiesBatchRequest(req); + const response = await entitiesCatalog.entitiesBatch({ + entityRefs: request.entityRefs, + filter: parseEntityFilterParams(req.query), + fields: parseEntityTransformParams(req.query, request.fields), + credentials: await httpAuth.credentials(req), + }); + res.status(200).json(response); + await auditLogger.auditLog({ + eventName: 'CatalogEntityBatchFetch', + actorId, + status: 'succeeded', + stage: 'completion', + request: req, + metadata: { + ...request, + }, + response: { + status: 200, + }, + message: `Batch entity fetch attempt by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityBatchFetch', + actorId, + status: 'failed', + stage: 'completion', + level: 'error', + request: req, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Batch entity fetch attempt by ${actorId} failed`, + }); + throw err; + } }) .get('/entity-facets', async (req, res) => { - const response = await entitiesCatalog.facets({ - filter: parseEntityFilterParams(req.query), - facets: parseEntityFacetParams(req.query), - credentials: await httpAuth.credentials(req), - }); - res.status(200).json(response); + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFacetFetch', + actorId, + status: 'succeeded', + stage: 'initiation', + request: req, + message: `Entity facet fetch attempt initiated by ${actorId}`, + }); + const response = await entitiesCatalog.facets({ + filter: parseEntityFilterParams(req.query), + facets: parseEntityFacetParams(req.query), + credentials: await httpAuth.credentials(req), + }); + res.status(200).json(response); + await auditLogger.auditLog({ + eventName: 'CatalogEntityFacetFetch', + actorId, + status: 'succeeded', + stage: 'completion', + request: req, + response: { status: 200 }, + message: `Entity facet fetch attempt by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityFacetFetch', + actorId, + status: 'failed', + stage: 'completion', + request: req, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Entity facet fetch attempt by ${actorId} failed`, + }); + throw err; + } }); } if (locationService) { router .post('/locations', async (req, res) => { + const credentials = await httpAuth.credentials(req); + const actorId = await auditLogger.getActorId(req); const location = await validateRequestBody(req, locationInput); const dryRun = yn(req.query.dryRun, { default: false }); - // when in dryRun addLocation is effectively a read operation so we don't - // need to disallow readonly - if (!dryRun) { - disallowReadonlyMode(readonlyEnabled); - } + try { + await auditLogger.auditLog({ + eventName: 'CatalogLocationCreation', + status: 'succeeded', + stage: 'initiation', + actorId, + metadata: { + location: location, + isDryRun: dryRun, + }, + request: req, + message: `Creation attempt of location entity for ${location.target} initiated by ${actorId}`, + }); - const output = await locationService.createLocation(location, dryRun, { - credentials: await httpAuth.credentials(req), - }); - res.status(201).json(output); + // when in dryRun addLocation is effectively a read operation so we don't + // need to disallow readonly + if (!dryRun) { + disallowReadonlyMode(readonlyEnabled); + } + + const output = await locationService.createLocation( + location, + dryRun, + { + credentials, + }, + ); + await auditLogger.auditLog({ + eventName: 'CatalogLocationCreation', + status: 'succeeded', + stage: 'completion', + actorId, + metadata: { + location: output.location, + isDryRun: dryRun, + }, + request: req, + response: { + status: 201, + }, + message: `Creation of location entity for ${location.target} initiated by ${actorId} succeeded`, + }); + res.status(201).json(output); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogLocationCreation', + status: 'failed', + stage: 'completion', + level: 'error', + actorId, + metadata: { + location: location, + isDryRun: dryRun, + }, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + request: req, + message: `Creation of location entity for ${location.target} initiated by ${actorId} failed`, + }); + throw err; + } }) .get('/locations', async (req, res) => { - const locations = await locationService.listLocations({ - credentials: await httpAuth.credentials(req), - }); - res.status(200).json(locations.map(l => ({ data: l }))); + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetch', + status: 'succeeded', + stage: 'initiation', + actorId, + request: req, + message: `Fetch attempt of locations initiated by ${actorId}`, + }); + const locations = await locationService.listLocations({ + credentials: await httpAuth.credentials(req), + }); + res.status(200).json(locations.map(l => ({ data: l }))); + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetch', + status: 'succeeded', + stage: 'completion', + actorId, + request: req, + response: { + status: 200, + }, + message: `Fetch attempt of locations by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetch', + status: 'failed', + stage: 'completion', + level: 'error', + actorId, + request: req, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + message: `Fetch attempt of locations by ${actorId} failed`, + }); + throw err; + } }) .get('/locations/:id', async (req, res) => { const { id } = req.params; - const output = await locationService.getLocation(id, { - credentials: await httpAuth.credentials(req), - }); - res.status(200).json(output); + const actorId = await auditLogger.getActorId(req); + try { + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetchById', + status: 'succeeded', + stage: 'initiation', + actorId, + metadata: { + id: id, + }, + request: req, + message: `Fetch attempt of location with id: ${id} initiated by ${actorId}`, + }); + const output = await locationService.getLocation(id, { + credentials: await httpAuth.credentials(req), + }); + res.status(200).json(output); + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetchById', + status: 'succeeded', + stage: 'completion', + actorId, + metadata: { + id: id, + }, + response: { + status: 200, + body: output, + }, + request: req, + message: `Fetch attempt of location with id: ${id} by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetchById', + status: 'failed', + stage: 'completion', + level: 'error', + actorId, + metadata: { + id: id, + }, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + request: req, + message: `Fetch attempt of location with id: ${id} by ${actorId} failed`, + }); + throw err; + } }) .delete('/locations/:id', async (req, res) => { - disallowReadonlyMode(readonlyEnabled); - + const actorId = await auditLogger.getActorId(req); const { id } = req.params; - await locationService.deleteLocation(id, { - credentials: await httpAuth.credentials(req), - }); - res.status(204).end(); + try { + await auditLogger.auditLog({ + eventName: 'CatalogLocationDeletion', + status: 'succeeded', + stage: 'initiation', + actorId, + metadata: { + id: id, + }, + request: req, + message: `Deletion attempt of location with id: ${id} initiated by ${actorId}`, + }); + disallowReadonlyMode(readonlyEnabled); + // Grabbing the information of the location begin deleted + const location = await locationService.getLocation(id, { + credentials: await httpAuth.credentials(req), + }); + await locationService.deleteLocation(id, { + credentials: await httpAuth.credentials(req), + }); + await auditLogger.auditLog({ + eventName: 'CatalogLocationDeletion', + status: 'succeeded', + stage: 'completion', + actorId, + metadata: { + location, + }, + response: { + status: 204, + }, + request: req, + message: `Deletion attempt of location with id: ${id} by ${actorId} succeeded`, + }); + res.status(204).end(); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogLocationDeletion', + status: 'failed', + stage: 'completion', + level: 'error', + actorId, + metadata: { + id: id, + }, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + request: req, + message: `Deletion attempt of location with id: ${id} by ${actorId} failed`, + }); + throw err; + } }) .get('/locations/by-entity/:kind/:namespace/:name', async (req, res) => { const { kind, namespace, name } = req.params; - const output = await locationService.getLocationByEntity( - { kind, namespace, name }, - { credentials: await httpAuth.credentials(req) }, - ); - res.status(200).json(output); + const actorId = await auditLogger.getActorId(req); + const locationRef = `${kind}:${namespace}/${name}`; + + try { + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetchByEntityRef', + status: 'succeeded', + stage: 'initiation', + actorId, + metadata: { + locationRef: locationRef, + }, + request: req, + message: `Fetch attempt for location ${locationRef} initiated by ${actorId}`, + }); + + const output = await locationService.getLocationByEntity( + { kind, namespace, name }, + { credentials: await httpAuth.credentials(req) }, + ); + res.status(200).json(output); + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetchByEntityRef', + status: 'succeeded', + stage: 'completion', + actorId, + metadata: { + locationRef: locationRef, + }, + response: { + status: 200, + body: output, + }, + request: req, + message: `Fetch attempt for location ${locationRef} by ${actorId} succeeded`, + }); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogLocationFetchByEntityRef', + status: 'failed', + stage: 'completion', + level: 'error', + actorId, + metadata: { + locationRef: locationRef, + }, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + request: req, + message: `Fetch attempt for location ${locationRef} by ${actorId} failed`, + }); + throw err; + } }); } if (locationAnalyzer) { router.post('/analyze-location', async (req, res) => { - const body = await validateRequestBody( - req, - z.object({ + const actorId = await auditLogger.getActorId(req); + + try { + await auditLogger.auditLog({ + eventName: 'CatalogLocationAnalyze', + status: 'succeeded', + stage: 'initiation', + actorId, + request: req, + message: `Analyze location for location initiated by ${actorId}`, + }); + const body = await validateRequestBody( + req, + z.object({ + location: locationInput, + catalogFilename: z.string().optional(), + }), + ); + const schema = z.object({ location: locationInput, catalogFilename: z.string().optional(), - }), - ); - const schema = z.object({ - location: locationInput, - catalogFilename: z.string().optional(), - }); - const parsedBody = schema.parse(body); - try { - const output = await locationAnalyzer.analyzeLocation(parsedBody); - res.status(200).json(output); - } catch (err) { - if ( - // Catch errors from parse-url library. - err.name === 'Error' && - 'subject_url' in err - ) { - throw new InputError('The given location.target is not a URL'); + }); + const parsedBody = schema.parse(body); + try { + const output = await locationAnalyzer.analyzeLocation(parsedBody); + res.status(200).json(output); + await auditLogger.auditLog({ + eventName: 'CatalogLocationAnalyze', + status: 'succeeded', + stage: 'completion', + actorId, + request: req, + response: { + status: 200, + body: output, + }, + message: `Analyze location for location by ${actorId} succeeded`, + }); + } catch (err) { + if ( + // Catch errors from parse-url library. + err.name === 'Error' && + 'subject_url' in err + ) { + throw new InputError('The given location.target is not a URL'); + } + throw err; } + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogLocationAnalyze', + status: 'failed', + stage: 'completion', + level: 'error', + actorId, + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + request: req, + message: `Analyze location for location by ${actorId} failed`, + }); throw err; } }); @@ -320,47 +1061,103 @@ export async function createRouter( if (orchestrator) { router.post('/validate-entity', async (req, res) => { - const bodySchema = z.object({ - entity: z.unknown(), - location: z.string(), - }); + const actorId = await auditLogger.getActorId(req); - let body: z.infer; - let entity: Entity; - let location: { type: string; target: string }; try { - body = await validateRequestBody(req, bodySchema); - entity = validateEntityEnvelope(body.entity); - location = parseLocationRef(body.location); - if (location.type !== 'url') - throw new TypeError( - `Invalid location ref ${body.location}, only 'url:' is supported, e.g. url:https://host/path`, - ); - } catch (err) { - return res.status(400).json({ - errors: [serializeError(err)], + await auditLogger.auditLog({ + eventName: 'CatalogEntityValidate', + status: 'succeeded', + stage: 'initiation', + actorId, + request: req, + message: `Entity validation for entity initiated by ${actorId}`, + }); + const bodySchema = z.object({ + entity: z.unknown(), + location: z.string(), }); - } - const processingResult = await orchestrator.process({ - entity: { - ...entity, - metadata: { - ...entity.metadata, - annotations: { - [ANNOTATION_LOCATION]: body.location, - [ANNOTATION_ORIGIN_LOCATION]: body.location, - ...entity.metadata.annotations, + let body: z.infer; + let entity: Entity; + let location: { type: string; target: string }; + try { + body = await validateRequestBody(req, bodySchema); + entity = validateEntityEnvelope(body.entity); + location = parseLocationRef(body.location); + if (location.type !== 'url') + throw new TypeError( + `Invalid location ref ${body.location}, only 'url:' is supported, e.g. url:https://host/path`, + ); + } catch (err) { + return res.status(400).json({ + errors: [serializeError(err)], + }); + } + + const processingResult = await orchestrator.process({ + entity: { + ...entity, + metadata: { + ...entity.metadata, + annotations: { + [ANNOTATION_LOCATION]: body.location, + [ANNOTATION_ORIGIN_LOCATION]: body.location, + ...entity.metadata.annotations, + }, }, }, - }, - }); + }); - if (!processingResult.ok) - res.status(400).json({ - errors: processingResult.errors.map(e => serializeError(e)), + if (!processingResult.ok) { + const errors = processingResult.errors.map(e => serializeError(e)); + await auditLogger.auditLog({ + eventName: 'CatalogEntityValidate', + status: 'failed', + stage: 'completion', + level: 'error', + errors: errors, + response: { + status: 400, + }, + actorId, + request: req, + message: `Entity validation for entity initiated by ${actorId} failed`, + }); + return res.status(400).json({ + errors, + }); + } + await auditLogger.auditLog({ + eventName: 'CatalogEntityValidate', + status: 'succeeded', + stage: 'completion', + actorId, + response: { + status: 200, + }, + request: req, + message: `Entity validation for entity by ${actorId} succeeded`, + }); + return res.status(200).end(); + } catch (err) { + await auditLogger.auditLog({ + eventName: 'CatalogEntityValidate', + status: 'failed', + stage: 'completion', + level: 'error', + errors: [ + { + name: err.name, + message: err.message, + stack: err.stack, + }, + ], + actorId, + request: req, + message: `Entity validation for entity initiated by ${actorId} failed`, }); - return res.status(200).end(); + throw err; + } }); } diff --git a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md index edf43fef754896..7a2a4ad08776e9 100644 --- a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md +++ b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cicd-statistics-module-gitlab +## 0.1.31 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-cicd-statistics@0.1.37 + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.2 + ## 0.1.30 ### Patch Changes diff --git a/plugins/cicd-statistics-module-gitlab/README.md b/plugins/cicd-statistics-module-gitlab/README.md index 67da1c229102c0..bed9c9329aaa8f 100644 --- a/plugins/cicd-statistics-module-gitlab/README.md +++ b/plugins/cicd-statistics-module-gitlab/README.md @@ -1,39 +1,3 @@ -# cicd-statistics-module-gitlab +# Deprecated -This is an extension module to the `cicd-statistics` plugin, providing a `CicdStatisticsApiGitlab` that you can use to extract the CI/CD statistics from your Gitlab repository. - -## Getting started - -1. Install the `cicd-statistics` and `cicd-statistics-module-gitlab` plugins in the `app` package. - -2. Configure your ApiFactory: - - You can optionally pass in a second argument to `CicdStatisticsApiGitlab` of type [CicdDefaults](https://github.com/backstage/backstage/blob/2881c53cb383bf127c150f837f37fe535d8cf97b/plugins/cicd-statistics/src/apis/types.ts#L179) to alter the default CICD UI configuration - -```tsx -// packages/app/src/apis.ts -import { gitlabAuthApiRef } from '@backstage/core-plugin-api'; - -import { cicdStatisticsApiRef } from '@backstage/plugin-cicd-statistics'; -import { CicdStatisticsApiGitlab } from '@backstage/plugin-cicd-statistics-module-gitlab'; - -export const apis: AnyApiFactory[] = [ - createApiFactory({ - api: cicdStatisticsApiRef, - deps: { gitlabAuthApi: gitlabAuthApiRef }, - factory({ gitlabAuthApi }) { - return new CicdStatisticsApiGitlab(gitlabAuthApi); - }, - }), -]; -``` - -3. Add the component to your EntityPage: - -```tsx -// packages/app/src/components/catalog/EntityPage.tsx -import { EntityCicdStatisticsContent } from '@backstage/plugin-cicd-statistics'; - - - -; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-cicd-statistics-module-gitlab` instead. diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index ba8d60d201e76a..7da56cb2ee0d8d 100644 --- a/plugins/cicd-statistics-module-gitlab/package.json +++ b/plugins/cicd-statistics-module-gitlab/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-cicd-statistics-module-gitlab", - "version": "0.1.30", + "version": "0.1.31", "description": "CI/CD Statistics plugin module; Gitlab CICD", "backstage": { - "role": "frontend-plugin-module" + "role": "frontend-plugin-module", + "moved": "@backstage-community/plugin-cicd-statistics-module-gitlab" }, "publishConfig": { "access": "public", @@ -53,5 +54,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-cicd-statistics-module-gitlab instead." } diff --git a/plugins/cicd-statistics/CHANGELOG.md b/plugins/cicd-statistics/CHANGELOG.md index d7d8908c21a415..c9f089f05e5b16 100644 --- a/plugins/cicd-statistics/CHANGELOG.md +++ b/plugins/cicd-statistics/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cicd-statistics +## 0.1.37 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.36 ### Patch Changes diff --git a/plugins/cicd-statistics/README.md b/plugins/cicd-statistics/README.md index 8d91d74794750a..767b34ed942359 100644 --- a/plugins/cicd-statistics/README.md +++ b/plugins/cicd-statistics/README.md @@ -1,13 +1,3 @@ -# CI/CD Statistics Plugin +# Deprecated -This plugin shows charts of CI/CD pipeline durations over time. It expects to be used on the Software Catalog entity page, as it uses `useEntity` to figure out what component to get the build information for. - -## Usage - -> This plugin cannot be used as-is; it requires a custom implementation to fetch build information - -To use this plugin, you need to implement an API `CicdStatisticsApi` and bind it to the `cicdStatisticsApiRef`. This API is defined in `src/apis/types.ts` and is an interface with two functions, `getConfiguration(options)` and `fetchBuilds(options)`. This plugin will call `getConfiguration` to allow the implementation to specify defaults and settings for the UI. - -First time the UI shows, and each time the user changes filters and clicks `Update` to refresh the data, `fetchBuilds` is invoked with the filter options. The API implementation is the expected to fetch build information from somewhere, format it into a generic and rather simple type `Build` (also defined in `types.ts`). The API can optionally signal completion for a progress bar in the UI. - -When this plugin has fetched the builds, it will transpose the list of builds (and build stages) into a tree of build stages. As build pipelines sometimes change, certain stages might end or begin within the date range of the view (when _Normalize time range_ is enabled, which is the default). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-cicd-statistics` instead. diff --git a/plugins/cicd-statistics/package.json b/plugins/cicd-statistics/package.json index f03665b0a3085f..420ec027a1ac66 100644 --- a/plugins/cicd-statistics/package.json +++ b/plugins/cicd-statistics/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-cicd-statistics", - "version": "0.1.36", + "version": "0.1.37", "description": "A frontend plugin visualizing CI/CD pipeline statistics (build time)", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-cicd-statistics" }, "publishConfig": { "access": "public", @@ -60,5 +61,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-cicd-statistics instead." } diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index 4af755481e05ba..5751ff1a4c70a8 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-circleci +## 0.3.35 + +### Patch Changes + +- c2112f2: This package has been deprecated in favour of the [Circle-CI](https://github.com/CircleCI-Public/backstage-plugin) plugin. Please migrate to that plugin instead. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.3.34 ### Patch Changes diff --git a/plugins/circleci/README.md b/plugins/circleci/README.md index 67e342e8c87ecf..95d0e1719a27eb 100644 --- a/plugins/circleci/README.md +++ b/plugins/circleci/README.md @@ -1,78 +1,3 @@ -# CircleCI Plugin +# Deprecated -> [!IMPORTANT] -> This plugin is now developed & maintained by CircleCI. Please refer to [their up-to-date documentation](https://github.com/CircleCI-Public/backstage-plugin) & [plugin repository](https://github.com/CircleCI-Public/backstage-plugin/) for help. - -## Screenshots - - - - - -## Setup - -1. If you have a standalone app (you didn't clone this repo), then do - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @circleci/backstage-plugin -``` - -2. Add the `EntityCircleCIContent` extension to the entity page in your app: - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { - EntityCircleCIContent, - isCircleCIAvailable, -} from '@circleci/backstage-plugin'; - -// For example in the CI/CD section -const cicdContent = ( - - - - -``` - -4. Add proxy config: - -```yaml -# In app-config.yaml -proxy: - '/circleci/api': - target: https://circleci.com/api/v1.1 - headers: - Circle-Token: ${CIRCLECI_AUTH_TOKEN} -``` - -5. Get and provide a `CIRCLECI_AUTH_TOKEN` as an environment variable (see the [CircleCI docs](https://circleci.com/docs/api/#add-an-api-token)). -6. Add an annotation to your respective `catalog-info.yaml` files, with the format `circleci.com/project-slug: //` (See reference in [ADR002](https://backstage.io/docs/architecture-decisions/adrs-adr002#format)). - -```yaml -# Example catalog-info.yaml entity definition file -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - # This also supports bitbucket/xxx/yyy - circleci.com/project-slug: github/my-org/my-repo -spec: - type: service - # ... -``` - -## Features - -- List top 50 builds for a project -- Dive into one build to see logs -- Polling (logs only) -- Retry builds -- Works for both project and personal tokens -- Pagination for builds - -## Limitations - -- CircleCI has pretty strict rate limits per token, be careful with opened tabs -- CircleCI doesn't provide a way to auth by 3rd party (e.g. GitHub) token, nor by calling their OAuth endpoints, which currently stands in the way of better auth integration with Backstage (reference [feature request](https://ideas.circleci.com/api-feature-requests/p/allow-circleci-api-calls-using-github-auth) and [discussion topic](https://discuss.circleci.com/t/circleci-api-authorization-with-github-token/5356)) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-circleci` instead. diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index aac7cb05e8086f..52d8a9f41c3e26 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-circleci", - "version": "0.3.34", + "version": "0.3.35", "description": "A Backstage plugin that integrates towards Circle CI", "backstage": { "role": "frontend-plugin" @@ -59,5 +59,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the to the https://github.com/CircleCI-Public/backstage-plugin repository. You should migrate to using that instead." } diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index 2d920cd8861504..5235868500ee51 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-cloudbuild +## 0.5.2 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.5.1 ### Patch Changes diff --git a/plugins/cloudbuild/README.md b/plugins/cloudbuild/README.md index 2677d02b132290..4b1061930c7708 100644 --- a/plugins/cloudbuild/README.md +++ b/plugins/cloudbuild/README.md @@ -1,140 +1,3 @@ -# Google Cloud Build Plugin +# Deprecated -### Welcome to the Google Cloud Build plugin! - -This plugin allows you to include Google Cloud Build history in your backstage CI/CD page. - - - -## Installation Steps - -### Install the plugin into backstage - -```bash -cd packages/app -yarn add @backstage/plugin-cloudbuild -``` - -### Modify EntityPage.tsx - -packages/app/src/components/catalog/EntityPage.tsx - -#### Add the Plugin import to the list of imports - -```diff -// packages/app/src/components/catalog/EntityPage.tsx -import { TechDocsAddons } from '@backstage/plugin-techdocs-react'; - -import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib'; - -+import { EntityCloudbuildContent, isCloudbuildAvailable } from '@backstage/plugin-cloudbuild'; -``` - -#### In your `cicdContent` constant, add the following switch case - -```diff -// packages/app/src/components/catalog/EntityPage.tsx -const cicdContent = ( - -+ -+ -+ - - - - -``` - -##### OPTIONAL - -If you don't use GitHub Actions, or don't want to show it on your CI/CD page, then you can remove the switch case for it: - -```diff -// packages/app/src/components/catalog/EntityPage.tsx -const cicdContent = ( - -+ -+ -+ - -- -- -- -``` - -### Add annotation(s) to your component-info.yaml file - -Any component, that you would like the Cloud Build Plugin to populate for, should include the following `cloudbuild-project-slug` annotation. This annotation sets the GCP project name to be used for pulling the Cloud Build details from. - -```diff -// component-info.yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: Backstage application. -+ annotations: -+ google.com/cloudbuild-project-slug: your-project-name -spec: - type: website - lifecycle: development -``` - -By default, the cloud build results list is filtered by repository name equal to the name you have set in your component-info.yaml file. This is `metadata.name`. So if your metadata.name is `backstage` then it will only show builds matching the backstage repo name. - -Additionally, build results are pulled from the `global` region by default. - -#### Change Filtering - -If you need the page to be filtered on a different repository name, then you can use the following annotation: - -```diff -// component-info.yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: Backstage application. - annotations: - google.com/cloudbuild-project-slug: your-project-name -+ google.com/cloudbuild-repo-name: my-backstage -spec: - type: website - lifecycle: development -``` - -You can also automatically filter the results based on trigger name instead of repository name. To do so, use the following annotation: - -```diff -// component-info.yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: Backstage application. - annotations: - google.com/cloudbuild-project-slug: your-project-name -+ google.com/cloudbuild-trigger-name: my-trigger-name -spec: - type: website - lifecycle: development -``` - -`Note:` The `cloudbuild-repo-name` annotation takes precedence over the `cloudbuild-trigger-name` annotation. So if you happen to use both annotations, cloudbuild-repo-name will be used. It is recommended to use one or the other if required. - -If you need to pull Cloud Build results from a location or region other than the global scope, then use the following annotation: - -```diff -// component-info.yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: Backstage application. - annotations: - google.com/cloudbuild-project-slug: your-project-name -+ google.com/cloudbuild-location: us-central1 -spec: - type: website - lifecycle: development -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-cloudbuild` instead. diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 02f2225e766dc7..074847e5631f73 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-cloudbuild", - "version": "0.5.1", + "version": "0.5.2", "description": "A Backstage plugin that integrates towards Google Cloud Build", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-cloudbuild" }, "publishConfig": { "access": "public", @@ -60,5 +61,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-cloudbuild instead." } diff --git a/plugins/code-climate/CHANGELOG.md b/plugins/code-climate/CHANGELOG.md index a91e6e20befb8e..ed34c3568dfe5a 100644 --- a/plugins/code-climate/CHANGELOG.md +++ b/plugins/code-climate/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-code-climate +## 0.1.35 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.34 ### Patch Changes diff --git a/plugins/code-climate/README.md b/plugins/code-climate/README.md index 8aff5cd9afd17a..6a665853780b1d 100644 --- a/plugins/code-climate/README.md +++ b/plugins/code-climate/README.md @@ -1,84 +1,3 @@ -# Code Climate Plugin +# Deprecated -The Code Climate Plugin displays a few stats from the quality section from [Code Climate](https://codeclimate.com). - -![Code Climate Card](./docs/code-climate-card.png) - -## Getting Started - -1. Install the Code Climate Plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-code-climate -``` - -2. Add the `EntityCodeClimateCard` to the EntityPage: - -```jsx -// packages/app/src/components/catalog/EntityPage.tsx - -import { EntityCodeClimateCard } from '@backstage/plugin-code-climate'; - -const overviewContent = ( - - // ... - - - - // ... - -); -``` - -3. Add the proxy config: - -```yaml -# app-config.yaml - -proxy: - '/codeclimate/api': - target: https://api.codeclimate.com/v1 - headers: - Authorization: Token token=${CODECLIMATE_TOKEN} -``` - -4. Create a new API access token (https://codeclimate.com/profile/tokens) and provide `CODECLIMATE_TOKEN` as an env variable. - -5. Add the `codeclimate.com/repo-id` annotation to your `catalog-info.yaml` file: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: | - Backstage is an open-source developer portal that puts the developer experience first. - annotations: - codeclimate.com/repo-id: YOUR_REPO_ID -spec: - type: library - owner: CNCF - lifecycle: experimental -``` - -### Demo Mode - -The plugin provides a MockAPI that always returns dummy data instead of talking to the Code Climate backend. -You can add it by overriding the `codeClimateApiRef`: - -```ts -// packages/app/src/apis.ts - -import { createApiFactory } from '@backstage/core-plugin-api'; -import { - MockCodeClimateApi, - codeClimateApiRef, -} from '@backstage/plugin-code-climate'; - -export const apis = [ - // ... - - createApiFactory(codeClimateApiRef, new MockCodeClimateApi()), -]; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-code-climate` instead. diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 2c67c7e8f9461c..827d913042fa06 100644 --- a/plugins/code-climate/package.json +++ b/plugins/code-climate/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-code-climate", - "version": "0.1.34", + "version": "0.1.35", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-code-climate" }, "publishConfig": { "access": "public", @@ -56,5 +57,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-code-climate instead." } diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index 9393181ba1d89d..bf5be395d169fc 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-code-coverage-backend +## 0.2.32 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration@1.10.0 + ## 0.2.31 ### Patch Changes diff --git a/plugins/code-coverage-backend/README.md b/plugins/code-coverage-backend/README.md index 42a9253efd5ac1..7f6f90ae1a038e 100644 --- a/plugins/code-coverage-backend/README.md +++ b/plugins/code-coverage-backend/README.md @@ -1,256 +1,3 @@ -# code-coverage-backend +# Deprecated -This is the backend part of the `code-coverage` plugin. It takes care of processing various coverage formats and standardizing them into a single json format, used by the frontend. - -## Installation - -```sh -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-code-coverage-backend -``` - -First create a `codecoverage.ts` file here: `packages/backend/src/plugins`. Now add the following as its content: - -```diff -diff --git a/packages/backend/src/plugins/codecoverage.ts b/packages/backend/src/plugins/codecoverage.ts ---- /dev/null -+++ b/packages/backend/src/plugins/codecoverage.ts -@@ -0,0 +1,15 @@ -+import { createRouter } from '@backstage/plugin-code-coverage-backend'; -+import { Router } from 'express'; -+import { PluginEnvironment } from '../types'; -+ -+export default async function createPlugin( -+ env: PluginEnvironment, -+): Promise { -+ return await createRouter({ -+ config: env.config, -+ discovery: env.discovery, -+ database: env.database, -+ urlReader: env.reader, -+ logger: env.logger, -+ }); -+} - -``` - -Finally we need to load the plugin in `packages/backend/src/index.ts`, make the following edits: - -```diff -diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts ---- a/packages/backend/src/index.ts -+++ b/packages/backend/src/index.ts -@@ -28,6 +28,7 @@ import scaffolder from './plugins/scaffolder'; - import proxy from './plugins/proxy'; - import techdocs from './plugins/techdocs'; - import search from './plugins/search'; -+import codeCoverage from './plugins/codecoverage'; - import { PluginEnvironment } from './types'; - import { ServerPermissionClient } from '@backstage/plugin-permission-node'; - import { DefaultIdentityClient } from '@backstage/plugin-auth-node'; -@@ -85,6 +86,9 @@ async function main() { - const techdocsEnv = useHotMemoize(module, () => createEnv('techdocs')); - const searchEnv = useHotMemoize(module, () => createEnv('search')); - const appEnv = useHotMemoize(module, () => createEnv('app')); -+ const codeCoverageEnv = useHotMemoize(module, () => -+ createEnv('code-coverage'), -+ ); - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); -@@ -93,6 +97,7 @@ async function main() { - apiRouter.use('/techdocs', await techdocs(techdocsEnv)); - apiRouter.use('/proxy', await proxy(proxyEnv)); - apiRouter.use('/search', await search(searchEnv)); -+ apiRouter.use('/code-coverage', await codeCoverage(codeCoverageEnv)); - - apiRouter.use(notFoundHandler()); -``` - -## New Backend System - -The code coverage backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff -+ backend.add(import('@backstage/plugin-code-coverage-backend')); -``` - -## Configuring your entity - -In order to use this plugin, you must set the `backstage.io/code-coverage` annotation. - -```yaml -metadata: - annotations: - backstage.io/code-coverage: enabled -``` - -There's a feature to only include files that are in VCS in the coverage report, this is helpful to not count generated files for example. To enable this set the `backstage.io/code-coverage` annotation to `scm-only`. - -```yaml -metadata: - annotations: - backstage.io/code-coverage: scm-only -``` - -Note: It may be required to set the [`backstage.io/source-location` annotation](https://backstage.io/docs/features/software-catalog/well-known-annotations#backstageiosource-location), however this should generally not be needed. - -## API - -### Adding a Cobertura report - -POST a Cobertura XML file to `/report` - -Example: - -```json -// curl -X POST -H "Content-Type:text/xml" -d @cobertura.xml "localhost:7007/api/code-coverage/report?entity=component:default/entity-name&coverageType=cobertura" -{ - "links": [ - { - "href": "http://localhost:7007/api/code-coverage/report?entity=component:default/entity-name", - "rel": "coverage" - } - ] -} -``` - -### Adding a JaCoCo report - -POST a JaCoCo XML file to `/report` - -Example: - -```json -// curl -X POST -H "Content-Type:text/xml" -d @jacoco.xml "localhost:7007/api/code-coverage/report?entity=component:default/entity-name&coverageType=jacoco" -{ - "links": [ - { - "href": "http://localhost:7007/api/code-coverage/report?entity=component:default/entity-name", - "rel": "coverage" - } - ] -} -``` - -### Adding a LCOV report - -POST a LCOV INFO file to `/report` - -Example: - -```json -// curl -X POST -H "Content-Type:text/plain" -d @coverage.info "localhost:7007/api/code-coverage/report?entity=component:default/entity-name&coverageType=lcov" -{ - "links": [ - { - "href": "http://localhost:7007/api/code-coverage/report?entity=component:default/entity-name", - "rel": "coverage" - } - ] -} -``` - -### Reading json coverage - -GET `/report` - -Example: - -```json -// curl localhost:7007/api/code-coverage/report?entity=component:default/entity-name -{ - "aggregate": { - "branch": { - "available": 0, - "covered": 0, - "missed": 0, - "percentage": 0 - }, - "line": { - "available": 5, - "covered": 4, - "missed": 1, - "percentage": 80 - } - }, - "entity": { - "kind": "Component", - "name": "entity-name", - "namespace": "default" - }, - "files": [ - { - "branchHits": {}, - "filename": "main.go", - "lineHits": { - "117": 12, - "142": 8, - "34": 8, - "42": 0, - "58": 6 - } - } - ] -} -``` - -### Coverage history - -GET `/history` - -Example - -```json -// curl localhost:7007/api/code-coverage/history?entity=component:default/entity-name -{ - "entity": { - "kind": "Component", - "name": "entity-name", - "namespace": "default" - }, - "history": [ - { - "branch": { - "available": 0, - "covered": 0, - "missed": 0, - "percentage": 0 - }, - "line": { - "available": 299, - "covered": 116, - "missed": 183, - "percentage": 38.8 - }, - "timestamp": 1615490766141 - }, - { - "branch": { - "available": 0, - "covered": 0, - "missed": 0, - "percentage": 0 - }, - "line": { - "available": 299, - "covered": 116, - "missed": 183, - "percentage": 38.8 - }, - "timestamp": 1615406307929 - } - ] -} -``` - -### Configuration - -Configure the plugin in your `app-config.yaml`: - -```yaml -codeCoverage: - bodySizeLimit: 100kb # Defaults to 100kb, see https://www.npmjs.com/package/body-parser#limit -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-code-coverage-backend` instead. diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 113485309a9e1f..eeb7c797777bc6 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-code-coverage-backend", - "version": "0.2.31", + "version": "0.2.32", "description": "A Backstage backend plugin that helps you keep track of your code coverage", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-code-coverage-backend" }, "publishConfig": { "access": "public", @@ -56,5 +57,6 @@ "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "xml2js": "^0.6.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-code-coverage-backend instead." } diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index 5e1de88fdd5bb0..8feb8542ebe943 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-code-coverage +## 0.2.28 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.27 ### Patch Changes diff --git a/plugins/code-coverage/README.md b/plugins/code-coverage/README.md index 4298c69b116a61..0f4a7c56a254cb 100644 --- a/plugins/code-coverage/README.md +++ b/plugins/code-coverage/README.md @@ -1,51 +1,3 @@ -# code-coverage +# Deprecated -This is the frontend part of the code-coverage plugin. It displays code coverage summaries for your entities. - -## Installation - -```sh -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-code-coverage -``` - -Finally you need to import and render the code coverage entity, in `packages/app/src/components/catalog/EntityPage.tsx` add the following: - -```diff -@@ -70,6 +70,7 @@ import { - - import { TechDocsAddons } from '@backstage/plugin-techdocs-react'; - import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib'; -+import { EntityCodeCoverageContent } from '@backstage/plugin-code-coverage'; - -@@ -226,6 +227,10 @@ const defaultEntityPage = ( - - {techdocsContent} - -+ -+ -+ -+ - - ); -``` - -## Configuring your entity - -In order to use this plugin, you must set the `backstage.io/code-coverage` annotation on entities for which coverage ingestion has been enabled. - -```yaml -metadata: - annotations: - backstage.io/code-coverage: enabled -``` - -There's a feature to only include files that are in VCS in the coverage report, this is helpful to not count generated files for example. To enable this set the `backstage.io/code-coverage` annotation to `scm-only`. - -```yaml -metadata: - annotations: - backstage.io/code-coverage: scm-only -``` - -Note: It may be required to set the [`backstage.io/source-location` annotation](https://backstage.io/docs/features/software-catalog/well-known-annotations#backstageiosource-location), however this should generally not be needed. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-code-coverage` instead. diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index a9d0ad7207a725..ab8e27b630a1f8 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,33 +1,37 @@ { "name": "@backstage/plugin-code-coverage", + "version": "0.2.28", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.2.27", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "backstage": { + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-code-coverage" + }, "publishConfig": { "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "frontend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/code-coverage" }, + "license": "Apache-2.0", "sideEffects": false, + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist" + ], "scripts": { "build": "backstage-cli package build", - "start": "backstage-cli package start", + "clean": "backstage-cli package clean", "lint": "backstage-cli package lint", - "test": "backstage-cli package test", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", - "clean": "backstage-cli package clean" + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/catalog-model": "workspace:^", @@ -44,11 +48,6 @@ "react-use": "^17.2.4", "recharts": "^2.5.0" }, - "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - }, "devDependencies": { "@backstage/cli": "workspace:^", "@backstage/dev-utils": "workspace:^", @@ -59,7 +58,10 @@ "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0", "@types/recharts": "^1.8.15" }, - "files": [ - "dist" - ] + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-router-dom": "6.0.0-beta.0 || ^6.3.0" + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-code-coverage instead." } diff --git a/plugins/codescene/CHANGELOG.md b/plugins/codescene/CHANGELOG.md index ed4e9b7fb5618b..3923a0e3890871 100644 --- a/plugins/codescene/CHANGELOG.md +++ b/plugins/codescene/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-codescene +## 0.1.27 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/theme@0.5.3 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.26 ### Patch Changes diff --git a/plugins/codescene/README.md b/plugins/codescene/README.md index 6770e34ddd85c6..693c977d22511b 100644 --- a/plugins/codescene/README.md +++ b/plugins/codescene/README.md @@ -1,101 +1,3 @@ -# codescene +# Deprecated -[CodeScene](https://codescene.com/) is a multi-purpose tool that connects code, businesses, and people. Discover hidden hazards and social trends in your code. Prioritise and minimise technical debt. - -The CodeScene Backstage Plugin provides a page component that displays a list of existing projects and associated analysis data on your CodeScene instance. - -![screenshot](./docs/codescene-plugin-screenshot.png) - -## Setup - -1. Install the plugin by running: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-codescene -``` - -2. Add the routes and pages to your `App.tsx`: - -```tsx -import { - CodeScenePage, - CodeSceneProjectDetailsPage, -} from '@backstage/plugin-codescene'; - -... - -} /> -} -/> -``` - -3. Add to the sidebar item routing to the new page: - -```tsx -// In packages/app/src/components/Root/Root.tsx -import { CodeSceneIcon } from '@backstage/plugin-codescene'; - -{ - /* other sidebar items... */ -} -; -``` - -4. Setup the `app-config.yaml` `codescene` proxy and configuration blocks: - -```yaml -proxy: - '/codescene-api': - target: '/api/v1' - allowedMethods: ['GET'] - allowedHeaders: ['Authorization'] - headers: - Authorization: Basic ${CODESCENE_AUTH_CREDENTIALS} -``` - -```yaml -codescene: - baseUrl: https://codescene.my-company.net # replace with your own URL -``` - -5. Adding the codescene plugin to Entity page: - -```yaml -# Add `codescene` annotations to the `catalog-info.yaml` of an entity. -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - annotations: - codescene.io/project-id: -``` - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx - -import { - CodeSceneEntityPage, - CodeSceneEntityFileSummary, - isCodeSceneAvailable, -} from '@backstage/plugin-codescene'; - -/* other EntityLayout.Route items... */ - - - - - - - - - - -; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-codescene` instead. diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index 3a17b700e3b6cc..cd43fb451ab78d 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-codescene", - "version": "0.1.26", + "version": "0.1.27", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-codescene" }, "publishConfig": { "access": "public", @@ -62,5 +63,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-codescene instead." } diff --git a/plugins/cost-insights-common/CHANGELOG.md b/plugins/cost-insights-common/CHANGELOG.md index 2bd7d1dc7639ad..da223e97141b24 100644 --- a/plugins/cost-insights-common/CHANGELOG.md +++ b/plugins/cost-insights-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-cost-insights-common +## 0.1.3 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.1.2 ### Patch Changes diff --git a/plugins/cost-insights-common/README.md b/plugins/cost-insights-common/README.md index 5140701987b909..31538355196ece 100644 --- a/plugins/cost-insights-common/README.md +++ b/plugins/cost-insights-common/README.md @@ -1,8 +1,3 @@ -# Cost Insights Common +# Deprecated -Shared isomorphic code for the cost-insights plugin. - -## Links - -- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/cost-insights) -- [The Backstage homepage](https://backstage.io) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-cost-insights-common` instead. diff --git a/plugins/cost-insights-common/package.json b/plugins/cost-insights-common/package.json index 6735674d00d6b4..20199ddaf712aa 100644 --- a/plugins/cost-insights-common/package.json +++ b/plugins/cost-insights-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-cost-insights-common", - "version": "0.1.2", + "version": "0.1.3", "description": "Common functionalities for the cost-insights plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-cost-insights-common" }, "publishConfig": { "access": "public", @@ -37,5 +38,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-cost-insights-common instead." } diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index 08c3f516fe56f7..a6662e2cd57536 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-cost-insights +## 0.12.24 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-cost-insights-common@0.1.3 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/theme@0.5.3 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.12.23 ### Patch Changes diff --git a/plugins/cost-insights/README.md b/plugins/cost-insights/README.md index b7bfa053cfbc3e..f048b7f522a2fb 100644 --- a/plugins/cost-insights/README.md +++ b/plugins/cost-insights/README.md @@ -1,244 +1,3 @@ -# Cost Insights +# Deprecated -Cost Insights is a plugin to help engineers visualize, understand and optimize their cloud costs. The Cost Insights page shows daily cost data for a team, trends over time, and comparisons with the business metrics you care about. - -At Spotify, we find that cloud costs are optimized organically when: - -- Engineers see cost data in their daily work (that is, in Backstage). -- It's clear when cloud costs need attention. -- The data is shown in software terms familiar to them. -- Alerts and recommendations are targeted and actionable. - -Cost Insights shows trends over time, at the granularity of Backstage catalog entities - rather than the cloud provider's concepts. It can be used to troubleshoot cost anomalies, and promote cost-saving infrastructure migrations. - -Learn more with the Backstage blog post [New Cost Insights plugin: The engineer's solution to taming cloud costs](https://backstage.io/blog/2020/10/22/cost-insights-plugin). - -## Install - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-cost-insights -``` - -## Setup - -1. Configure `app-config.yaml`. See [Configuration](#configuration). - -2. Create a CostInsights client. Clients must implement the [CostInsightsApi](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/api/CostInsightsApi.ts) interface. Create your own or [use a template](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/example/templates/CostInsightsClient.ts) to get started. - -Tip: You can also use the `ExampleCostInsightsClient` from `@backstage/plugin-cost-insights` to see how the plugin looks with some mock data. - -```ts -// path/to/CostInsightsClient.ts -import { CostInsightsApi } from '@backstage/plugin-cost-insights'; - -export class CostInsightsClient implements CostInsightsApi { ... } -``` - -**Note:** We've briefly explored using the AWS Cost Explorer API to implement a Cost Insights client. Learn more about our findings [here](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/contrib/aws-cost-explorer-api.md). - -3. Import the client and the Cost Insights plugin API to your Backstage instance. - -```ts -// packages/app/src/api.ts -import { createApiFactory } from '@backstage/core-plugin-api'; -import { costInsightsApiRef } from '@backstage/plugin-cost-insights'; -import { CostInsightsClient } from './path/to/file'; - -export const apis = [ - createApiFactory({ - api: costInsightsApiRef, - deps: {}, - factory: () => new CostInsightsClient(), - }), -]; -``` - -4. Add the `CostInsightsPage` extension to your `App.tsx`: - -```tsx -// packages/app/src/App.tsx -import { CostInsightsPage } from '@backstage/plugin-cost-insights'; - - - ... - } /> - ... -; -``` - -5. Add Cost Insights to your app Sidebar. - -To expose the plugin to your users, you can integrate the `cost-insights` route anyway that suits your application, but most commonly it is added to the Sidebar. - -```diff -// packages/app/src/components/Root/Root.tsx -+ import MoneyIcon from '@material-ui/icons/MonetizationOn'; - - ... - - export const Root = ({ children }: PropsWithChildren<{}>) => ( - - - - } to="/search"> - - {({ toggleModal }) => } - - - - - - - - {/* End global nav */} - - -+ - - - - - - - } - to="/settings" - > - - - - {children} - -); -``` - -## Configuration - -Cost Insights has only one required configuration field: `engineerCost` - the average yearly cost of an engineer including benefits. - -### Basic - -```yaml -## ./app-config.yaml -costInsights: - engineerCost: 200000 -``` - -### Products (Optional) - -For showing cost breakdowns you can define a map of cloud products. They must be defined as keys on the `products` field. A user-friendly name is **required**. - -You can optionally supply a product `icon` to display in Cost Insights navigation. See the [type file](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Icon.ts) for supported types and Material UI icon [mappings](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/utils/navigation.tsx). - -**Note:** Product keys should be unique and on `camelCase` form. Backstage does not support underscores in configuration keys. - -```yaml -## ./app-config.yaml -costInsights: - engineerCost: 200000 - products: - productA: - name: Some Cloud Product ## required - icon: storage - productB: - name: Some Other Cloud Product - icon: data -``` - -### Metrics (Optional) - -In the `Cost Overview` panel, users can choose from a dropdown of business metrics to see costs as they relate to a metric, such as daily active users. Metrics must be defined as keys on the `metrics` field. A user-friendly name is **required**. Metrics will be provided to the `getDailyMetricData` API method via the `metric` parameter. - -An optional `default` field can be set to `true` to set the default comparison metric to daily cost in the Cost Overview panel. - -```yaml -## ./app-config.yaml -costInsights: - engineerCost: 200000 - products: - productA: - name: Some Cloud Product - icon: storage - productB: - name: Some Other Cloud Product - icon: data - metrics: - metricA: - name: Metric A ## required - default: true - metricB: - name: Metric B - metricC: - name: Metric C -``` - -### Base Currency (Optional) - -In the case you would like to show your baseline costs on the graph on other currency than US dollars. - -```yaml -## ./app-config.yaml -costInsights: - engineerCost: 200000 - baseCurrency: - locale: nl-NL - options: - currency: EUR - minimumFractionDigits: 3 -``` - -### Currencies (Optional) - -In the `Cost Overview` panel, users can choose from a dropdown of currencies to see costs in, such as Engineers or USD. Currencies must be defined as keys on the `currencies` field. A user-friendly label and unit are **required**. If not set, the `defaultCurrencies` in `currency.ts` will be used. - -A currency without `kind` is reserved to calculate cost for `engineers`. There should only be one currency without `kind`. - -```yaml -## ./app-config.yaml -costInsights: - engineerCost: 200000 - products: - productA: - name: Some Cloud Product - icon: storage - productB: - name: Some Other Cloud Product - icon: data - currencies: - currencyA: - label: Currency A - unit: Unit A - currencyB: - label: Currency B - kind: CURRENCY_B - unit: Unit B - prefix: B - rate: 3.5 -``` - -### Engineer Threshold (Optional; default 0.5) - -This threshold determines whether to show 'Negligible', or a percentage with a fraction of 'engineers' for cost savings or cost excess on top of the charts. -A threshold of 0.5 means that `Negligible` is shown when the difference in costs is lower than that fraction of engineers in that time frame, -and show `XX% or ~N engineers` when it's above the threshold. - -```yaml -## ./app-config.yaml -costInsights: - engineerCost: 200000 - engineerThreshold: 0.5 -``` - -## Alerts - -The CostInsightsApi `getAlerts` method may return any type of alert or recommendation (called collectively "Action Items" in Cost Insights) that implements the [Alert type](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Alert.ts). This allows you to deliver any alerts or recommendations specific to your infrastructure or company migrations. - -To learn more about using Cost Insights' ready-to-use alerts, see the alerts [README](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/alerts/README.md). - -Example implementations of custom alerts, forms and components can be found in the [examples](https://github.com/backstage/backstage/tree/master/plugins/cost-insights/src/example) directory. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-cost-insights` instead. diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 820aadbef79c68..3d05da0e8e86a5 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-cost-insights", - "version": "0.12.23", + "version": "0.12.24", "description": "A Backstage plugin that helps you keep track of your cloud spend", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-cost-insights" }, "publishConfig": { "access": "public", @@ -80,5 +81,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-cost-insights instead." } diff --git a/plugins/dynatrace/CHANGELOG.md b/plugins/dynatrace/CHANGELOG.md index 0ad2555743ebf1..f18cbb7dbfec84 100644 --- a/plugins/dynatrace/CHANGELOG.md +++ b/plugins/dynatrace/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-dynatrace +## 10.0.4 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 10.0.3 ### Patch Changes diff --git a/plugins/dynatrace/README.md b/plugins/dynatrace/README.md index 73ac545265ffe1..3655334b05750c 100644 --- a/plugins/dynatrace/README.md +++ b/plugins/dynatrace/README.md @@ -1,119 +1,3 @@ -# Dynatrace +# Deprecated -Welcome to the Dynatrace plugin! - -![Example of the Dynatrace plugin](./assets/plugin.png) - -## Getting started - -This plugin uses the Backstage proxy to communicate with Dynatrace's REST APIs. - -### Setup - -#### Requirements - -##### Dynatrace API Key - -The Dynatrace plugin will require the following information, to be used in the configuration options detailed below: - -- Dynatrace API URL, e.g. `https://my-dynatrace-instance.dynatrace.com/api/v2` -- Dynatrace API access token (see [documentation](https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication)), with the following permissions: - - `entities.read` - - `problems.read` - - `DataExport` and/or `ExternalSyntheticIntegration` and/or `ReadSyntheticData` - -#### Install - -1. Install the plugin on your frontend: - -``` -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-dynatrace -``` - -2. We created in our catalog the interface for using the integration with Dynatrace. - -```diff -# packages/app/src/components/catalog/EntityPage.tsx - -[...] -+ import { DynatraceTab, isDynatraceAvailable } from '@backstage/plugin-dynatrace' - -[...] - -const serviceEntityPage = ( - - [...] -+ -+ -+ - -) - -``` - -#### Plugin Configuration - -This plugin requires a proxy endpoint for Dynatrace configured in `app-config.yaml` like so: - -```yaml -proxy: - endpoints: - '/dynatrace': - target: 'https://example.dynatrace.com/api/v2' - headers: - Authorization: 'Api-Token ${DYNATRACE_ACCESS_TOKEN}' -``` - -It also requires a `baseUrl` for rendering links to problems in the table like so: - -```yaml -dynatrace: - baseUrl: 'https://example.dynatrace.com' -``` - -#### Catalog Configuration - -##### View Recent Application Problems - -To show information from Dynatrace for a catalog entity, add the following annotation to `catalog-info.yaml`: - -```yaml -# catalog-info.yaml -# [...] -metadata: - annotations: - dynatrace.com/dynatrace-entity-id: DYNATRACE_ENTITY_ID -# [...] -``` - -The `DYNATRACE_ENTITY_ID` can be found in Dynatrace by browsing to the entity (a service, synthetic, frontend, workload, etc.). It will be located in the browser address bar in the `id` parameter and has the format `ENTITY_TYPE-ENTITY_ID`, where `ENTITY_TYPE` will be one of `SERVICE`, `SYNTHETIC_TEST`, or other, and `ENTITY_ID` will be a string of characters containing uppercase letters and numbers. - -##### Viewing Recent Synthetics Results - -To show recent results from a Synthetic Monitor, add the following annotation to `catalog-info.yaml`: - -```yaml -# catalog-info.yaml -# [...] -metadata: - annotations: - dynatrace.com/synthetics-ids: SYNTHETIC_ID, SYNTHETIC_ID_2, ... -# [...] -``` - -The annotation can also contain a comma or space separated list of Synthetic Ids to surface details for multiple monitors! - -The `SYNTHETIC_ID` can be found in Dynatrace by browsing to the Synthetic monitor. It will be located in the browser address bar in the resource path - `https://example.dynatrace.com/ui/http-monitor/HTTP_CHECK-1234` for an Http check, or `https://example.dynatrace.com/ui/browser-monitor/SYNTHETIC_TEST-1234` for a browser clickpath. - -## Contribution - -This plugin was originally built by [TELUS](https://github.com/telus). - -## Disclaimer - -This plugin is not officially supported by Dynatrace. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-dynatrace` instead. diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index babe6a2c76c8d1..10a9ac7eb31b33 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-dynatrace", - "version": "10.0.3", + "version": "10.0.4", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-dynatrace" }, "publishConfig": { "access": "public", @@ -55,5 +56,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-dynatrace instead." } diff --git a/plugins/entity-feedback-backend/CHANGELOG.md b/plugins/entity-feedback-backend/CHANGELOG.md index b4c6b9d8dfb28a..7ee96b0a4c7424 100644 --- a/plugins/entity-feedback-backend/CHANGELOG.md +++ b/plugins/entity-feedback-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-entity-feedback-backend +## 0.2.15 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-entity-feedback-common@0.1.4 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/plugin-auth-node@0.4.12 + ## 0.2.14 ### Patch Changes diff --git a/plugins/entity-feedback-backend/README.md b/plugins/entity-feedback-backend/README.md index cef580a580016f..1f9b13c8dd05da 100644 --- a/plugins/entity-feedback-backend/README.md +++ b/plugins/entity-feedback-backend/README.md @@ -1,71 +1,3 @@ -# Entity Feedback Backend +# Deprecated -Welcome to the entity-feedback backend plugin! - -## Installation - -Note: this plugin requires authentication and identity configured so Backstage can identify -which user has rated the entity. If you are using the guest identity provider which comes -out of the box, this plugin will not work when you test it. - -### Install the package - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-entity-feedback-backend -``` - -### Adding the plugin to your `packages/backend` - -You'll need to add the plugin to the router in your `backend` package. You can do this by creating a file called `packages/backend/src/plugins/entityFeedback.ts` - -```tsx -import { createRouter } from '@backstage/plugin-entity-feedback-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default function createPlugin(env: PluginEnvironment): Promise { - return createRouter({ - database: env.database, - discovery: env.discovery, - identity: env.identity, - logger: env.logger, - }); -} -``` - -With the `entityFeedback.ts` router setup in place, add the router to `packages/backend/src/index.ts`: - -```diff -+import entityFeedback from './plugins/entityFeedback'; - -async function main() { - ... - const createEnv = makeCreateEnv(config); - - const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); -+ const entityFeedbackEnv = useHotMemoize(module, () => createEnv('entityFeedback')); - - const apiRouter = Router(); -+ apiRouter.use('/entity-feedback', await entityFeedback(entityFeedbackEnv)); - ... - apiRouter.use(notFoundHandler()); - -``` - -### New Backend System - -The Entity Feedback backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import(@backstage/plugin-entity-feedback-backend)); - -backend.start(); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-entity-feedback-backend` instead. diff --git a/plugins/entity-feedback-backend/package.json b/plugins/entity-feedback-backend/package.json index 9531f25572ed3c..266e7726d27a60 100644 --- a/plugins/entity-feedback-backend/package.json +++ b/plugins/entity-feedback-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-entity-feedback-backend", - "version": "0.2.14", + "version": "0.2.15", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-entity-feedback-backend" }, "publishConfig": { "access": "public", @@ -52,5 +53,6 @@ "@backstage/cli": "workspace:^", "@types/supertest": "^2.0.12", "supertest": "^6.2.4" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-entity-feedback-backend instead." } diff --git a/plugins/entity-feedback-common/CHANGELOG.md b/plugins/entity-feedback-common/CHANGELOG.md index 8981c809528859..55486f8418ce50 100644 --- a/plugins/entity-feedback-common/CHANGELOG.md +++ b/plugins/entity-feedback-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-entity-feedback-common +## 0.1.4 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.1.3 ### Patch Changes diff --git a/plugins/entity-feedback-common/README.md b/plugins/entity-feedback-common/README.md index 430d14aeabde61..9cdc6ad25e54c9 100644 --- a/plugins/entity-feedback-common/README.md +++ b/plugins/entity-feedback-common/README.md @@ -1,3 +1,3 @@ -# Entity Feedback Common +# Deprecated -Common types for the entity-feedback plugin. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-entity-feedback-common` instead. diff --git a/plugins/entity-feedback-common/package.json b/plugins/entity-feedback-common/package.json index bc5d29ce7dbc8b..f6f25f94a39c05 100644 --- a/plugins/entity-feedback-common/package.json +++ b/plugins/entity-feedback-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-entity-feedback-common", - "version": "0.1.3", + "version": "0.1.4", "description": "Common functionalities for the entity-feedback plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-entity-feedback-common" }, "publishConfig": { "access": "public", @@ -34,5 +35,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-entity-feedback-common instead." } diff --git a/plugins/entity-feedback/CHANGELOG.md b/plugins/entity-feedback/CHANGELOG.md index ace50169c2cfbf..d7cdae264a6ec2 100644 --- a/plugins/entity-feedback/CHANGELOG.md +++ b/plugins/entity-feedback/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-entity-feedback +## 0.2.18 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-entity-feedback-common@0.1.4 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.17 ### Patch Changes diff --git a/plugins/entity-feedback/README.md b/plugins/entity-feedback/README.md index c405bd408347e2..1adc326b83c478 100644 --- a/plugins/entity-feedback/README.md +++ b/plugins/entity-feedback/README.md @@ -1,140 +1,3 @@ -# Entity Feedback Plugin +# Deprecated -Welcome to the entity-feedback plugin! - -This plugin allows you give and view feedback on entities available in the Backstage catalog. - -## Features - -### Rate entities - -#### Like/Dislike rating - -![Like dislike rating example](./docs/like-dislike-rating.png) - -#### Starred rating - -![Starred rating example](./docs/starred-rating.png) - -### Request additional feedback when poorly rated - -![Response dialog example](./docs/feedback-response-dialog.png) - -### View entity feedback responses - -![Feedback responses example](./docs/feedback-response-table.png) - -### View aggregated ratings on owned entities - -#### Total likes/dislikes - -![Like dislike table example](./docs/like-dislike-table.png) - -#### Star breakdowns - -![Starred rating table example](./docs/starred-rating-table.png) - -## Setup - -The following sections will help you get the Entity Feedback plugin setup and running. - -Note: this plugin requires authentication and identity configured so Backstage can identify -which user has rated the entity. If you are using the guest identity provider which comes -out of the box, this plugin will not work when you test it. - -### Backend - -You need to setup the [Entity Feedback backend plugin](https://github.com/backstage/backstage/tree/master/plugins/entity-feedback-backend) before you move forward with any of these steps if you haven't already - -### Installation - -Install this plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-entity-feedback -``` - -### Entity Pages - -Add rating and feedback components to your `EntityPage.tsx` to hook up UI so that users -can rate your entities and for owners to view feedback/responses. - -To allow users to apply "Like" and "Dislike" ratings add the following to each kind/type of -entity in your `EntityPage.tsx` you want to be rated (if you prefer to use star ratings, replace -`EntityLikeDislikeRatingsCard` with `EntityStarredRatingsCard` and `LikeDislikeButtons` with -`StarredRatingButtons`): - -```diff -import { - ... -+ InfoCard, - ... -} from '@backstage/core-components'; -+import { -+ EntityFeedbackResponseContent, -+ EntityLikeDislikeRatingsCard, -+ LikeDislikeButtons, -+} from '@backstage/plugin-entity-feedback'; - -// Add to each applicable kind/type of entity as desired -const overviewContent = ( - - ... -+ -+ -+ -+ -+ - ... - -); - -... - -// Add to each applicable kind/type of entity as desired -const serviceEntityPage = ( - - ... -+ -+ -+ - ... - -); - -... - -// Add ratings card component to user/group entities to view ratings of owned entities -const userPage = ( - - - - ... -+ -+ -+ - ... - - - - -); - -const groupPage = ( - - - - ... -+ -+ -+ - ... - - - - -); -``` - -Note: For a full example of this you can look at [this EntityPage](../../packages/app/src/components/catalog/EntityPage.tsx). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-entity-feedback` instead. diff --git a/plugins/entity-feedback/package.json b/plugins/entity-feedback/package.json index 614410b8762ac3..74033125e402bb 100644 --- a/plugins/entity-feedback/package.json +++ b/plugins/entity-feedback/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-entity-feedback", - "version": "0.2.17", + "version": "0.2.18", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-entity-feedback" }, "publishConfig": { "access": "public", @@ -56,5 +57,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-entity-feedback instead." } diff --git a/plugins/entity-validation/CHANGELOG.md b/plugins/entity-validation/CHANGELOG.md index dd6c335e0d68d4..526818f35497de 100644 --- a/plugins/entity-validation/CHANGELOG.md +++ b/plugins/entity-validation/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-entity-validation +## 0.1.20 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.19 ### Patch Changes diff --git a/plugins/entity-validation/README.md b/plugins/entity-validation/README.md index f831007a45bba0..20b58cb98fa31d 100644 --- a/plugins/entity-validation/README.md +++ b/plugins/entity-validation/README.md @@ -1,54 +1,3 @@ -# entity-validation +# Deprecated -This plugin creates a new page in Backstage where the user can validate the entities. - -![Entity Validation](./docs/entity-validation.png) - -## Getting started - -First of all, install the package in the `app` package by running the following command: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-entity-validation -``` - -Add the new route to the app by adding the following line: - -```typescript -// In packages/app/src/App.tsx -import { EntityValidationPage } from '@backstage/plugin-entity-validation'; - -const routes = ( - - {/* ...other routes */} - } /> - -); -``` - -To add the new page to your sidebar, you must include these lines in your `Root.tsx` file: - -```typescript - // In packages/app/src/components/Root/Root.tsx - import BuildIcon from '@material-ui/icons/Build'; - - ... - - export const Root = ({ children }: PropsWithChildren<{}>) => ( - - - {/* ...other elements */} - }> - {/* Global nav, not org-specific */} - {/* ...other sidebars */} - - {/* End global nav */} - - - {/* ...other elements */} - - {children} - - ); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-entity-validation` instead. diff --git a/plugins/entity-validation/package.json b/plugins/entity-validation/package.json index 5821a3cd7ad72a..bce5404f0f938e 100644 --- a/plugins/entity-validation/package.json +++ b/plugins/entity-validation/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-entity-validation", - "version": "0.1.19", + "version": "0.1.20", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-entity-validation" }, "publishConfig": { "access": "public", @@ -64,5 +65,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-entity-validation instead." } diff --git a/plugins/explore-backend/CHANGELOG.md b/plugins/explore-backend/CHANGELOG.md index ed4a4282fa9810..320ce4cdd76650 100644 --- a/plugins/explore-backend/CHANGELOG.md +++ b/plugins/explore-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-explore-backend +## 0.0.28 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-explore-common@0.0.3 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + - @backstage/plugin-search-backend-module-explore@0.1.22 + ## 0.0.27 ### Patch Changes diff --git a/plugins/explore-backend/README.md b/plugins/explore-backend/README.md index 6767749eab7ec9..88d606d396e2c7 100644 --- a/plugins/explore-backend/README.md +++ b/plugins/explore-backend/README.md @@ -1,222 +1,3 @@ -# explore-backend +# Deprecated -The `explore-backend` plugin provides a backend service for the Explore plugin. -This allows your organizations tools to be surfaced in the Explore plugin -through an API. It also provides a search collator to make it possible to search -for these tools. - -## Getting started - -### Adding the plugin to your `packages/backend` - -Install dependencies - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-explore-backend -``` - -Add feature - -```ts title="packages/backend/src/index.ts" -backend.add(import('@backstage/plugin-explore-backend')); -``` - -Config: - -```yaml -explore: - tools: - - title: New Relic - description: new relic plugin - url: /newrelic - image: https://i.imgur.com/L37ikrX.jpg - tags: - - newrelic - - proxy - - nerdGraph -``` - -### Adding the plugin to your `packages/backend` (old) - -#### Tools as Config - -Install dependencies - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-explore-backend -``` - -You'll need to add the plugin to the router in your `backend` package. You can -do this by creating a file called `packages/backend/src/plugins/explore.ts` with the following content: - -```ts title="packages/backend/src/plugins/explore.ts" -import { - createRouter, - StaticExploreToolProvider, -} from '@backstage/plugin-explore-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - logger: env.logger, - toolProvider: StaticExploreToolProvider.fromConfig(env.config), - }); -} -``` - -Config: - -```yaml -explore: - tools: - - title: New Relic - description: new relic plugin - url: /newrelic - image: https://i.imgur.com/L37ikrX.jpg - tags: - - newrelic - - proxy - - nerdGraph -``` - -#### Tools as Code - -Install dependencies - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-explore-backend @backstage/plugin-explore-common -``` - -You'll need to add the plugin to the router in your `backend` package. You can -do this by creating a file called `packages/backend/src/plugins/explore.ts` with the following content: - -```ts -import { - createRouter, - StaticExploreToolProvider, -} from '@backstage/plugin-explore-backend'; -import { ExploreTool } from '@backstage/plugin-explore-common'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -// List of tools you want to surface in the Explore plugin "Tools" page. -const exploreTools: ExploreTool[] = [ - { - title: 'New Relic', - description: 'new relic plugin', - url: '/newrelic', - image: 'https://i.imgur.com/L37ikrX.jpg', - tags: ['newrelic', 'proxy', 'nerdGraph'], - }, -]; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - logger: env.logger, - toolProvider: StaticExploreToolProvider.fromData(exploreTools), - }); -} -``` - -#### Register the plugin router - -With the `explore.ts` router setup in place, add the router to -`packages/backend/src/index.ts`: - -```diff -+import explore from './plugins/explore'; - -async function main() { - ... - const createEnv = makeCreateEnv(config); - - const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); -+ const exploreEnv = useHotMemoize(module, () => createEnv('explore')); - - const apiRouter = Router(); -+ apiRouter.use('/explore', await explore(exploreEnv)); - ... - apiRouter.use(notFoundHandler()); -``` - -### Wire up Search Indexing - -To index explore tools you will need to register the search collator in the -`packages/backend/src/plugins/search.ts` file. - -```diff -+import { ToolDocumentCollatorFactory } from '@backstage/plugin-explore-backend'; - -... - -+ // collator gathers entities from explore. -+ indexBuilder.addCollator({ -+ schedule, -+ factory: ToolDocumentCollatorFactory.fromConfig(env.config, { -+ discovery: env.discovery, -+ logger: env.logger, -+ }), -+ }); - -... -``` - -### Wire up the Frontend - -See [the explore plugin README](../explore/README.md) for more information. - -## Explore Tool Customization - -The `explore-backend` uses the `ExploreToolProvider` interface to provide a list -of tools used in your organization and/or within your Backstage instance. This -can be customized to provide tools from any source. For example you could create -a `CustomExploreToolProvider` that queries an internal for tools in your -`packages/backend/src/plugins/explore.ts` file. - -```ts -import { - createRouter, - StaticExploreToolProvider, -} from '@backstage/plugin-explore-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -class CustomExploreToolProvider implements ExploreToolProvider { - async getTools( - request: GetExploreToolsRequest, - ): Promise { - const externalTools = await queryExternalTools(request); - - const tools: ExploreTool[] = [ - ...externalTools, - // Backstage Tools - { - title: 'New Relic', - description: 'new relic plugin', - url: '/newrelic', - image: 'https://i.imgur.com/L37ikrX.jpg', - tags: ['newrelic', 'proxy', 'nerdGraph'], - }, - ]; - - return { tools }; - } -} - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - logger: env.logger, - toolProvider: new CustomExploreToolProvider(), - }); -} -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-explore-backend` instead. diff --git a/plugins/explore-backend/package.json b/plugins/explore-backend/package.json index 01caf183858178..4ac58d6279f51b 100644 --- a/plugins/explore-backend/package.json +++ b/plugins/explore-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-explore-backend", - "version": "0.0.27", + "version": "0.0.28", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-explore-backend" }, "publishConfig": { "access": "public", @@ -51,5 +52,6 @@ "@types/supertest": "^2.0.8", "supertest": "^6.2.4" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-explore-backend instead." } diff --git a/plugins/explore-common/CHANGELOG.md b/plugins/explore-common/CHANGELOG.md index a17d233c034e7f..62f1c7504e2790 100644 --- a/plugins/explore-common/CHANGELOG.md +++ b/plugins/explore-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-explore-common +## 0.0.3 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.0.2 ### Patch Changes diff --git a/plugins/explore-common/README.md b/plugins/explore-common/README.md index 7e8c835660aea4..371e41c72ead2e 100644 --- a/plugins/explore-common/README.md +++ b/plugins/explore-common/README.md @@ -1,3 +1,3 @@ -# explore-common +# Deprecated -Shared types for the `explore` plugin. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-explore-common` instead. diff --git a/plugins/explore-common/package.json b/plugins/explore-common/package.json index d9520a378e8c07..6e07ca082a94ac 100644 --- a/plugins/explore-common/package.json +++ b/plugins/explore-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-explore-common", - "version": "0.0.2", + "version": "0.0.3", "description": "Common functionalities for the explore plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-explore-common" }, "publishConfig": { "access": "public", @@ -36,5 +37,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-explore-common instead." } diff --git a/plugins/explore-react/CHANGELOG.md b/plugins/explore-react/CHANGELOG.md index b4222d65f38bdd..40f17425e4bec2 100644 --- a/plugins/explore-react/CHANGELOG.md +++ b/plugins/explore-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-explore-react +## 0.0.39 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-explore-common@0.0.3 + - @backstage/core-plugin-api@1.9.2 + ## 0.0.38 ### Patch Changes diff --git a/plugins/explore-react/README.md b/plugins/explore-react/README.md index 4a881955dfbca6..2b3c0ae882e277 100644 --- a/plugins/explore-react/README.md +++ b/plugins/explore-react/README.md @@ -1,4 +1,3 @@ -# explore-react +# Deprecated -This package provides helpers to the `explore` plugin that can be imported by -any other plugin or app. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-explore-react` instead. diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 10efe3c972fec5..523b431fe3aa85 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-explore-react", - "version": "0.0.38", + "version": "0.0.39", "description": "A frontend library for Backstage plugins that want to interact with the explore plugin", "backstage": { - "role": "web-library" + "role": "web-library", + "moved": "@backstage-community/plugin-explore-react" }, "publishConfig": { "access": "public", @@ -50,5 +51,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-explore-react instead." } diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index eb0b1dff13bb70..e1b9c5ae4c32c1 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-explore +## 0.4.21 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-explore-common@0.0.3 + - @backstage/plugin-explore-react@0.0.39 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/frontend-plugin-api@0.6.4 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-search-common@1.2.11 + - @backstage/plugin-search-react@1.7.10 + ## 0.4.20 ### Patch Changes diff --git a/plugins/explore/README.md b/plugins/explore/README.md index 24e6496cc3d9a1..d3ccc4a5336f89 100644 --- a/plugins/explore/README.md +++ b/plugins/explore/README.md @@ -1,148 +1,3 @@ -# explore +# Deprecated -Welcome to the explore plugin! - -This plugin helps to visualize the top level entities like domains, groups and tools in your ecosystem. - -## Setup - -The following sections will help you get the Explore plugin setup and running. - -### Backend - -You need to setup the -[Explore backend plugin](https://github.com/backstage/backstage/tree/master/plugins/explore-backend) -before you move forward with any of these steps if you haven't already. - -### Installation - -Install this plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-explore -``` - -### Add the plugin to your `packages/app` - -Add the root page that the playlist plugin provides to your app. You can choose -any path for the route, but we recommend the following: - -```diff -// packages/app/src/App.tsx -+ import { ExplorePage } from '@backstage/plugin-explore'; - -... - - - } /> - }> - {entityPage} - -+ } /> - ... - -``` - -You may also want to add a link to the playlist page to your application -sidebar: - -```diff -// packages/app/src/components/Root/Root.tsx -+import LayersIcon from '@material-ui/icons/Layers'; - -export const Root = ({ children }: PropsWithChildren<{}>) => ( - - -+ - ... - -``` - -### Use search result list item for Explore Tools - -When you have your `packages/app/src/components/search/SearchPage.tsx` file -ready to make modifications, add the following code snippet to add the -`ToolSearchResultListItem` when the type of the search results are -`tool`. - -```diff -+import { ToolSearchResultListItem } from '@backstage/plugin-explore'; -+import BuildIcon from '@material-ui/icons/Build'; - -const SearchPage = () => { - ... - - {({ results }) => ( - - {results.map(({ type, document, highlight, rank }) => { - switch (type) { - ... -+ case 'tools': -+ return ( -+ } -+ key={document.location} -+ result={document} -+ highlight={highlight} -+ rank={rank} -+ /> -+ ); - } - })} - - )} - ... - -... -``` - -## Customization - -Create a custom explore page in -`packages/app/src/components/explore/ExplorePage.tsx`. - -```tsx -import { - CatalogKindExploreContent, - ExploreLayout, -} from '@backstage/plugin-explore'; -import React from 'react'; -import { InnerSourceExploreContent } from './InnerSourceExploreContent'; - -export const ExplorePage = () => { - return ( - - - - - - - - - - - - ); -}; - -export const explorePage = ; -``` - -Now register the new explore page in `packages/app/src/App.tsx`. - -```diff -+import { explorePage } from './components/explore/ExplorePage'; - -const routes = ( - -- } /> -+ }> -+ {explorePage} -+ - -); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-explore` instead. diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 25b45df0238fc8..88ebc5285c3602 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-explore", - "version": "0.4.20", + "version": "0.4.21", "description": "A Backstage plugin for building an exploration page of your software ecosystem", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-explore" }, "publishConfig": { "access": "public" @@ -81,5 +82,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-explore instead." } diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index fad7b487cc5e5f..2653eeb34c5ce3 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-firehydrant +## 0.2.19 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.18 ### Patch Changes diff --git a/plugins/firehydrant/README.md b/plugins/firehydrant/README.md index aa56bd066a90a6..d11327445e1774 100644 --- a/plugins/firehydrant/README.md +++ b/plugins/firehydrant/README.md @@ -1,66 +1,3 @@ -# FireHydrant Plugin +# Deprecated -## Overview - -The [FireHydrant](https://firehydrant.io) plugin brings incident management to Backstage, and it displays service incidents information such as active incidents and incident analytics. There are also quick action links that let you create and view incidents in FireHydrant. - -FireHydrant plugin screenshot - -## Features - -- View total active incidents for a service declared in FireHydrant -- Quick links to the top 5 most recent active incidents in FireHydrant -- View incident metrics for a given service within the last 30 days, including: healthiness, total time impacted, total number of incidents, and MTT* (Mean Time To *) data such as MTTD (detect), MTTA (acknowledge), MTTM (mitigate) and MTTR (resolve). - -## Setup - -1. Install the plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-firehydrant -``` - -2. Add the plugin to `EntityPage.tsx`, inside the `const overviewContent`'s parent `` component: - -```ts -// In packages/app/src/components/catalog/EntityPage.tsx -import { FirehydrantCard } from '@backstage/plugin-firehydrant'; - -// Add to code as a grid item - - -; -``` - -3. Add proxy configuration to `app-config.yaml`: - -```yaml -proxy: - '/firehydrant/api': - target: 'https://api.firehydrant.io/v1/' - changeOrigin: true - headers: - # Supply the token you generated from https://app.firehydrant.io/organizations/bots - Authorization: Bearer ${FIREHYDRANT_BOT_TOKEN} -``` - -Note: if you are not using environment variables, you can directly type the API Bot Token into `app-config.yaml`: - -```yaml -proxy: -'/firehydrant/api': - target: 'https://api.firehydrant.io/v1/' - changeOrigin: true - headers: - # Supply the token you generated from https://app.firehydrant.io/organizations/bots - Authorization: Bearer fhb-e4911b22bcd788c4a4afeb0c111ffbfa -``` - -4. Optionally add an annotation to the yaml config file of a component - -```yaml -metadata: - annotations: - firehydrant.com/service-name: -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-firehydrant` instead. diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 327cac5c55379a..fc366b88000f60 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-firehydrant", - "version": "0.2.18", + "version": "0.2.19", "description": "A Backstage plugin that integrates towards FireHydrant", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-firehydrant" }, "publishConfig": { "access": "public", @@ -72,5 +73,6 @@ } } } - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-firehydrant instead." } diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index a24c51273c2b15..d7911f9ee9720f 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-fossa +## 0.2.67 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.66 ### Patch Changes diff --git a/plugins/fossa/README.md b/plugins/fossa/README.md index 2c69a9b309367f..021cf3b0e73a7b 100644 --- a/plugins/fossa/README.md +++ b/plugins/fossa/README.md @@ -1,119 +1,3 @@ -# FOSSA Plugin +# Deprecated -The FOSSA Plugin displays code statistics from [FOSSA](https://fossa.com/). - -![FOSSA Card](./docs/fossa-card.png) - -## Getting Started - -1. Install the FOSSA Plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-fossa -``` - -2. Add the `EntityFossaCard` to the EntityPage: - -```jsx -// packages/app/src/components/catalog/EntityPage.tsx - -import { EntityFossaCard } from '@backstage/plugin-fossa'; - -const OverviewContent = ({ entity }: { entity: Entity }) => ( - - // ... - - - - // ... - -); -``` - -3. Add the proxy config: - -```yaml -# app-config.yaml - -proxy: - '/fossa': - target: https://app.fossa.io/api - allowedMethods: ['GET'] - headers: - Authorization: token ${FOSSA_API_TOKEN} - -fossa: - # if you have a fossa organization, configure your id here - organizationId: - # if you have a self-managed fossa instance, - # configure the baseUrl to use for links to the fossa page here - externalLinkBaseUrl: -``` - -4. Get an api-token and provide `FOSSA_AUTH_HEADER` as env variable (https://app.fossa.com/account/settings/integrations/api_tokens) - -5. Add the `fossa.io/project-name` annotation to your catalog-info.yaml file: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: | - Backstage is an open-source developer portal that puts the developer experience first. - annotations: - fossa.io/project-name: YOUR_PROJECT_NAME -spec: - type: library - owner: CNCF - lifecycle: experimental -``` - -## Other Components - -### FOSSA Overview Page - -The plugin provides an optional page that can be used to check the license compliance of all components. - -![FOSSA Overview](./docs/fossa-overview.png) - -Add it to your Backstage application: - -1. Install the FOSSA Plugin (see [Getting Started](#getting-started)). - -2. Register the page: - -```tsx -// packages/app/src/App.tsx - -import { FossaPage } from '@backstage/plugin-fossa'; - -// ... - -const routes = ( - - // ... - } /> - -); -``` - -3. (Optional) Add a Sidebar Icon: - -```tsx -// packages/app/src/components/Root/Root.tsx - -// ... - -export const Root = ({ children }: PropsWithChildren<{}>) => ( - - - // ... - - // ... - - {children} - -); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-fossa` instead. diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index b9a5bb4df3d188..4ff2d9cf45ebe2 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-fossa", - "version": "0.2.66", + "version": "0.2.67", "description": "A Backstage plugin that integrates towards FOSSA", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-fossa" }, "publishConfig": { "access": "public", @@ -66,5 +67,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-fossa instead." } diff --git a/plugins/gcalendar/CHANGELOG.md b/plugins/gcalendar/CHANGELOG.md index 2b165ff4869a4e..f3f2bce5dd15cd 100644 --- a/plugins/gcalendar/CHANGELOG.md +++ b/plugins/gcalendar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-gcalendar +## 0.3.28 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + ## 0.3.27 ### Patch Changes diff --git a/plugins/gcalendar/README.md b/plugins/gcalendar/README.md index ccfcf9c4ebf094..85765846c0e3de 100644 --- a/plugins/gcalendar/README.md +++ b/plugins/gcalendar/README.md @@ -1,28 +1,3 @@ -# Google calendar plugin +# Deprecated -Plugin displays events from google calendar - -## Getting started - -The plugin exports `HomePageCalendar` widget for the Homepage. -If your homepage is not static JSX add `gcalendarApiRef` to the App's `apis.ts`: - -```ts -import { - GCalendarApiClient, - gcalendarApiRef, -} from '@backstage/plugin-gcalendar'; - -export const apis = [ - // ... - createApiFactory({ - api: gcalendarApiRef, - deps: { authApi: googleAuthApiRef, fetchApi: fetchApiRef }, - factory: deps => new GCalendarApiClient(deps), - }), -]; -``` - -You can also serve the plugin in isolation by running `yarn start` in the plugin directory. -This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. -It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-gcalendar` instead. diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index de3b964420ac8c..301607816f4940 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -1,32 +1,36 @@ { "name": "@backstage/plugin-gcalendar", - "version": "0.3.27", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "version": "0.3.28", + "backstage": { + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-gcalendar" + }, "publishConfig": { "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "frontend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/gcalendar" }, + "license": "Apache-2.0", "sideEffects": false, + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist" + ], "scripts": { - "start": "backstage-cli package start", "build": "backstage-cli package build", "clean": "backstage-cli package clean", - "test": "backstage-cli package test", "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/core-components": "workspace:^", @@ -44,11 +48,6 @@ "material-ui-popup-state": "^1.9.3", "react-use": "^17.2.4" }, - "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - }, "devDependencies": { "@backstage/cli": "workspace:^", "@backstage/dev-utils": "workspace:^", @@ -59,7 +58,10 @@ "@types/dompurify": "^3.0.0", "@types/sanitize-html": "^2.6.2" }, - "files": [ - "dist" - ] + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-router-dom": "6.0.0-beta.0 || ^6.3.0" + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-gcalendar instead." } diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index 25c92dc82401ec..824e009d9e8e76 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gcp-projects +## 0.3.51 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + ## 0.3.50 ### Patch Changes diff --git a/plugins/gcp-projects/README.md b/plugins/gcp-projects/README.md index 586cd7b6030c69..1e247a8834402c 100644 --- a/plugins/gcp-projects/README.md +++ b/plugins/gcp-projects/README.md @@ -1,13 +1,3 @@ -# gcp-projects +# Deprecated -Welcome to the gcp-projects plugin! - -_This plugin was created through the Backstage CLI_ - -## Getting started - -Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/gcp-projects](http://localhost:3000/gcp-projects). - -You can also serve the plugin in isolation by running `yarn start` in the plugin directory. -This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. -It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-gcp-projects` instead. diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index 6740c735ffe9c6..5f9debf21bfaa8 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-gcp-projects", - "version": "0.3.50", + "version": "0.3.51", "description": "A Backstage plugin that helps you manage projects in GCP", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-gcp-projects" }, "publishConfig": { "access": "public", @@ -54,5 +55,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-gcp-projects instead." } diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index 54e46507395b23..74282152f36381 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-git-release-manager +## 0.3.47 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/integration@1.10.0 + ## 0.3.46 ### Patch Changes diff --git a/plugins/git-release-manager/README.md b/plugins/git-release-manager/README.md index d9e17037811286..444e6f9fc0e4c2 100644 --- a/plugins/git-release-manager/README.md +++ b/plugins/git-release-manager/README.md @@ -1,59 +1,3 @@ -# Git Release Manager (GRM) +# Deprecated -## Overview - -`GRM` enables developers to manage their releases without having to juggle git commands. - -Does it build and ship your code? **No**. - -What `GRM` does is manage your Git **[releases](https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository)**, building and shipping is entirely up to you as a developer to handle in your CI. - -`GRM` is built with industry standards in mind and the flow is as follows: - -![](./src/features/Info/flow.png) - -> **Git**: The source control system where releases reside in a practical sense. Read more about [Git releases](https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository). (Note that this plugin works just as well with any system implementing `Git`.) -> -> **Release Candidate (RC)**: A Git pre-release intended primarily for internal testing -> -> **Release Version**: A Git release intended for end users - -Looking at the flow above, a common release lifecycle could be: - -- User presses **Create Release Candidate** - - `GRM` - 1. Creates a release branch `rc/` - 1. Creates Release Candidate tag `rc-` - 1. Creates a Git prerelease with Release Candidate tag - - Your CI - 1. Detects the new tag by matching the git reference `refs/tags/rc-.*` - 1. Builds and deploys to staging environment for testing -- User presses **Patch** - - `GRM` - 1. The selected commit is cherry-picked to the release branch - 1. The release tag is bumped - 1. Updates Git release's tag and description with the patch's details - - Your CI - 1. Detects the new tag by matching the git reference `refs/tags/(rc|version)-.*` (Release Versions are patchable as well) - 1. Builds and deploys to staging (or production if Release Version) for testing -- User presses **Promote Release Candidate to Release Version** - - `GRM` - 1. Creates Release Version tag `version-` - 1. Promotes the Git release by removing the prerelease flag - - Your CI - 1. Detects the new tag by matching the git reference `refs/tags/version-.*` - 1. Builds and deploys to production for testing - -## Usage - -### Importing - -The plugin exports a single full-page extension `GitReleaseManagerPage`, which one can add to an app like a usual top-level tool on a dedicated route. - -### Configuration - -The plugin is configurable either via props or the select elements on the page. - -If project configuration is provided via props, the select elements are disabled. It is also possible to omit features from the page via props, as well as attaching callbacks for successful executions. - -See the plugin's dev folder (`dev/index.tsx`) to see some examples. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-git-release-manager` instead. diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 2f9f22637152aa..078e30e1b65b0d 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-git-release-manager", - "version": "0.3.46", + "version": "0.3.47", "description": "A Backstage plugin that helps you manage releases in git", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-git-release-manager" }, "publishConfig": { "access": "public", @@ -60,5 +61,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-git-release-manager instead." } diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index 933af3aa8294d5..4cdfd3ebacc623 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-github-actions +## 0.6.16 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/integration@1.10.0 + - @backstage/integration-react@1.1.26 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.6.15 ### Patch Changes diff --git a/plugins/github-actions/README.md b/plugins/github-actions/README.md index 4be62346a5a263..e59cf46fd63f02 100644 --- a/plugins/github-actions/README.md +++ b/plugins/github-actions/README.md @@ -1,110 +1,3 @@ -# GitHub Actions Plugin +# Deprecated -Website: [https://github.com/actions](https://github.com/actions) - -## Screenshots - -TBD - -## Setup - -### Generic Requirements - -1. Provide OAuth credentials: - 1. [Create an OAuth App](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/) in the GitHub organization with the callback URL set to `http://localhost:7007/api/auth/github/handler/frame`. - 2. Take the Client ID and Client Secret from the newly created app's settings page and put them into `AUTH_GITHUB_CLIENT_ID` and `AUTH_GITHUB_CLIENT_SECRET` environment variables. -2. Annotate your component with a correct GitHub Actions repository and owner: - - The annotation key is `github.com/project-slug`. - - Example: - - ```yaml - apiVersion: backstage.io/v1alpha1 - kind: Component - metadata: - name: backstage - description: backstage.io - annotations: - github.com/project-slug: 'backstage/backstage' - spec: - type: website - lifecycle: production - owner: user:guest - ``` - -### Standalone app requirements - -1. Install the plugin dependency in your Backstage app package: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-github-actions -``` - -2. Add to the app `EntityPage` component: - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { - EntityGithubActionsContent, - isGithubActionsAvailable, -} from '@backstage/plugin-github-actions'; - -// You can add the tab to any number of pages, the service page is shown as an -// example here -const serviceEntityPage = ( - - {/* other tabs... */} - - - -``` - -3. Run the app with `yarn start` and the backend with `yarn start-backend`. - Then navigate to `/github-actions/` under any entity. - -### Self-hosted / Enterprise GitHub - -The plugin will try to use `backstage.io/source-location` or `backstage.io/managed-by-location` -annotations to figure out the location of the source code. - -1. Add the `host` and `apiBaseUrl` to your `app-config.yaml` - -```yaml -# app-config.yaml - -integrations: - github: - - host: 'your-github-host.com' - apiBaseUrl: 'https://api.your-github-host.com' -``` - -## Features - -- List workflow runs for a project -- Dive into one run to see a job steps -- Retry runs -- Pagination for runs - -## Limitations - -- There is a limit of 100 apps for one OAuth client/token pair -- The OAuth application must be at the GitHub organization level in order to display the workflows. If you do - not see any workflows, confirm the OAuth application was created in the organization and not a specific user account. - -## Optional Workflow Runs Card View - -Github Workflow Runs optional UI to show in Card view instead of table, with branch selection option - -```tsx - -// You can add the tab to any number of pages, the service page is shown as an -// example given here -const serviceEntityPage = ( - - {/* other tabs... */} - - - -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-github-actions` instead. diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 4b56d1bd0ca87f..991d7f4b2f6126 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-github-actions", - "version": "0.6.15", + "version": "0.6.16", "description": "A Backstage plugin that integrates towards GitHub Actions", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-github-actions" }, "publishConfig": { "access": "public", @@ -66,5 +67,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-github-actions instead." } diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index f9b83b40661c04..5be33bddd3d803 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-github-deployments +## 0.1.66 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/integration@1.10.0 + - @backstage/integration-react@1.1.26 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.65 ### Patch Changes diff --git a/plugins/github-deployments/README.md b/plugins/github-deployments/README.md index 111e028eedd970..a24625a0c92163 100644 --- a/plugins/github-deployments/README.md +++ b/plugins/github-deployments/README.md @@ -1,69 +1,3 @@ -# GitHub Deployments Plugin +# Deprecated -The GitHub Deployments Plugin displays recent deployments from GitHub. - -![github-deployments-card](./docs/github-deployments-card.png) - -## Prerequisites - -- [GitHub Authentication Provider](https://backstage.io/docs/auth/github/provider) - -## Getting Started - -1. Install the GitHub Deployments Plugin. - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-github-deployments -``` - -2. Add the `EntityGithubDeploymentsCard` to the EntityPage: - -```typescript -// packages/app/src/components/catalog/EntityPage.tsx - -import { EntityGithubDeploymentsCard } from '@backstage/plugin-github-deployments'; - -const OverviewContent = () => ( - - // ... - - - - // ... - -); -``` - -3. Add the `github.com/project-slug` annotation to your `catalog-info.yaml` file: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: | - Backstage is an open-source developer portal that puts the developer experience first. - annotations: - github.com/project-slug: YOUR_PROJECT_SLUG -spec: - type: library - owner: CNCF - lifecycle: experimental -``` - -### Self-hosted / Enterprise GitHub - -The plugin will try to use `backstage.io/source-location` or `backstage.io/managed-by-location` -annotations to figure out the location of the source code. - -1. Add the `host` and `apiBaseUrl` to your `app-config.yaml` - -```yaml -# app-config.yaml - -integrations: - github: - - host: 'your-github-host.com' - apiBaseUrl: 'https://api.your-github-host.com' -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-github-deployments` instead. diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index ee4787ff017d07..3d8ccdab99f483 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-github-deployments", - "version": "0.1.65", + "version": "0.1.66", "description": "A Backstage plugin that integrates towards GitHub Deployments", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-github-deployments" }, "publishConfig": { "access": "public", @@ -61,5 +62,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-github-deployments instead." } diff --git a/plugins/github-issues/CHANGELOG.md b/plugins/github-issues/CHANGELOG.md index ed5c4809d4eb66..2e62b554dfa9d4 100644 --- a/plugins/github-issues/CHANGELOG.md +++ b/plugins/github-issues/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-github-issues +## 0.4.2 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/integration@1.10.0 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.4.1 ### Patch Changes diff --git a/plugins/github-issues/README.md b/plugins/github-issues/README.md index f6b383bfcc92cb..e8b028cff8dec9 100644 --- a/plugins/github-issues/README.md +++ b/plugins/github-issues/README.md @@ -1,80 +1,3 @@ -# GitHub Issues plugin +# Deprecated -Welcome to the GitHub Issues plugin! - -Based on the [well-known GitHub slug annotation](https://backstage.io/docs/features/software-catalog/well-known-annotations#githubcomproject-slug) associated with the Entity, it renders the list of Open issues in GitHub. - -The plugin is designed to work with four Entity kinds, and it behaves a bit differently depending on that kind: - -- Kind: Group/User: plugin renders issues from all repositories for which the Entity is the owner. -- Kind: API/Component: plugin renders issues from only one repository assigned to the Entity - -**Issues are sorted from the recently updated DESC order (the plugin might not render all issues from a single repo next to each other).** - -## Prerequisites - -- [GitHub Authentication Provider](https://backstage.io/docs/auth/github/provider) - -## Usage - -Install the plugin by running the following command **from your Backstage root directory** - -`yarn --cwd packages/app add @backstage/plugin-github-issues` - -After installation, the plugin can be used as a Card or as a Page. - -```typescript -import { - GithubIssuesCard, - GithubIssuesPage, -} from '@backstage/plugin-github-issues'; - -// To use as a page Plugin needs to be wrapped in EntityLayout.Route -const RenderGitHubIssuesPage = () => ( - - - - - - - -); - -// To use as a card and make it render correctly please place it inside appropriate Grid elements -const RenderGitHubIssuesCard = () => ( - - - - - - - - - -); -``` - -## Configuration - -Both `GithubIssuesPage` and `GithubIssuesCard` provide default configuration. It is ready to use out of the box. -However, you can configure the plugin with props: - -- `itemsPerPage: number = 10` - Issues in the list are paginated, number of issues on a single page is controlled with this prop -- `itemsPerRepo: number = 40` - the plugin doesn't download all Issues available on GitHub. By default, it will get at most 40 Issues - this prop controls this behaviour -- `filterBy: object` - the plugin can be configured to filter the query by `assignee`, `createdBy`, `labels`, `states`, `mentioned` or `milestone`. -- `orderBy: object = { field: 'UPDATED_AT', direction: 'DESC' }` - The ordering that the issues are returned can be configured by the `orderBy` field. - -### `filterBy` and `orderBy` example - -```ts - -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-github-issues` instead. diff --git a/plugins/github-issues/package.json b/plugins/github-issues/package.json index 779392da038a4e..b01f4c66d2aa81 100644 --- a/plugins/github-issues/package.json +++ b/plugins/github-issues/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-github-issues", - "version": "0.4.1", + "version": "0.4.2", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-github-issues" }, "publishConfig": { "access": "public", @@ -58,5 +59,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-github-issues instead." } diff --git a/plugins/github-pull-requests-board/CHANGELOG.md b/plugins/github-pull-requests-board/CHANGELOG.md index 0efafd21391f7e..4cfd913ca84a01 100644 --- a/plugins/github-pull-requests-board/CHANGELOG.md +++ b/plugins/github-pull-requests-board/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-github-pull-requests-board +## 0.2.1 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/integration@1.10.0 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.0 ### Minor Changes diff --git a/plugins/github-pull-requests-board/README.md b/plugins/github-pull-requests-board/README.md index 61a54c427969cd..95156171e5eb78 100644 --- a/plugins/github-pull-requests-board/README.md +++ b/plugins/github-pull-requests-board/README.md @@ -1,79 +1,3 @@ -# GitHub Pull Requests Board Plugin +# Deprecated -The GitHub Pull Requests Board Plugin helps to visualise all **Open Pull Requests** related to the owned team repository. - -![github-pull-requests-board](./docs/pull-requests-board.png) - -It will help you and your team stay on top of open pull requests, hopefully reducing the time from open to merged. It's particularly useful when your team deals with many repositories. - -## Prerequisites - -- [GitHub Authentication Provider](https://backstage.io/docs/auth/github/provider) (With `read-only` permission granted for `Pull Requests`) - -## Getting started - -Install the plugin by running the following command **from your Backstage root directory** - -`yarn --cwd packages/app add @backstage/plugin-github-pull-requests-board` - -The plugin exports the **EntityTeamPullRequestsCard** component which can be added to the Overview page of the team at `backstage/packages/app/src/components/catalog/EntityPage.tsx` - -```javascript -import { EntityTeamPullRequestsCard } from '@backstage/plugin-github-pull-requests-board'; - -const groupPage = ( - - - - {entityWarningContent} - - - - - - - - - - - - - - - -); -``` - -Or you can also import the **EntityTeamPullRequestsContent** component which can be used to add a new tab under the group page at `backstage/packages/app/src/components/catalog/EntityPage.tsx` - -```javascript -import { EntityTeamPullRequestsContent } from '@backstage/plugin-github-pull-requests-board'; - -const groupPage = ( - - - - {entityWarningContent} - - - - - - - - - - - - - - - ; -) -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-github-pull-requests-board` instead. diff --git a/plugins/github-pull-requests-board/package.json b/plugins/github-pull-requests-board/package.json index dfd2138d5d5202..5b910874885686 100644 --- a/plugins/github-pull-requests-board/package.json +++ b/plugins/github-pull-requests-board/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-github-pull-requests-board", - "version": "0.2.0", + "version": "0.2.1", "description": "A Backstage plugin that allows you to see all open Pull Requests for all the repositories owned by your team", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-github-pull-requests-board" }, "publishConfig": { "access": "public", @@ -62,5 +63,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-github-pull-requests-board instead." } diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 12dbda176732fe..ff3e5017d3b2dc 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gitops-profiles +## 0.3.50 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + ## 0.3.49 ### Patch Changes diff --git a/plugins/gitops-profiles/README.md b/plugins/gitops-profiles/README.md index 472ea3cc4ecfac..7c13ca803f68c4 100644 --- a/plugins/gitops-profiles/README.md +++ b/plugins/gitops-profiles/README.md @@ -1,26 +1,3 @@ -# gitops-profiles +# Deprecated -Welcome to the gitops-profiles plugin! -This plugin is for creating GitOps-managed Kubernetes clusters. Currently, it supports provisioning EKS clusters on GitHub via GitHub Actions. - -_This plugin was created through the Backstage CLI_ - -## Plugin Development - -Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/gitops-clusters](http://localhost:3000/gitops-profiles). - -You can also serve the plugin in isolation by running `yarn start` in the plugin directory. -This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. -It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory. - -## Use GitOps-API backend with Backstage - -The backend of this plugin is written in Golang and its source code is available [here](https://github.com/chanwit/gitops-api) as a separate GitHub repository. -The binary of this plugin is available as a ready-to-use Docker image, [https://hub.docker.com/chanwit/gitops-api](https://hub.docker.com/chanwit/gitops-api). -To start using GitOps with Backstage, you have to start the backend using the following command: - -```bash -$ docker run -d --init -p 3008:8080 chanwit/gitops-api -``` - -Please note that this plugin requires the backend to run on port 3008. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-gitops-profiles` instead. diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 7a359d42b5553c..bc30c9372caa6b 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-gitops-profiles", - "version": "0.3.49", + "version": "0.3.50", "description": "A Backstage plugin that helps you manage GitOps profiles", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-gitops-profiles" }, "publishConfig": { "access": "public", @@ -58,5 +59,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-gitops-profiles instead." } diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md index d281e9a97fae13..03d06d80ab1abb 100644 --- a/plugins/gocd/CHANGELOG.md +++ b/plugins/gocd/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-gocd +## 0.1.41 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.40 ### Patch Changes diff --git a/plugins/gocd/README.md b/plugins/gocd/README.md index 4f42b011248989..368d87287467d3 100644 --- a/plugins/gocd/README.md +++ b/plugins/gocd/README.md @@ -1,56 +1,3 @@ -# GoCD +# Deprecated -This plugin is an open-source tool which is used in software development to help teams and organizations automate the continuous delivery of software. - -- View recent GoCD Builds - -![gocd-builds-card](./docs/gocd-plugin-screenshot.png) - -## Installation - -GoCD Plugin exposes an entity tab component named `EntityGoCdContent`. You can include it in the -[`EntityPage.tsx`](https://github.com/backstage/backstage/blob/master/packages/app/src/components/catalog/EntityPage.tsx)`: - -```tsx -// At the top imports -import { EntityGoCdContent } from '@backstage/plugin-gocd'; - -// Farther down at the component declaration -const componentEntityPage = ( - - {/* Place the following section where you want the tab to appear */} - - - -``` - -Now your plugin should be visible as a tab at the top of the entity pages, -specifically for components that are of the type `component`. -However, it warns of a missing `gocd.org/pipelines` annotation. - -Add the annotation to your component [catalog-info.yaml](https://github.com/backstage/backstage/blob/master/catalog-info.yaml). You can refer to multiple GoCD pipelines by defining their names separated by commas, as shown in the highlighted example below: - -```yaml -metadata: - annotations: - gocd.org/pipelines: '[,]' -``` - -The plugin requires to configure a GoCD API proxy with a `GOCD_AUTH_CREDENTIALS` for authentication in the [app-config.yaml](https://github.com/backstage/backstage/blob/master/app-config.yaml). Its value is an opaque token you can obtain directly from your GoCD instance, in the shape `base64(user + ':' + pass)`. For example, a user "root" and password "root" would become `base64('root:root') = cm9vdDpyb290`: - -```yaml -proxy: - '/gocd': - target: '/go/api' - allowedMethods: ['GET'] - allowedHeaders: ['Authorization'] - headers: - Authorization: Basic ${GOCD_AUTH_CREDENTIALS} -``` - -You should also include the `gocd` section to allow for the plugin to redirect back to GoCD pipelines in your deployed instance: - -```yaml -gocd: - baseUrl: -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-gocd` instead. diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index 6a9fffd7518806..2ea8cabcb1a230 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-gocd", - "version": "0.1.40", + "version": "0.1.41", "description": "A Backstage plugin that integrates towards GoCD", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-gocd" }, "publishConfig": { "access": "public", @@ -65,5 +66,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-gocd instead." } diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index 67558f57b789d0..537c050272b2ce 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-graphiql +## 0.3.8 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-compat-api@0.2.4 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-plugin-api@0.6.4 + ## 0.3.7 ### Patch Changes diff --git a/plugins/graphiql/README.md b/plugins/graphiql/README.md index ed47b9696708f5..48e44a6c5d4842 100644 --- a/plugins/graphiql/README.md +++ b/plugins/graphiql/README.md @@ -1,70 +1,3 @@ -# @backstage/plugin-graphiql +# Deprecated -This plugin integrates [GraphiQL](https://github.com/graphql/graphiql) as a tool to browse GraphiQL endpoints inside Backstage. - -The purpose of the plugin is to provide a convenient way for developers to try out GraphQL queries in their own environment. -By exposing GraphiQL as a plugin instead of a standalone app, it's possible to provide a preconfigured environment for engineers, and also tie into authentication providers already inside Backstage. - -## Getting Started - -### Installing the plugin - -Start out by installing the plugin in your Backstage app: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-graphiql -``` - -```diff -# in packages/app/src/App.tsx -+import { GraphiQLPage } from '@backstage/plugin-graphiql'; - - const routes = ( - -+ } /> -``` - -### Adding GraphQL endpoints - -For the plugin to function, you need to supply GraphQL endpoints through the GraphQLBrowse API. This is done by implementing the `graphQlBrowseApiRef` exported by this plugin. - -If all you need is a static list of endpoints, the plugin exports a `GraphQLEndpoints` class that implements the `GraphQLBrowseApi` for you. Here's an example of how you could expose two GraphQL endpoints in your App: - -```diff -# in packages/app/src/apis.ts -+import { -+ graphQlBrowseApiRef, -+ GraphQLEndpoints, -+} from '@backstage/plugin-graphiql'; - - export const apis = [ -+ createApiFactory({ -+ api: graphQlBrowseApiRef, -+ deps: { errorApi: errorApiRef, githubAuthApi: githubAuthApiRef }, -+ factory: ({ errorApi, githubAuthApi }) => -+ GraphQLEndpoints.from([ -+ // Use the .create function if all you need is a static URL and headers. -+ GraphQLEndpoints.create({ -+ id: 'gitlab', -+ title: 'GitLab', -+ url: 'https://gitlab.com/api/graphql', -+ // Optional extra headers -+ headers: { Extra: 'Header' }, -+ }), -+ { -+ id: 'hooli-search', -+ title: 'Hooli Search', -+ // Custom fetch function, this one is equivalent to using GraphQLEndpoints.create() -+ // with url set to https://internal.hooli.com/search -+ fetcher: async (params: any) => { -+ return fetch('https://internal.hooli.com/search', { -+ method: 'POST', -+ headers: { 'Content-Type': 'application/json' }, -+ body: JSON.stringify(params), -+ }).then(res => res.json()); -+ }, -+ } -+ ]), -+ }), -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-graphiql` instead. diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index eeaa0f8e68669c..eda912fcadc4b4 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-graphiql", - "version": "0.3.7", + "version": "0.3.8", "description": "Backstage plugin for browsing GraphQL APIs", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-graphiql" }, "publishConfig": { "access": "public" @@ -74,6 +75,7 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-graphiql instead.", "experimentalInstallationRecipe": { "type": "frontend-plugin", "steps": [ diff --git a/plugins/graphql-voyager/CHANGELOG.md b/plugins/graphql-voyager/CHANGELOG.md index 97eac3feccef21..1aeae60930f324 100644 --- a/plugins/graphql-voyager/CHANGELOG.md +++ b/plugins/graphql-voyager/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-graphql-voyager +## 0.1.17 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + ## 0.1.16 ### Patch Changes diff --git a/plugins/graphql-voyager/README.md b/plugins/graphql-voyager/README.md index d37ffdecca3f50..84b3e565c52ac8 100644 --- a/plugins/graphql-voyager/README.md +++ b/plugins/graphql-voyager/README.md @@ -1,76 +1,3 @@ -# graphql-voyager +# Deprecated -Welcome to the graphql-voyager plugin! - -Presents a graph structure of your entire GraphQL API, with tabs for multiple API urls: -![](./src/assets/plugin.png) - -## Getting started - -### Installing - -To get started, first install the plugin with the following command: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-graphql-voyager -``` - -### Adding the page - -In order to be able to navigate to the graphQL voyager page, a new route needs to be added to the app. This can be done in the following way: - -```tsx -// packages/app/App.tsx - - import { GraphQLVoyagerPage } from '@backstage/plugin-graphql-voyager'; - - const routes = ( - - }/> -``` - -### Configuration - -In order for the plugin to function correctly. GraphQL endpoints need to be added / configured through the GraphQLVoyager API. This can be done by implementing the `graphQlVoyagerApiRef` exported by this plugin. - -Add your own configuration to the `packages/app/src/apis.ts` file the following way: - -```ts -import { identityApiRef } from '@backstage/core-plugin-api'; -import { GraphQLVoyagerEndpoints } from '@backstage/plugin-graphql-voyager'; - -export const apis: AnyApiFactory[] = [ - createApiFactory({ - api: graphQlVoyagerApiRef, - deps: { identityApi: identityApiRef }, - factory: ({ identityApiRef }) => { - return GraphQLVoyagerEndpoints.from([ - { - id: `graphql-voyager-endpoint-id`, - title: 'endpoint-title', - introspectionErrorMessage: - 'Unable to perform introspection, make sure you are on the correct environment.', - introspection: async (query: any) => { - const token = 'someSecretJWTComingFromIdentityApiRef'; - - const res = await fetch('graphQLEndpoint', { - method: 'POST', - body: JSON.stringify({ query }), - headers: { - 'Content-Type': 'application/json', - Authorization: token, - }, - }); - - return res.json(); - }, - voyagerProps: { - hideDocs: true, - }, - }, - ]); - }, - }), -]; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-graphql-voyager` instead. diff --git a/plugins/graphql-voyager/package.json b/plugins/graphql-voyager/package.json index f7d8c49bea8a1c..cdddda96979b57 100644 --- a/plugins/graphql-voyager/package.json +++ b/plugins/graphql-voyager/package.json @@ -1,33 +1,37 @@ { "name": "@backstage/plugin-graphql-voyager", + "version": "0.1.17", "description": "Backstage plugin for GraphQL Voyager", - "version": "0.1.16", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "backstage": { + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-graphql-voyager" + }, "publishConfig": { "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "frontend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/graphql-voyager" }, + "license": "Apache-2.0", "sideEffects": false, + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist" + ], "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", + "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/core-components": "workspace:^", @@ -37,11 +41,6 @@ "graphql-voyager": "^1.0.0-rc.31", "react-use": "^17.2.4" }, - "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - }, "devDependencies": { "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", @@ -49,7 +48,10 @@ "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^15.0.0" }, - "files": [ - "dist" - ] + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-router-dom": "6.0.0-beta.0 || ^6.3.0" + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-graphql-voyager instead." } diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index 6b0033cf9276a1..6b6cd86049e977 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-ilert +## 0.2.24 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.2.23 ### Patch Changes diff --git a/plugins/ilert/README.md b/plugins/ilert/README.md index 434cf8c0f0278e..fb8875a9d6d1c8 100644 --- a/plugins/ilert/README.md +++ b/plugins/ilert/README.md @@ -1,127 +1,3 @@ -# @backstage/plugin-ilert +# Deprecated -## Introduction - -[iLert](https://www.ilert.com) is a platform for alerting, on-call management and uptime monitoring. It helps teams to reduce response times to critical incidents by extending monitoring tools with reliable alerting, automatic escalations, on-call schedules and other features to support the incident response process, such as informing stakeholders or creating tickets in external incident management tools. - -## Overview - -This plugin gives an overview about ongoing iLert incidents, on-call and uptime monitor status. -See who is on-call, which incidents are active and trigger incidents directly from backstage for the configured alert sources. - -In detail this plugin provides: - -- Information details about the person on-call (all escalation levels of the current time) -- A way to override the current on-call person -- A list of active incidents -- A way to trigger a new incident -- A way to reassign/acknowledge/resolve an incident -- A way to trigger an incident action -- A way to trigger an immediate maintenance -- A way to disable/enable an alert source -- A list of uptime monitors - -## Setup instructions - -Install the plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-ilert -``` - -Add it to the `EntityPage.tsx`: - -```ts -import { - isPluginApplicableToEntity as isILertAvailable, - EntityILertCard, -} from '@backstage/plugin-ilert'; - -// ... - - - - - - -; -// ... -``` - -> To force an iLert card for each entity just add the `` component. An instruction card will appear if no integration key is set. - -## Add iLert explorer to the app sidebar - -Modify your app routes in [`App.tsx`](https://github.com/backstage/backstage/blob/master/packages/app/src/App.tsx) to include the Router component exported by the plugin - for example: - -```tsx -import { ILertPage } from '@backstage/plugin-ilert'; - - // ... - } /> - // ... -; -``` - -Modify your sidebar in [`Root.tsx`](https://github.com/backstage/backstage/blob/master/packages/app/src/components/Root/Root.tsx) to include the icon component exported by the plugin - for example: - -```tsx -import { ILertIcon } from '@backstage/plugin-ilert'; - - // ... - - // ... -; -``` - -## Client configuration - -If you want to override the default URL for api calls and detail pages, you can add it to `app-config.yaml`. - -In `app-config.yaml`: - -```yaml -ilert: - baseUrl: https://my-org.ilert.com/ -``` - -## Providing the Authorization Header - -In order to make the API calls, you need to provide a new proxy config which will redirect to the [iLert API](https://api.ilert.com/api-docs/) endpoint. It needs an [Authorization Header](https://api.ilert.com/api-docs/#section/Authentication). - -Add the proxy configuration in `app-config.yaml` - -```yaml -proxy: - ... - '/ilert': - target: https://api.ilert.com - allowedMethods: ['GET', 'POST', 'PUT'] - allowedHeaders: ['Authorization'] - headers: - Authorization: ${ILERT_AUTH_HEADER} -``` - -Then start the backend, passing the authorization header (bearer token or basic auth) as environment variable: - -```bash -$ ILERT_AUTH_HEADER='' yarn start -``` - -## Integration Key - -The information displayed for each entity is based on the alert source integration key. - -### Adding the integration key to the entity annotation - -If you want to use this plugin for an entity, you need to label it with the below annotation: - -```yml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: example - annotations: - ilert.com/integration-key: [INTEGRATION_KEY] -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-ilert` instead. diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index c4608dceba51e2..9c6de57aa5458c 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-ilert", - "version": "0.2.23", + "version": "0.2.24", "description": "A Backstage plugin that integrates towards iLert", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-ilert" }, "publishConfig": { "access": "public", @@ -61,5 +62,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-ilert instead." } diff --git a/plugins/jenkins-backend/CHANGELOG.md b/plugins/jenkins-backend/CHANGELOG.md index a62c615b59905e..06e1698cb6ff66 100644 --- a/plugins/jenkins-backend/CHANGELOG.md +++ b/plugins/jenkins-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-jenkins-backend +## 0.4.5 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-jenkins-common@0.1.26 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-node@1.11.1 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-node@0.7.28 + ## 0.4.4 ### Patch Changes diff --git a/plugins/jenkins-backend/README.md b/plugins/jenkins-backend/README.md index 4cca86f86d91d2..a31890d88075b1 100644 --- a/plugins/jenkins-backend/README.md +++ b/plugins/jenkins-backend/README.md @@ -1,255 +1,3 @@ -# Jenkins Plugin (Alpha) +# Deprecated -Welcome to the Jenkins backend plugin! Website: [https://jenkins.io/](https://jenkins.io/) - -This is the backend half of the 2 Jenkins plugins and is responsible for: - -- finding an appropriate instance of Jenkins for an entity -- finding the appropriate job(s) on that instance for an entity -- connecting to Jenkins and gathering data to present to the frontend - -## New Backend System - -The jenkins backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - const backend = createBackend(); - // ... other feature additions - backend.add(import('@backstage/plugin-jenkins-backend')); - backend.start(); -``` - -## Integrating into a backstage instance - -This plugin needs to be added to an existing backstage instance. - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-jenkins-backend -``` - -Typically, this means creating a `src/plugins/jenkins.ts` file and adding a reference to it to `src/index.ts` - -### jenkins.ts - -```typescript -import { - createRouter, - DefaultJenkinsInfoProvider, -} from '@backstage/plugin-jenkins-backend'; -import { CatalogClient } from '@backstage/catalog-client'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const catalog = new CatalogClient({ - discoveryApi: env.discovery, - }); - - return await createRouter({ - logger: env.logger, - jenkinsInfoProvider: DefaultJenkinsInfoProvider.fromConfig({ - config: env.config, - catalog, - }), - permissions: env.permissions, - }); -} -``` - -### src/index.ts - -```diff -diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts -index f2b14b2..2c64f47 100644 ---- a/packages/backend/src/index.ts -+++ b/packages/backend/src/index.ts -@@ -22,6 +22,7 @@ import { Config } from '@backstage/config'; - import app from './plugins/app'; -+import jenkins from './plugins/jenkins'; - import scaffolder from './plugins/scaffolder'; -@@ -56,6 +57,7 @@ async function main() { - const authEnv = useHotMemoize(module, () => createEnv('auth')); -+ const jenkinsEnv = useHotMemoize(module, () => createEnv('jenkins')); - const proxyEnv = useHotMemoize(module, () => createEnv('proxy')); -@@ -63,6 +65,7 @@ async function main() { - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); -+ apiRouter.use('/jenkins', await jenkins(jenkinsEnv)); - apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv)); -``` - -This plugin must be provided with a JenkinsInfoProvider, this is a strategy object for finding the Jenkins instance and job for an entity. - -There is a standard one provided, but the Integrator is free to build their own. - -### DefaultJenkinsInfoProvider - -Allows configuration of either a single or multiple global Jenkins instances and annotating entities with the job name on that instance (and optionally the name of the instance). - -#### Example - Single global instance - -The following will look for jobs for this entity at `https://jenkins.example.com/job/teamA/job/artistLookup-build` - -Config - -```yaml -jenkins: - baseUrl: https://jenkins.example.com - username: backstage-bot - apiKey: 123456789abcdef0123456789abcedf012 - # optionally add extra headers - # extraRequestHeaders: - # extra-header: my-value -``` - -Catalog - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: artist-lookup - annotations: - 'jenkins.io/job-full-name': teamA/artistLookup-build -``` - -The old annotation name of `jenkins.io/github-folder` is equivalent to `jenkins.io/job-full-name` - -#### Example - Multiple global instances - -The following will look for jobs for this entity at `https://jenkins-foo.example.com/job/teamA/job/artistLookup-build` - -Config - -```yaml -jenkins: - instances: - - name: default - baseUrl: https://jenkins.example.com - username: backstage-bot - apiKey: 123456789abcdef0123456789abcedf012 - - name: departmentFoo - baseUrl: https://jenkins-foo.example.com - username: backstage-bot - apiKey: 123456789abcdef0123456789abcedf012 -``` - -Catalog - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: artist-lookup - annotations: - 'jenkins.io/job-full-name': departmentFoo:teamA/artistLookup-build -``` - -If the `departmentFoo:` part is omitted, the default instance will be assumed. - -The following config is an equivalent (but less clear) version of the above: - -```yaml -jenkins: - baseUrl: https://jenkins.example.com - username: backstage-bot - apiKey: 123456789abcdef0123456789abcedf012 - instances: - - name: departmentFoo - baseUrl: https://jenkins-foo.example.com - username: backstage-bot - apiKey: 123456789abcdef0123456789abcedf012 -``` - -### Custom JenkinsInfoProvider - -An example of a bespoke JenkinsInfoProvider which uses an organisation specific annotation to look up the Jenkins info (including jobFullName): - -```typescript -class AcmeJenkinsInfoProvider implements JenkinsInfoProvider { - constructor(private readonly catalog: CatalogClient) {} - - async getInstance(opt: { - entityRef: EntityName; - jobFullName?: string; - }): Promise { - const PAAS_ANNOTATION = 'acme.example.com/paas-project-name'; - - // lookup pass-project-name from entity annotation - const entity = await this.catalog.getEntityByRef(opt.entityRef); - if (!entity) { - throw new Error( - `Couldn't find entity with name: ${stringifyEntityRef(opt.entityRef)}`, - ); - } - - const paasProjectName = entity.metadata.annotations?.[PAAS_ANNOTATION]; - if (!paasProjectName) { - throw new Error( - `Couldn't find paas annotation (${PAAS_ANNOTATION}) on entity with name: ${stringifyEntityRef( - opt.entityRef, - )}`, - ); - } - - // lookup department and team for paas project name - const { team, dept } = this.lookupPaasInfo(paasProjectName); - - const baseUrl = `https://jenkins-${dept}.example.com/`; - const jobFullName = `${team}/${paasProjectName}`; - const username = 'backstage-bot'; - const apiKey = this.getJenkinsApiKey(paasProjectName); - const creds = btoa(`${username}:${apiKey}`); - - return { - baseUrl, - headers: { - Authorization: `Basic ${creds}`, - }, - jobFullName, - }; - } - - private lookupPaasInfo(_: string): { team: string; dept: string } { - // Mock implementation, this would get info from the paas system somehow in reality. - return { - team: 'teamA', - dept: 'DepartmentFoo', - }; - } - - private getJenkinsApiKey(_: string): string { - // Mock implementation, this would get info from the paas system somehow in reality. - return '123456789abcdef0123456789abcedf012'; - } -} -``` - -No config would be needed if using this JenkinsInfoProvider - -A Catalog entity of the following will look for jobs for this entity at `https://jenkins-departmentFoo.example.com/job/teamA/job/artistLookupService` - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: artist-lookup - annotations: - 'acme.example.com/paas-project-name': artistLookupService -``` - -## Jenkins' terminology notes - -The domain model for Jenkins is not particularly clear but for the purposes of this plugin the following model has been assumed: - -Jenkins contains a tree of *job*s which have children of either; other *job*s (making it a _folder_) or *build*s (making it a _project_). -Concepts like _pipeline_ and *view*s are meaningless (pipelines are just jobs for our purposes, views are (as the name suggests) just views of subsets of jobs) - -A _job full name_ is a slash separated list of the names of the job, and the folders which contain it. For example `teamA/artistLookupService/develop`, and the same way that a filesystem path has folders and file names. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-jenkins-backend` instead. diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index a074ebb33378db..bfa7c586c0478d 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-jenkins-backend", - "version": "0.4.4", + "version": "0.4.5", "description": "A Backstage backend plugin that integrates towards Jenkins", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-jenkins-backend" }, "publishConfig": { "access": "public", @@ -56,5 +57,6 @@ "@types/jenkins": "^1.0.0", "@types/supertest": "^2.0.8" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-jenkins-backend instead." } diff --git a/plugins/jenkins-common/CHANGELOG.md b/plugins/jenkins-common/CHANGELOG.md index 8ec0a7dc2441b6..3f5c97d2db49f6 100644 --- a/plugins/jenkins-common/CHANGELOG.md +++ b/plugins/jenkins-common/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-jenkins-common +## 0.1.26 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-permission-common@0.7.13 + ## 0.1.25 ### Patch Changes diff --git a/plugins/jenkins-common/README.md b/plugins/jenkins-common/README.md index 54a79fc2876cf0..b22a05247c2ae0 100644 --- a/plugins/jenkins-common/README.md +++ b/plugins/jenkins-common/README.md @@ -1,3 +1,3 @@ -# Jenkins Common +# Deprecated -Shared isomorphic code for the Jenkins plugin. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-jenkins-common` instead. diff --git a/plugins/jenkins-common/package.json b/plugins/jenkins-common/package.json index f29dbfe86bd506..194c68a40127af 100644 --- a/plugins/jenkins-common/package.json +++ b/plugins/jenkins-common/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-jenkins-common", - "version": "0.1.25", + "version": "0.1.26", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-jenkins-common" }, "publishConfig": { "access": "public", @@ -37,5 +38,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-jenkins-common instead." } diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index 30ba37caeb571a..bfda21ec4787cb 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-jenkins +## 0.9.10 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-jenkins-common@0.1.26 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.9.9 ### Patch Changes diff --git a/plugins/jenkins/README.md b/plugins/jenkins/README.md index bdbe0ac0d9c0e7..c7a86e2d03bf78 100644 --- a/plugins/jenkins/README.md +++ b/plugins/jenkins/README.md @@ -1,135 +1,3 @@ -# Jenkins Plugin (Alpha) +# Deprecated -Website: [https://jenkins.io/](https://jenkins.io/) - -Last master build -Folder results -Build details -Job builds records -Modify Table Columns - -## Setup - -1. If you have a standalone app (you didn't clone this repo), then do - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-jenkins -``` - -2. Add and configure the [jenkins-backend](../jenkins-backend) plugin according to it's instructions - -3. Add the `EntityJenkinsContent` extension to the `CI/CD` page and `EntityLatestJenkinsRunCard` to the `overview` page in the app (or wherever you'd prefer): - -Note that if you configured a custom JenkinsInfoProvider in step 2, you may need a custom isJenkinsAvailable. Also if you're transitioning to a new default branch name, you can pass multiple branch names as a comma-separated list and it will check for each branch name. - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { - EntityJenkinsContent, - EntityLatestJenkinsRunCard, - isJenkinsAvailable, -} from '@backstage/plugin-jenkins'; - -// You can add the tab to any number of pages, the service page is shown as an -// example here -const serviceEntityPage = ( - - - {/* ... */} - - - - - - - {/* ... */} - - - {/* other tabs... */} - - - - - - {/* ... */} - - - {/* ... */} - -); -``` - -4. Run app with `yarn start` -5. Add the Jenkins folder annotation to your `catalog-info.yaml`. - -Currently, this plugin only supports folders and Git SCM. -Note that if you configured a custom JenkinsInfoProvider in step 2, you may need to use a different annotation scheme here - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: 'your-component' - description: 'a description' - annotations: - jenkins.io/github-folder: 'folder-name/project-name' # deprecated - jenkins.io/job-full-name: 'folder-name/project-name' # use this instead - -spec: - type: service - lifecycle: experimental - owner: your-name -``` - -7. Register your component - -8. Click the component in the catalog. You should now see Jenkins builds, and a - last build result for your master build. - -## Features - -- View all runs inside a folder -- Last build status for specified branch -- View summary of a build - -## Limitations - -- Only works with organization folder projects backed by GitHub -- No pagination support currently, limited to 50 projects - don't run this on a - Jenkins instance with lots of builds - -## EntityJobRunsTable - -- View all builds of a particular job -- shows average build time for successful builds - -## Modify Columns of EntityJenkinsContent - -- now you can pass down column props to show the columns/metadata as per your use case. - -```tsx -export const generatedColumns: TableColumn[] = [ - { - title: 'Timestamp', - field: 'lastBuild.timestamp', - render: (row: Partial) => ( - <> - - {` - ${new Date(row.lastBuild?.timestamp).toLocaleDateString()} - ${new Date(row.lastBuild?.timestamp).toLocaleTimeString()} - `} - - - ), - }, -] - -// ... - -// ... -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-jenkins` instead. diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 3aff7f3c3247e8..0f02a478536b9d 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-jenkins", - "version": "0.9.9", + "version": "0.9.10", "description": "A Backstage plugin that integrates towards Jenkins", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-jenkins" }, "publishConfig": { "access": "public", @@ -62,5 +63,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-jenkins instead." } diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index 065cecc13174ff..f2c73fecbbbd9f 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-kafka-backend +## 0.3.16 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.3.15 ### Patch Changes diff --git a/plugins/kafka-backend/README.md b/plugins/kafka-backend/README.md index 637a5773e04858..5d8adb6e93bae9 100644 --- a/plugins/kafka-backend/README.md +++ b/plugins/kafka-backend/README.md @@ -1,55 +1,3 @@ -# Kafka Backend +# Deprecated -This is the backend part of the Kafka plugin. It responds to Kafka requests -from the frontend. - -## Configuration - -This configures how to connect to the brokers in your Kafka cluster. - -### `clientId` - -The name of the client to use when connecting to the cluster. - -### `brokers` - -A list of the brokers' host names and ports to connect to. - -### `ssl` (optional) - -Configure TLS connection to the Kafka cluster. The options are passed directly -to [tls.connect] and used to create the TLS secure context. Normally these -would include `key` and `cert`. - -Example: - -```yaml -kafka: - clientId: backstage - clusters: - - name: prod - brokers: - - localhost:9092 -``` - -### `sasl` (optional) - -Configure SASL authentication for the Kafka client. - -```yaml -kafka: - clientId: backstage - clusters: - - name: prod - brokers: - - my-cluster:9092 - ssl: true - sasl: - mechanism: plain # or 'scram-sha-256' or 'scram-sha-512' - username: my-username - password: my-password -``` - -### ACLs - -If you are using ACLs on Kafka, you will need to have the `DESCRIBE` ACL on both consumer groups and topics. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-kafka-backend` instead. diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index ea2c531945738f..593e2b30bc6d37 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-kafka-backend", - "version": "0.3.15", + "version": "0.3.16", "description": "A Backstage backend plugin that integrates towards Kafka", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-kafka-backend" }, "publishConfig": { "access": "public" @@ -68,5 +69,6 @@ "jest-when": "^3.1.0", "supertest": "^6.1.3" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-kafka-backend instead." } diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index a63148623b4dbd..62d7f77a396d06 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-kafka +## 0.3.35 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.3.34 ### Patch Changes diff --git a/plugins/kafka/README.md b/plugins/kafka/README.md index 77106baba76157..09d2cada11ca34 100644 --- a/plugins/kafka/README.md +++ b/plugins/kafka/README.md @@ -1,119 +1,3 @@ -# Kafka Plugin +# Deprecated - - -## Setup - -1. Run: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-kafka -yarn --cwd packages/backend add @backstage/plugin-kafka-backend -``` - -2. Add the plugin backend: - -In a new file named `kafka.ts` under `backend/src/plugins`: - -```js -import { createRouter } from '@backstage/plugin-kafka-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - logger: env.logger, - config: env.config, - }); -} -``` - -And then add to `packages/backend/src/index.ts`: - -```js -// In packages/backend/src/index.ts -import kafka from './plugins/kafka'; -// ... -async function main() { - // ... - const kafkaEnv = useHotMemoize(module, () => createEnv('kafka')); - // ... - apiRouter.use('/kafka', await kafka(kafkaEnv)); -``` - -3. Add the plugin as a tab to your service entities: - -```jsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { EntityKafkaContent } from '@backstage/plugin-kafka'; - -const serviceEntityPage = ( - - {/* other tabs... */} - - - -``` - -4. Add broker configs for the backend in your `app-config.yaml` (see - [kafka-backend](https://github.com/backstage/backstage/blob/master/plugins/kafka-backend/README.md) - for more options): - -```yaml -kafka: - clientId: backstage - clusters: - - name: cluster-name - brokers: - - localhost:9092 -``` - -5. Add the `kafka.apache.org/consumer-groups` annotation to your services: - -Can be a comma separated list. - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - kafka.apache.org/consumer-groups: cluster-name/consumer-group-name -spec: - type: service -``` - -6. Configure dashboard urls: - -You have two options. -Either configure it with an annotation called `kafka.apache.org/dashboard-urls` - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - kafka.apache.org/dashboard-urls: cluster-name/consumer-group-name/dashboard-url -spec: - type: service -``` - -> The consumer-group-name is optional. - -or with configs in `app-config.yaml` - -```yaml -kafka: - # ... - clusters: - - name: cluster-name - dashboardUrl: https://dashboard.com -``` - -## Features - -- List topics offsets and consumer group offsets for configured services. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-kafka` instead. diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 449648879de0f2..5f3737dc200801 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-kafka", - "version": "0.3.34", + "version": "0.3.35", "description": "A Backstage plugin that integrates towards Kafka", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-kafka" }, "publishConfig": { "access": "public", @@ -57,5 +58,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-kafka instead." } diff --git a/plugins/lighthouse-backend/CHANGELOG.md b/plugins/lighthouse-backend/CHANGELOG.md index 483fc7f45bf3df..a6d14cdd01f678 100644 --- a/plugins/lighthouse-backend/CHANGELOG.md +++ b/plugins/lighthouse-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-lighthouse-backend +## 0.4.11 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-lighthouse-common@0.1.6 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/backend-tasks@0.5.22 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-node@1.11.1 + ## 0.4.10 ### Patch Changes diff --git a/plugins/lighthouse-backend/README.md b/plugins/lighthouse-backend/README.md index df6c2415d9a300..c6f9098380d28d 100644 --- a/plugins/lighthouse-backend/README.md +++ b/plugins/lighthouse-backend/README.md @@ -1,96 +1,3 @@ -# Lighthouse Backend +# Deprecated -Lighthouse Backend allows you to run scheduled lighthouse Tests for each Website with the annotation `lighthouse.com/website-url`. - -## Setup - -1. Install the plugin using: - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-lighthouse-backend -``` - -2. Create a `lighthouse.ts` file inside `packages/backend/src/plugins/`: - -```typescript -import { createScheduler } from '@backstage/plugin-lighthouse-backend'; -import { PluginEnvironment } from '../types'; -import { CatalogClient } from '@backstage/catalog-client'; - -export default async function createPlugin(env: PluginEnvironment) { - const { logger, scheduler, config, tokenManager } = env; - - const catalogClient = new CatalogClient({ - discoveryApi: env.discovery, - }); - - await createScheduler({ - logger, - scheduler, - config, - catalogClient, - tokenManager, - }); -} -``` - -3. Modify your `packages/backend/src/index.ts` to include: - -```diff - ... - - import { Config } from '@backstage/config'; - import app from './plugins/app'; -+import lighthouse from './plugins/lighthouse'; - import scaffolder from './plugins/scaffolder'; - - ... - - async function main() { - - ... - - const authEnv = useHotMemoize(module, () => createEnv('auth')); -+ const lighthouseEnv = useHotMemoize(module, () => createEnv('lighthouse')); - const proxyEnv = useHotMemoize(module, () => createEnv('proxy')); - - ... - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); - apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv)); - -+ await lighthouse(lighthouseEnv) -``` - -#### New Backend System - -The Lighthouse backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import('@backstage/plugin-lighthouse-backend')); - - backend.start(); -``` - -## Configuration - -You can define how often and when the scheduler should run the audits: - -```yaml -lighthouse: - schedule: - frequency: - hours: 12 # Default: 1 day - timeout: - minutes: 30 # Default: 10 minutes -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-lighthouse-backend` instead. diff --git a/plugins/lighthouse-backend/package.json b/plugins/lighthouse-backend/package.json index 1f10624a2cfb36..0a190d5f71fc25 100644 --- a/plugins/lighthouse-backend/package.json +++ b/plugins/lighthouse-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-lighthouse-backend", - "version": "0.4.10", + "version": "0.4.11", "description": "Backend functionalities for lighthouse", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-lighthouse-backend" }, "publishConfig": { "access": "public", @@ -53,5 +54,6 @@ "devDependencies": { "@backstage/cli": "workspace:^" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-lighthouse-backend instead." } diff --git a/plugins/lighthouse-common/CHANGELOG.md b/plugins/lighthouse-common/CHANGELOG.md index 71fa3402594485..03b62d3290df18 100644 --- a/plugins/lighthouse-common/CHANGELOG.md +++ b/plugins/lighthouse-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-lighthouse-common +## 0.1.6 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/config@1.2.0 + ## 0.1.5 ### Patch Changes diff --git a/plugins/lighthouse-common/README.md b/plugins/lighthouse-common/README.md index 9ab6d9a86df1a2..ad1a90bf7cd067 100644 --- a/plugins/lighthouse-common/README.md +++ b/plugins/lighthouse-common/README.md @@ -1,3 +1,3 @@ -# @backstage/plugin-lighthouse-common +# Deprecated -Common types and functionalities for lighthouse, to be shared between lighthouse and lighthouse-backend. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-lighthouse-common` instead. diff --git a/plugins/lighthouse-common/package.json b/plugins/lighthouse-common/package.json index 1c5976f508d43c..2a3bab3738fe43 100644 --- a/plugins/lighthouse-common/package.json +++ b/plugins/lighthouse-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-lighthouse-common", - "version": "0.1.5", + "version": "0.1.6", "description": "Common functionalities for lighthouse, to be shared between lighthouse and lighthouse-backend plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-lighthouse-common" }, "publishConfig": { "access": "public", @@ -43,5 +44,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-lighthouse-common instead." } diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index 3bab01fe9c277f..0d59f49acc23e9 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-lighthouse +## 0.4.20 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-lighthouse-common@0.1.6 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.4.19 ### Patch Changes diff --git a/plugins/lighthouse/README.md b/plugins/lighthouse/README.md index ee0e1dfd1d15d1..d2294949811d4a 100644 --- a/plugins/lighthouse/README.md +++ b/plugins/lighthouse/README.md @@ -1,115 +1,3 @@ -# @backstage/plugin-lighthouse +# Deprecated -A frontend for [lighthouse-audit-service](https://github.com/spotify/lighthouse-audit-service), this plugin allows you to trigger Lighthouse audits on websites and track them over time. - -## Introduction - -Google's [Lighthouse](https://developers.google.com/web/tools/lighthouse) auditing tool for websites -is a great open-source resource for benchmarking and improving the accessibility, performance, SEO, and best practices of your site. -At Spotify, we keep track of Lighthouse audit scores over time to look at trends and overall areas for investment. - -This plugin allows you to generate on-demand Lighthouse audits for websites, and to track the trends for the -top-level categories of Lighthouse at a glance. - -You can learn more in our blog post [Introducing Lighthouse for Backstage](https://backstage.io/blog/2020/04/06/lighthouse-plugin). - -| List of audits | Specific audit | -| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| ![Screen shot of the main Lighthouse plugin page](images/lighthouse-page.png) | ![Screen shot of the resulting audit in the Lighthouse plugin](images/audit-view.png) | - -In the future, we hope to add support for scheduling audits (which we do internally), as well as allowing -custom runs of Lighthouse to be ingested (for auditing sites that require authentication or some session state). - -## Getting Started - -To get started, you will need a running instance of [`lighthouse-audit-service`](https://github.com/spotify/lighthouse-audit-service). -_It's likely you will need to [enable CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) to integrate with Backstage, so initialize the `lighthouse-audit-service` with the environment variable `LAS_CORS` set to `true`._ - -When you have an instance running that Backstage can hook into, first install the plugin into your app: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-lighthouse -``` - -Modify your app routes in `App.tsx` to include the `LighthousePage` component exported from the plugin, for example: - -```tsx -// In packages/app/src/App.tsx -import { LighthousePage } from '@backstage/plugin-lighthouse'; - -const routes = ( - - {/* ...other routes */} - } /> -``` - -Then configure the `lighthouse-audit-service` URL in your [`app-config.yaml`](https://github.com/backstage/backstage/blob/master/app-config.yaml). - -```yaml -backend: - csp: - frame-src: - - http://your-service-url -lighthouse: - baseUrl: http://your-service-url -``` - -## Integration with the Catalog - -The Lighthouse plugin can be integrated into the catalog so that Lighthouse audit information relating to a component -can be displayed within that component's entity page. In order to link an Entity to its Lighthouse audits, the entity -must be annotated as follows: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - lighthouse.com/website-url: # A single website url e.g. https://backstage.io/ -``` - -> NOTE: The plugin only supports one website URL per component at this time. - -Add a Lighthouse tab to the entity page: - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { EntityLighthouseContent } from '@backstage/plugin-lighthouse'; - -const websiteEntityPage = ( - - {/* other tabs... */} - - - -``` - -> NOTE: The embedded router renders page content without a header section -> allowing it to be rendered within a catalog plugin page. - -Add a **Lighthouse card** to the overview tab on the EntityPage: - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { - EntityLastLighthouseAuditCard, - isLighthouseAvailable, -} from '@backstage/plugin-lighthouse'; - -const overviewContent = ( - - {/* ...other content */} - - - - - - - -``` - -## Schedule - -If you want to run automated scheduled runs, you can install the [@backstage/lighthouse-backend](../lighthouse-backend/README.md) plugin +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-lighthouse` instead. diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 7605aeb6e1078d..b1aa3ad3674f53 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-lighthouse", - "version": "0.4.19", + "version": "0.4.20", "description": "A Backstage plugin that integrates towards Lighthouse", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-lighthouse" }, "publishConfig": { "access": "public", @@ -78,5 +79,6 @@ } } } - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-lighthouse instead." } diff --git a/plugins/linguist-backend/CHANGELOG.md b/plugins/linguist-backend/CHANGELOG.md index 6ab8a6dd4c0e63..cb25dd07669897 100644 --- a/plugins/linguist-backend/CHANGELOG.md +++ b/plugins/linguist-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-linguist-backend +## 0.5.16 + +### Patch Changes + +- 3905997: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-linguist-common@0.1.3 + ## 0.5.15 ### Patch Changes diff --git a/plugins/linguist-backend/README.md b/plugins/linguist-backend/README.md index 8939bbe3030c79..a303374a398e7c 100644 --- a/plugins/linguist-backend/README.md +++ b/plugins/linguist-backend/README.md @@ -1,281 +1,3 @@ -# Linguist Backend +# Deprecated -Welcome to the Linguist backend plugin! This plugin provides data for the Linguist frontend features. Additionally, it provides an optional entity processor which will automate adding language tags to your entities. - -## Setup - -The following sections will help you get the Linguist Backend plugin setup and running. - -### Up and Running - -Here's how to get the backend up and running: - -1. First we need to add the `@backstage/plugin-linguist-backend` package to your backend: - - ```sh - # From the Backstage root directory - yarn --cwd packages/backend add @backstage/plugin-linguist-backend - ``` - -2. Then we will create a new file named `packages/backend/src/plugins/linguist.ts`, and add the - following to it: - - ```ts - import { TaskScheduleDefinition } from '@backstage/backend-tasks'; - import { createRouter } from '@backstage/plugin-linguist-backend'; - import { Router } from 'express'; - import type { PluginEnvironment } from '../types'; - - export default async function createPlugin( - env: PluginEnvironment, - ): Promise { - const schedule: TaskScheduleDefinition = { - frequency: { minutes: 2 }, - timeout: { minutes: 15 }, - initialDelay: { seconds: 90 }, - }; - - return createRouter({ schedule: schedule }, { ...env }); - } - ``` - -3. Next we wire this into the overall backend router, edit `packages/backend/src/index.ts`: - - ```ts - import linguist from './plugins/linguist'; - // ... - async function main() { - // ... - // Add this line under the other lines that follow the useHotMemoize pattern - const linguistEnv = useHotMemoize(module, () => createEnv('linguist')); - // ... - // Insert this line under the other lines that add their routers to apiRouter in the same way - apiRouter.use('/linguist', await linguist(linguistEnv)); - ``` - -4. Now run `yarn start-backend` from the repo root -5. Finally open `http://localhost:7007/api/linguist/health` in a browser and it should return `{"status":"ok"}` - -#### New Backend System - -The Linguist backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import('@backstage/plugin-linguist-backend')); - - backend.start(); -``` - -The plugin options can be set through the `app-config.yaml`: - -```yaml -// ... - -linguist: - schedule: - frequency: - minutes: 2 - timeout: - minutes: 2 - initialDelay: - seconds: 15 - age: - days: 30 - batchSize: 2 - useSourceLocation: false - -// ... -``` - -## Plugin Option - -The Linguist backend has various plugin options that you can provide to the `createRouter` function in your `packages/backend/src/plugins/linguist.ts` file that will allow you to configure various aspects of how it works. The following sections go into the details of these options - -### Batch Size - -The Linguist backend is setup to process entities by acting as a queue where it will pull down all the applicable entities from the Catalog and add them to it's database (saving just the `entityRef`). Then it will grab the `n` oldest entities that have not been processed to determine their languages and process them. To control the batch size simply provide that to the `createRouter` function in your `packages/backend/src/plugins/linguist.ts` like this: - -```ts -return createRouter({ schedule: schedule, batchSize: 40 }, { ...env }); -``` - -**Note:** The default batch size is 20 - -### Kind - -The default setup only processes entities of kind `['API', 'Component', 'Template']`. To control the `kind` that are processed provide that to the `createRouter` function in your `packages/backend/src/plugins/linguist.ts` like this: - -```ts -return createRouter({ schedule: schedule, kind: ['Component'] }, { ...env }); -``` - -### Refresh - -The default setup will only generate the language breakdown for entities with the linguist annotation that have not been generated yet. If you want this process to also refresh the data you can do so by adding the `age` (as a `HumanDuration`) in your `packages/backend/src/plugins/linguist.ts` when you call `createRouter`: - -```ts -return createRouter({ schedule: schedule, age: { days: 30 } }, { ...env }); -``` - -With the `age` setup like this if the language breakdown is older than 15 days it will get regenerated. It's recommended that if you choose to use this configuration to set it to a large value - 30, 90, or 180 - as this data generally does not change drastically. - -### Linguist JS options - -The default setup will use the default [linguist-js](https://www.npmjs.com/package/linguist-js) options, a full list of the available options can be found [here](https://www.npmjs.com/package/linguist-js#API). - -```ts -return createRouter( - { schedule: schedule, linguistJsOptions: { offline: true } }, - { ...env }, -); -``` - -### Use Source Location - -You may wish to use the `backstage.io/source-location` annotation over using the `backstage.io/linguist` as you may not be able to quickly add that annotation to your Entities. To do this you'll just need to set the `useSourceLocation` boolean to `true` in your `packages/backend/src/plugins/linguist.ts` when you call `createRouter`: - -```ts -return createRouter( - { schedule: schedule, useSourceLocation: true }, - { ...env }, -); -``` - -**Note:** This has the potential to cause a lot of processing, be very thoughtful about this before hand - -## Linguist Tags Processor - -The `LinguistTagsProcessor` can be added into your catalog builder as a way to incorporate the language breakdown from linguist as `metadata.tags` on your entities. Doing so enables the ability to easily filter for entities in your catalog index based on the language of the source repository. - -### Processor Setup - -Setup the linguist tag processor in `packages/backend/src/plugins/catalog.ts`. - -```ts -import { LinguistTagsProcessor } from '@backstage/plugin-linguist-backend'; -// ... -export default async function createPlugin( - // ... - builder.addProcessor( - LinguistTagsProcessor.fromConfig(env.config, { - logger: env.logger, - discovery: env.discovery, - }) - ); -``` - -### Processor Options - -The processor accepts configurations either directly as options when constructing using `fromConfig()`, or can also be configured in `app-config.yaml` with the same fields. - -Example linguist processor configuration: - -```yaml -linguist: - tagsProcessor: - bytesThreshold: 1000 - languageTypes: ['programming', 'markup'] - languageMap: - Dockerfile: '' - TSX: 'react' - cacheTTL: - hours: 24 -``` - -#### `languageMap` - -The `languageMap` option allows you to build a custom map of linguist languages to how you want them to show up as tags. The keys should be exact matches to languages in the [linguist dataset](https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml) and the values should be how they render as backstage tags. These values will be used "as is" and will not be further transformed. - -Keep in mind that backstage has [character requirements for tags](https://backstage.io/docs/features/software-catalog/descriptor-format#tags-optional). If your map emits an invalid tag, it will cause an error during processing and your entity will not be processed. - -If you map a key to `''`, it will not be emitted as a tag. This can be useful if you want to ignore some of the linguist languages. - -```yaml -linguist: - tagsProcessor: - languageMap: - # You don't want dockerfile to show up as a tag - Dockerfile: '' - # Be more specific about what the file is - HCL: terraform - # A more casual tag for a formal name - Protocol Buffer: protobuf -``` - -#### `cacheTTL` - -The `cacheTTL` option allows you to determine for how long this processor will cache languages for an `entityRef` before refreshing from the linguist backend. As this processor will run continuously, this cache is supplied to limit the load done on the linguist DB and API. - -By default, this processor will cache languages for 30 minutes before refreshing from the linguist database. - -You can optionally disable the cache entirely by passing in a `cacheTTL` duration of 0 minutes. - -```yaml -linguist: - tagsProcessor: - cacheTTL: { minutes: 0 } -``` - -#### `bytesThreshold` - -The `bytesThreshold` option allows you to control a number of bytes threshold which must be surpassed before a language tag will be emitted by this processor. As an example, some repositories may have short build scripts written in Bash, but you may only want the main language of the project emitted (an alternate way to control this is to use the `languageMap` to map `Shell` languages to `undefined`). - -```yaml -linguist: - tagsProcessor: - # Ignore languages with less than 5000 bytes in a repo. - bytesThreshold: 5000 -``` - -#### `languageTypes` - -The `languageTypes` option allows you to control what categories of linguist languages are automatically added as tags. By default, this will only include language tags of type `programming`, but you can pass in a custom array here to allow adding other language types. - -You can see the full breakdown of linguist supported languages [in their repo](https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml). - -For example, you may want to also include languages of type `data` - -```yaml -linguist: - tagsProcessor: - languageTypes: - - programming - - data -``` - -#### `shouldProcessEntity` - -The `shouldProcessEntity` is a function you can pass into the processor which determines which entities should have language tags fetched from linguist and added to the entity. By default, this will only run on entities of `kind: Component`, however this function let's you fully customize which entities should be processed. - -As an example, you may choose to extend this to support both `Component` and `Resource` kinds along with allowing an opt-in annotation on the entity which entity authors can use. - -As this option is a function, it cannot be configured in `app-config.yaml`. You must pass this as an option within typescript. - -```ts -LinguistLanguageTagsProcessor.fromConfig(env.config, { - logger: env.logger, - discovery: env.discovery, - shouldProcessEntity: (entity: Entity) => { - if ( - ['Component', 'Resource'].includes(entity.kind) && - entity.metadata.annotations?.['some-custom-annotation'] - ) { - return true; - } - return false; - }, -}); -``` - -## Links - -- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/linguist) -- [The Backstage homepage](https://backstage.io) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-linguist-backend` instead. diff --git a/plugins/linguist-backend/package.json b/plugins/linguist-backend/package.json index 13c8d2d63f5bc4..ca8c84eab05b1b 100644 --- a/plugins/linguist-backend/package.json +++ b/plugins/linguist-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-linguist-backend", - "version": "0.5.15", + "version": "0.5.16", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-linguist-backend" }, "publishConfig": { "access": "public", @@ -61,5 +62,6 @@ "js-yaml": "^4.1.0", "supertest": "^6.2.4" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-linguist-backend instead." } diff --git a/plugins/linguist-common/CHANGELOG.md b/plugins/linguist-common/CHANGELOG.md index c9eb3c0c28d7e5..611d5ff73669ea 100644 --- a/plugins/linguist-common/CHANGELOG.md +++ b/plugins/linguist-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-linguist-common +## 0.1.3 + +### Patch Changes + +- 3905997: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.1.2 ### Patch Changes diff --git a/plugins/linguist-common/README.md b/plugins/linguist-common/README.md index 9408f7fcc5b699..4e319669533833 100644 --- a/plugins/linguist-common/README.md +++ b/plugins/linguist-common/README.md @@ -1,3 +1,3 @@ -# Linguist Common +# Deprecated -Common types, permissions, and constants for the Linguist plugin. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-linguist-common` instead. diff --git a/plugins/linguist-common/package.json b/plugins/linguist-common/package.json index 87d641ca3963d1..4eda59106ed6bc 100644 --- a/plugins/linguist-common/package.json +++ b/plugins/linguist-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-linguist-common", - "version": "0.1.2", + "version": "0.1.3", "description": "Common functionalities for the linguist plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-linguist-common" }, "publishConfig": { "access": "public", @@ -34,5 +35,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-linguist-common instead." } diff --git a/plugins/linguist/CHANGELOG.md b/plugins/linguist/CHANGELOG.md index c6c03ac26ace72..c6b420d7305539 100644 --- a/plugins/linguist/CHANGELOG.md +++ b/plugins/linguist/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-linguist +## 0.1.20 + +### Patch Changes + +- 3905997: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-linguist-common@0.1.3 + ## 0.1.19 ### Patch Changes diff --git a/plugins/linguist/README.md b/plugins/linguist/README.md index 7ad70f1db6bccc..86ef14e98898ec 100644 --- a/plugins/linguist/README.md +++ b/plugins/linguist/README.md @@ -1,84 +1,3 @@ -# Linguist +# Deprecated -Welcome to the Linguist plugin! - -## Features - -The Linguist plugin consists of a card that will give you the breakdown of the languages used by the configured Entity in the Catalog. - -When there is no Linguist data yet the card will be empty: - -![Example of empty Linguist card](./docs/linguist-no-data.png) - -Once the language breakdown has been generated the card will look like this: - -![Example of Linguist card without the refresh button](./docs/linguist-with-data.png) - -## Setup - -The following sections will help you get the Linguist plugin setup and running. - -### Backend - -You need to setup the [Linguist backend plugin](../linguist-backend/README.md) before you move forward with any of the following steps if you haven't already. - -### Entity Annotation - -To be able to use the Linguist plugin you need to add the following annotation to any entities you want to use it with: - -```yaml -backstage.io/linguist: https://url.to/your/srouce/code -``` - -Linguist uses the `UrlReader` to pull down the files before it scans them to determine the languages, this means you can pull files from all the supported providers - GitHub, GitLab, Bitbucket, Azure, Google GCS, AWS S3, etc. - -Here's what that will look like in action using the Backstage repo as an example: - -```yaml -# Example catalog-info.yaml entity definition file -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - backstage.io/linguist: https://github.com/backstage/backstage -spec: - type: service - # ... -``` - -### Frontend - -To setup the Linguist Card frontend you'll need to do the following steps: - -1. First we need to add the `@backstage/plugin-linguist` package to your frontend app: - - ```sh - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-linguist - ``` - -2. Second we need to add the `EntityLinguistCard` extension to the entity page in your app: - - ```tsx - // In packages/app/src/components/catalog/EntityPage.tsx - import { isLinguistAvailable, EntityLinguistCard } from '@backstage/plugin-linguist'; - - // For example in the Overview section - const overviewContent = ( - - // ... - - - - - - - - // ... - - ``` - -**Notes:** - -- The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-linguist` instead. diff --git a/plugins/linguist/package.json b/plugins/linguist/package.json index d75ed656324504..560097decaa56d 100644 --- a/plugins/linguist/package.json +++ b/plugins/linguist/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-linguist", - "version": "0.1.19", + "version": "0.1.20", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-linguist" }, "publishConfig": { "access": "public" @@ -69,5 +70,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-linguist instead." } diff --git a/plugins/microsoft-calendar/CHANGELOG.md b/plugins/microsoft-calendar/CHANGELOG.md index dc879cc66a901c..9793276d0af9fa 100644 --- a/plugins/microsoft-calendar/CHANGELOG.md +++ b/plugins/microsoft-calendar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-microsoft-calendar +## 0.1.17 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + ## 0.1.16 ### Patch Changes diff --git a/plugins/microsoft-calendar/README.md b/plugins/microsoft-calendar/README.md index f5ba17bde3bd21..c5ab92af7f8318 100644 --- a/plugins/microsoft-calendar/README.md +++ b/plugins/microsoft-calendar/README.md @@ -1,73 +1,3 @@ -# Microsoft-Calendar Plugin +# Deprecated -This plugin is contributed by [StatusNeo](https://statusneo.com/) - -## Features - -1. You can switch between calendars, using the select menu on the calendar card header. -2. Card showing the list of events on the selected date and the selected calendar (provided by Outlook calendar). -3. Link to join the online meeting on the event card if provided. so you can join your meetings right away hassle-free. -4. Hovering over the event will pop over a card showing the event summary message, and list of attendees. -5. attendee's chips will have a badge over them symbolizing their responses. - - green --> accepted - - red --> declined - - nothing --> not responded yet - -## Setup - -The following sections will help you set up the Microsoft calendar plugin. - -### Microsoft azure authentication provider - -> You need to setup [Microsoft Azure authentication provider](https://backstage.io/docs/auth/microsoft/provider), before you move forward with any of the below step if you haven't already. - -1. Install the plugin by running this command - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-microsoft-calendar -``` - -2. Import the Microsoft calendar React component from `@backstage/plugin-microsoft-calendar`. -3. You can then use the provided React component `MicrosoftCalendar` in the backstage frontend where ever you want - -```tsx -import { MicrosoftCalendarCard } from '@backstage/plugin-microsoft-calendar'; - -// ... - - -; -// ... -``` - -If your homepage is not static JSX add `microsoftCalendarApiRef` to the App's `apis.ts`: - -```ts -import { - MicrosoftCalendarApiClient, - microsoftCalendarApiRef, -} from '@backstage/plugin-microsoft-calendar'; -import { - // ... - fetchApiRef, - // ... -} from '@backstage/core-plugin-api'; - -export const apis = [ - // ... - createApiFactory({ - api: microsoftCalendarApiRef, - deps: { authApi: microsoftAuthApiRef, fetchApi: fetchApiRef }, - factory: deps => new MicrosoftCalendarApiClient(deps), - }), -]; -``` - -![Microsoft Calendar plugin demo](https://user-images.githubusercontent.com/23618736/215717491-25db5fa6-b237-487f-8c00-28f572e8da05.mp4) - -![Sample](./docs/microsoft-calendar-plugin.png) - -You can also serve the plugin in isolation by running `yarn start` in the plugin directory. -This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. -It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-microsoft-calendar` instead. diff --git a/plugins/microsoft-calendar/package.json b/plugins/microsoft-calendar/package.json index fcd655252b2b8b..c6c6d52915d246 100644 --- a/plugins/microsoft-calendar/package.json +++ b/plugins/microsoft-calendar/package.json @@ -1,51 +1,55 @@ { "name": "@backstage/plugin-microsoft-calendar", - "version": "0.1.16", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "version": "0.1.17", + "backstage": { + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-microsoft-calendar" + }, "publishConfig": { "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "frontend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/microsoft-calendar" }, + "license": "Apache-2.0", "author": { "name": "Statusneo", "email": "reach@statusneo.com", "url": "https://statusneo.com/" }, - "contributors": [ + "maintainers": [ { + "name": "abhaysoni", "email": "abhaysoni.developer@gmail.com", - "url": "https://github.com/Abhay-soni-developer", - "name": "abhaysoni" + "url": "https://github.com/Abhay-soni-developer" } ], - "maintainers": [ + "contributors": [ { + "name": "abhaysoni", "email": "abhaysoni.developer@gmail.com", - "url": "https://github.com/Abhay-soni-developer", - "name": "abhaysoni" + "url": "https://github.com/Abhay-soni-developer" } ], "sideEffects": false, + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist" + ], "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", + "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/core-components": "workspace:^", @@ -63,11 +67,6 @@ "material-ui-popup-state": "^1.9.3", "react-use": "^17.2.4" }, - "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - }, "devDependencies": { "@backstage/cli": "workspace:^", "@backstage/dev-utils": "workspace:^", @@ -75,7 +74,10 @@ "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^15.0.0" }, - "files": [ - "dist" - ] + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-router-dom": "6.0.0-beta.0 || ^6.3.0" + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-microsoft-calendar instead." } diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index 17434e976aa22d..05864ffe9a2a67 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-newrelic-dashboard +## 0.3.10 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.3.9 ### Patch Changes diff --git a/plugins/newrelic-dashboard/README.md b/plugins/newrelic-dashboard/README.md index a31042b3fe295a..f0a83f5a27d84b 100644 --- a/plugins/newrelic-dashboard/README.md +++ b/plugins/newrelic-dashboard/README.md @@ -1,79 +1,3 @@ -# New Relic Dashboard Plugin +# Deprecated -Welcome to the newrelic-dashboard plugin! - -## Features - -- Adds New Relic Dashboard Pages Links to Overview section of the catalog -- Shows Snapshots of dashboards in New Relic - -## Getting started - -This plugin uses the Backstage proxy to securely communicate with New Relic's APIs. We use NerdGraph (New Relic's GraphQL API) - -To generate a New Relic API Key , you can visit this [link](https://one.newrelic.com/launcher/api-keys-ui.api-keys-launcher) - -1. Add the following to your app-config.yaml to enable this configuration: - -``` -// app-config.yaml -proxy: - '/newrelic/api': - target: https://api.newrelic.com - headers: - X-Api-Key: ${NEW_RELIC_USER_KEY} -``` - -2. Add the following to `EntityPage.tsx` to display New Relic Dashboard Tab - -``` -// In packages/app/src/components/catalog/EntityPage.tsx -import { - isNewRelicDashboardAvailable, - EntityNewRelicDashboardContent, - EntityNewRelicDashboardCard, -} from '@backstage/plugin-newrelic-dashboard'; - -const serviceEntityPage = ( - - {/* other tabs... */} - - - -``` - -3. Add the following in `EntityPage.tsx` to display dashboard links in overview page - -``` -const overviewContent = ( - {/* other tabs... */} - - - - - - - -``` - -4. Add `newrelic.com/dashboard-guid` annotation in catalog descriptor file - -To Obtain the dashboard's GUID: Click the info icon by the dashboard's name to access the See metadata and manage tags modal and see the dashboard's GUID. - -``` -// catalog-info.yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - newrelic.com/dashboard-guid: -spec: - type: service -``` - -All set , you will be able to see the plugin in action! +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-newrelic-dashboard` instead. diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index a1105c37c38b00..06b0ec2539ab81 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.3.9", + "version": "0.3.10", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-newrelic-dashboard" }, "publishConfig": { "access": "public", @@ -52,5 +53,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-newrelic-dashboard instead." } diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index b460a45267ac40..21dcf0874103ca 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-newrelic +## 0.3.50 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + ## 0.3.49 ### Patch Changes diff --git a/plugins/newrelic/README.md b/plugins/newrelic/README.md index 14e2c0005dc7af..b7148b00c22255 100644 --- a/plugins/newrelic/README.md +++ b/plugins/newrelic/README.md @@ -1,105 +1,3 @@ -# New Relic Plugin (Alpha) +# Deprecated -Website: [https://newrelic.com](https://newrelic.com) - -New Relic Plugin APM -New Relic Plugin Tools - -## Getting Started - -This plugin uses the Backstage proxy to securely communicate with New Relic's -APIs. - -1. Add the following to your `app-config.yaml` to enable this configuration: - - ```yaml - proxy: - '/newrelic/apm/api': - target: https://api.newrelic.com/v2 - headers: - X-Api-Key: ${NEW_RELIC_REST_API_KEY} - allowedHeaders: - - link - ``` - - There is some types of api key on new relic, to this use must be `User` type of key, In your production deployment of Backstage, you would also need to ensure that - you've set the `NEW_RELIC_REST_API_KEY` environment variable before starting - the backend. - - While working locally, you may wish to hard-code your API key in your - `app-config.local.yaml` like this: - - ```yaml - # app-config.local.yaml - proxy: - '/newrelic/apm/api': - headers: - X-Api-Key: NRRA-YourActualApiKey - allowedHeaders: - - link - ``` - - Read more about how to find or generate this key in - [New Relic's Documentation](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#rest-api-key). - - See if it's working by visiting the New Relic Plugin Path: - [/newrelic](http://localhost:3000/newrelic) - -2. Add a dependency to your `packages/app/package.json`: - ```sh - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-newrelic - ``` -3. Add the `NewRelicPage` to your `packages/app/src/App.tsx`: - - ```tsx - - … - } /> - - ``` - -4. Add link to New Relic to your sidebar - - ```typescript - // packages/app/src/components/Root/Root.tsx - import ExtensionIcon from '@material-ui/icons/ExtensionOutlined'; - - ... - - export const Root = ({ children }: PropsWithChildren<{}>) => ( - - - ... - - ... - - - ); - - ``` - -5. Navigate to your.domain.com/newrelic. - - At this step you must be able to see a page like that - New Relic Plugin APM - -## Features - -- View New Relic Application Performance Monitoring (APM) data such as: - - Application Name - - Response Time (ms) - - Throughput (rpm) - - Error Rate - - Instance Count - - Apdex Score - -## Limitations - -- Currently only supports New Relic APM data - ---- - -You can also serve the plugin in isolation by running `yarn start` in the plugin directory. -This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. -It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-newrelic` instead. diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index 4619a2b8c106a1..8221e2d3f11430 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-newrelic", - "version": "0.3.49", + "version": "0.3.50", "description": "A Backstage plugin that integrates towards New Relic", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-newrelic" }, "publishConfig": { "access": "public", @@ -59,5 +60,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-newrelic instead." } diff --git a/plugins/nomad-backend/CHANGELOG.md b/plugins/nomad-backend/CHANGELOG.md index 2581a265048ce9..5189c2c203f972 100644 --- a/plugins/nomad-backend/CHANGELOG.md +++ b/plugins/nomad-backend/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-nomad-backend +## 0.1.20 + +### Patch Changes + +- 3905997: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.1.19 ### Patch Changes diff --git a/plugins/nomad-backend/README.md b/plugins/nomad-backend/README.md index 9f530bd9432b56..b51608591a9083 100644 --- a/plugins/nomad-backend/README.md +++ b/plugins/nomad-backend/README.md @@ -1,64 +1,3 @@ -# @backstage/plugin-nomad-backend +# Deprecated -A backend for [Nomad](https://www.nomadproject.io/), this plugin exposes a service with routes that are used by the `@backstage/plugin-nomad-backend` plugin to query Job and Group information from a Nomad API. - -## New Backend System - -The Nomad backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - const backend = createBackend(); - // ... other feature additions - backend.add(import('@backstage/plugin-nomad-backend')); - backend.start(); -``` - -## Set Up - -1. Install the plugin using: - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-nomad-backend -``` - -2. Create a `nomad.ts` file inside `packages/backend/src/plugins/`: - -```typescript -import { createRouter } from '@backstage/plugin-nomad-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - props: PluginEnvironment, -): Promise { - return await createRouter(props); -} -``` - -3. Modify your `packages/backend/src/index.ts` to include: - -```diff - ... - - import { Config } from '@backstage/config'; - import app from './plugins/app'; -+import nomad from './plugins/nomad'; - ... - - async function main() { - ... - - const authEnv = useHotMemoize(module, () => createEnv('auth')); -+ const nomadEnv = useHotMemoize(module, () => createEnv('nomad')); - ... - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); -+ apiRouter.use('/nomad', await nomad(nomadEnv)); -``` - -Note: for this backend to work, the `nomad` configuration described in the README of `@backstage/plugin-nomad` must be implemented. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-nomad-backend` instead. diff --git a/plugins/nomad-backend/package.json b/plugins/nomad-backend/package.json index 5324065f91e4c6..c0d07cbdc96a3a 100644 --- a/plugins/nomad-backend/package.json +++ b/plugins/nomad-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-nomad-backend", - "version": "0.1.19", + "version": "0.1.20", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-nomad-backend" }, "publishConfig": { "access": "public", @@ -45,5 +46,6 @@ "@backstage/cli": "workspace:^", "@types/supertest": "^2.0.8", "supertest": "^6.2.4" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-nomad-backend instead." } diff --git a/plugins/nomad/CHANGELOG.md b/plugins/nomad/CHANGELOG.md index 74859bba346eaf..efc320b142543d 100644 --- a/plugins/nomad/CHANGELOG.md +++ b/plugins/nomad/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-nomad +## 0.1.16 + +### Patch Changes + +- 3905997: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.1.15 ### Patch Changes diff --git a/plugins/nomad/README.md b/plugins/nomad/README.md index 443669b71a0c74..a5ec8021957219 100644 --- a/plugins/nomad/README.md +++ b/plugins/nomad/README.md @@ -1,167 +1,3 @@ -# @backstage/plugin-nomad +# Deprecated -This is a frontend plugin is for viewing [Nomad](https://www.nomadproject.io/) [job versions](https://developer.hashicorp.com/nomad/docs/concepts/architecture#job) and [task group allocations](https://developer.hashicorp.com/nomad/docs/concepts/architecture#allocation). - -This plugin has a corresponding backend plugin required to call the Nomad cluster's API: ` @backstage/plugin-nomad-backend`. - -## Introduction - -### [Nomad](https://www.nomadproject.io/) - -> A simple and flexible scheduler and orchestrator to deploy and manage containers and non-containerized applications across on-prem and clouds at scale. - -### Features - -This plugin provides two components: - -- a table to view recent [job versions](https://developer.hashicorp.com/nomad/docs/commands/job/history) -- a table to view [allocations for a job and/or group](https://developer.hashicorp.com/nomad/tutorials/manage-jobs/jobs-inspect) - -## Getting Started - -### Requirements - -You will need to have the backend Nomad plugin, `@backstage/plugin-nomad-backend`, installed and running. See its README for set up instructions. - -You will need a running Nomad cluster with an API address that is reachable from the `@backstage/plugin-nomad/backend` plugin [running in the back end](https://backstage.io/docs/overview/architecture-overview/#third-party-backed-plugins). You can follow [this tutorial](https://developer.hashicorp.com/nomad/tutorials/enterprise/production-deployment-guide-vm-with-consul) to learn how to deploy one. - -If your Nomad cluster has ACLs enabled, you will need a `token` with at least the [`list-jobs`capability](https://developer.hashicorp.com/nomad/tutorials/access-control/access-control-policies#namespace-rules). You can check [this tutorial](https://developer.hashicorp.com/nomad/tutorials/access-control/access-control-create-policy) for more info or the minimal [example below](#example-policy). - -### Installation - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-nomad -``` - -### Configuration - -Add configuration to your [`app-config.yaml`](https://github.com/backstage/backstage/blob/master/app-config.yaml). For example: - -```yaml -nomad: - addr: 'http://localhost:4646' - token: '93e034ad-e504-42f9-129d-5d81be9f13d3' -``` - -The `token` can be excluded if [ACLs are not enabled](https://developer.hashicorp.com/nomad/api-docs#authentication). - -### Annotate Components - -Several annotations are available for Components that make use of this plugin: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - annotations: - nomad.io/namespace: default - nomad.io/job-id: redis - nomad.io/group: 'redis|prometheus-collector' -``` - -- `nomad.io/job-id` annotation's value is matched exactly and corresponds to `JobID` in the Nomad API. It is required for the Job Versions Card but optional for the Allocations Table -- `nomad.io/group` annotation's value is used as a regex pattern against `TaskGroup` using [Nomad's server-side filtering](https://developer.hashicorp.com/nomad/api-docs#filtering). It is optional for the [Allocations Table](#allocations-table) -- `nomad.io/namespace` is the Namespace of the Job and Allocations of the Component. If omitted, it defaults to `default` - -### Job Versions Card - -The snippet below adds a card to the overview tab on the EntityPage. It shows versions of a Nomad job associated with a Component in the Catalog. - -```typescript -// In packages/app/src/components/catalog/EntityPage.tsx - -import { EntityNomadJobVersionListCard, isNomadJobIDAvailable } from '@backstage/plugin-nomad'; - -const overviewContent = ( - ... - - - - - - - -); -``` - -
- -
- -#### Requirements - -- the `nomad.io/job-id` annotation must be set - -### Allocations Table - -The snippet below adds a `/nomad` tab to the EntityPage that displays all allocations associated the `nomad.io/job-id` and/or `nomad.io/group` of Component's annotations. - -```typescript -// In packages/app/src/components/catalog/EntityPage.tsx - -import { EntityNomadAllocationListTable, isNomadAllocationsAvailable } from '@backstage/plugin-nomad'; - -const serviceEntityPage = ( - ... - - - -) -``` - -
- -
- -#### Requirements - -- `nomad.io/job-id` and/or `nomad.io/group` annotations must be set - -## ACL Policy Example - -Because this plugin uses API endpoints that require the `list-jobs` capability, the token you provide to the plugin's [`nomad` configuration](#configuration) needs at least that. - -To create such a token you can create a policy like below. This policy applies to all namespaces: - -```hcl -# backstage.policy.hcl -namespace "*" { - policy = "read" -} - -node { - policy = "read" -} -``` - -And create a policy for it: - -```bash -nomad acl policy apply backstage backstage.policy.hcl -``` - -Then create a client token for it: - -```bash -nomad acl token create -name=backstage -policy=backstage -Accessor ID = 5e9fe97b-76c5-8803-21b8-083308dc6c11 -Secret ID = 93e034ad-e504-42f9-129d-5d81be9f13d3 -Name = backstage -Type = client -Global = false -Create Time = 2023-06-05 00:45:20.51905 +0000 UTC -Expiry Time = -Create Index = 54 -Modify Index = 54 -Policies = [backstage] - -Roles - -``` - -In the example above, the `Secret ID` is the `token` to use in the [configuration](#configuration). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-nomad` instead. diff --git a/plugins/nomad/package.json b/plugins/nomad/package.json index 9ac59ef5ba0a6a..3b172d1aa59330 100644 --- a/plugins/nomad/package.json +++ b/plugins/nomad/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-nomad", - "version": "0.1.15", + "version": "0.1.16", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-nomad" }, "publishConfig": { "access": "public", @@ -78,5 +79,6 @@ ] } } - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-nomad instead." } diff --git a/plugins/octopus-deploy/CHANGELOG.md b/plugins/octopus-deploy/CHANGELOG.md index bad3ee150aa3aa..c3f37c4ad52691 100644 --- a/plugins/octopus-deploy/CHANGELOG.md +++ b/plugins/octopus-deploy/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-octopus-deploy +## 0.2.17 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-scaffolder-react@1.8.4 + ## 0.2.16 ### Patch Changes diff --git a/plugins/octopus-deploy/README.md b/plugins/octopus-deploy/README.md index 745a1793e8e1a4..521d940afe55b2 100644 --- a/plugins/octopus-deploy/README.md +++ b/plugins/octopus-deploy/README.md @@ -1,134 +1,3 @@ -# Octopus Deploy Plugin +# Deprecated -Welcome to the octopus-deploy plugin! - -## Features - -- Display the deployment status of the most recent releases for a project in Octopus Deploy straight from the Backstage catalog - -## Getting started - -### Installing - -To get started, first install the plugin with the following command: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-octopus-deploy -``` - -### Setup - -This plugin (currently) uses the Backstage proxy to securely communicate with the Octopus Deploy API. - -To use it, you will need to generate an [API Key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key) within Octopus Deploy. - -Add the following to your app-config.yaml to enable the proxy: - -``` -// app-config.yaml -proxy: - endpoints: - '/octopus-deploy': - target: 'https:///api' - headers: - X-Octopus-ApiKey: ${OCTOPUS_API_KEY} -``` - -Optionally, also add the following section to your app-config.yaml if you wish to enable linking to the Project Release page in the Octopus Deploy UI from the footer of the Backstage Release Table. Typically this will be the server URL above without the /api postfix. - -``` -octopusdeploy: - webBaseUrl: "" -``` - -#### Adding the Entities - -Add the following to `EntityPage.tsx` to display Octopus Releases - -``` -// In packages/app/src/components/catalog/EntityPage.tsx -import { - isOctopusDeployAvailable, - EntityOctopusDeployContent -} from '@backstage/plugin-octopus-deploy'; - -const cicdContent = ( - - {/* other components... */} - - - - -) -``` - -Add `octopus.com/project-id` annotation in the catalog descriptor file. - -To obtain a projects ID you will have to query the Octopus API. In the future we'll add support for using a projects slug as well. - -``` -// catalog-info.yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - octopus.com/project-id: Projects-102 -spec: - type: service -``` - -If your project is not part of the default space you can add the space ID to the annotation as a prefix. For example: - -``` -// catalog-info.yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - octopus.com/project-id: Spaces-2/Projects-102 -spec: - type: service -``` - -You can get the ID of the space from the URL in the Octopus Deploy UI. - -All set, you will be able to see the plugin in action! - -### Adding Scaffolder field extensions - -To add the Octopus Deploy custom fields extensions, add the following to your `App.tsx`: - -```tsx -// In packages/app/src/App.tsx -import { OctopusDeployDropdownFieldExtension } from '@backstage/plugin-octopus-deploy'; -const routes = ( - - ... - }> - - - - - ... - -``` - -To use the Octopus Deploy custom field extensions, add the following to your `template.yaml`: - -```yaml -# In the template.yaml -apiVersion: scaffolder.backstage.io/v1beta3 -kind: Template -metadata: - # ... - parameters: - - title: Octopus Project Group - properties: - projectName: - title: Octopus Project Group - type: string - ui:field: OctopusDeployProjectGroupDropdown -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-octopus-deploy` instead. diff --git a/plugins/octopus-deploy/package.json b/plugins/octopus-deploy/package.json index 336c487a42629a..bd72764fd8431c 100644 --- a/plugins/octopus-deploy/package.json +++ b/plugins/octopus-deploy/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-octopus-deploy", - "version": "0.2.16", + "version": "0.2.17", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-octopus-deploy" }, "publishConfig": { "access": "public", @@ -54,5 +55,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-octopus-deploy instead." } diff --git a/plugins/opencost/CHANGELOG.md b/plugins/opencost/CHANGELOG.md index 5c2c3c9509304c..a3b1a1c68e9d1d 100644 --- a/plugins/opencost/CHANGELOG.md +++ b/plugins/opencost/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-opencost +## 0.2.10 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + ## 0.2.9 ### Patch Changes diff --git a/plugins/opencost/README.md b/plugins/opencost/README.md index 1dec15dcc17caf..d25046aad38c16 100644 --- a/plugins/opencost/README.md +++ b/plugins/opencost/README.md @@ -1,79 +1,3 @@ -# OpenCost +# Deprecated -Welcome to the [OpenCost](https://opencost.io) plugin! - -Currently this is a port of the [OpenCost UI](https://github.com/opencost/opencost/tree/develop/ui), but we will continue to expand it to expose any relevant data or pre-configured views that may be preferred. - -All of the code was originally ported from https://github.com/opencost/opencost/blob/develop/ui/ which is under by the Apache v2 License and also managed by the CNCF. - -## Installation - -1. Add the OpenCost dependency to the `packages/app/package.json`: - ```sh - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-opencost - ``` -2. Add the `OpenCostPage` to your `packages/app/src/App.tsx`: - - ```tsx - import { OpenCostPage } from '@backstage/plugin-opencost'; - ``` - -and - - ```tsx - - … - } /> - - ``` - -3. Import the `MoneyIcon` and add link to OpenCost to your sidebar - - ```typescript - // packages/app/src/components/Root/Root.tsx - import MoneyIcon from '@material-ui/icons/MonetizationOn'; - - ... - - export const Root = ({ children }: PropsWithChildren<{}>) => ( - - - ... - - ... - - - ); - - ``` - -## Plugin Configuration - -Since OpenCost doesn't have any authentication at this point, you just need to give API access to the plugin to access your data. - -If you haven't set up an ingress rule, you can port-forward the API with - -``` -kubectl -n opencost port-forward deployment/opencost 9003 -``` - -Add the following to your `app-config.yaml`: - -```yaml -opencost: - baseUrl: http://localhost:9003 -``` - -## Ideas/Next Steps - -- More testing -- Use the OpenCost mascot for the sidebar logo -- Use the Backstage proxy to communicate with the OpenCost API if necessary for authentication -- Convert AllocationReport.js to use the [Backstage Table](https://backstage.io/storybook/?path=/story/data-display-table--default-table) -- Allow for user-provided default reports and/or disabling controls -- Support multiple hard-coded reports -- clean up deprecation warnings and upgrade to all the latest React components -- Fork(?) to support `Kubecost`, which could provide Alerts and Recommendations, similar to the Cost Explorer plugin - -![Screenshot](screenshot.png) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-opencost` instead. diff --git a/plugins/opencost/package.json b/plugins/opencost/package.json index b66dd827e87f73..9d5bb01b508a92 100644 --- a/plugins/opencost/package.json +++ b/plugins/opencost/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-opencost", - "version": "0.2.9", + "version": "0.2.10", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-opencost" }, "publishConfig": { "access": "public", @@ -54,5 +55,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "*" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-opencost instead." } diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index b2e1bd39e5cc6f..7254c4f0084c40 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-pagerduty +## 0.7.7 + +### Patch Changes + +- 3905997: This plugin has been deprecated, consider using [@pagerduty/backstage-plugin](https://github.com/pagerduty/backstage-plugin) instead + ## 0.7.6 ### Patch Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index f013337f492d36..f755ce983db417 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-pagerduty", - "version": "0.7.6", + "version": "0.7.7", "description": "This plugin has been deprecated, consider using [@pagerduty/backstage-plugin](https://github.com/pagerduty/backstage-plugin) instead.", "backstage": { "role": "frontend-plugin" @@ -65,5 +65,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This plugin has been deprecated, consider using [@pagerduty/backstage-plugin](https://github.com/pagerduty/backstage-plugin) instead." } diff --git a/plugins/periskop-backend/CHANGELOG.md b/plugins/periskop-backend/CHANGELOG.md index 2c994ffb20ad4d..fc2f066ad32c3e 100644 --- a/plugins/periskop-backend/CHANGELOG.md +++ b/plugins/periskop-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-periskop-backend +## 0.2.16 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + ## 0.2.15 ### Patch Changes diff --git a/plugins/periskop-backend/README.md b/plugins/periskop-backend/README.md index 02552fe5b4a5cd..8697d58fb36e3c 100644 --- a/plugins/periskop-backend/README.md +++ b/plugins/periskop-backend/README.md @@ -1,5 +1,3 @@ -# periskop-backend +# Deprecated -Simple plugin that proxies requests to the Periskop server APIs. - -To be used with the [Periskop plugin](../periskop/README.md). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-periskop-backend` instead. diff --git a/plugins/periskop-backend/package.json b/plugins/periskop-backend/package.json index 2bc5c1773d85eb..0fafb6b083bf91 100644 --- a/plugins/periskop-backend/package.json +++ b/plugins/periskop-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-periskop-backend", - "version": "0.2.15", + "version": "0.2.16", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-periskop-backend" }, "publishConfig": { "access": "public" @@ -58,5 +59,6 @@ "@backstage/cli": "workspace:^", "@types/supertest": "^2.0.8", "supertest": "^6.1.6" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-periskop-backend instead." } diff --git a/plugins/periskop/CHANGELOG.md b/plugins/periskop/CHANGELOG.md index 16aee0ede2c776..7b03f8790a2faa 100644 --- a/plugins/periskop/CHANGELOG.md +++ b/plugins/periskop/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-periskop +## 0.1.33 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.32 ### Patch Changes diff --git a/plugins/periskop/README.md b/plugins/periskop/README.md index 85bced7c1bfc0d..f61eef8db71323 100644 --- a/plugins/periskop/README.md +++ b/plugins/periskop/README.md @@ -1,66 +1,3 @@ -# periskop +# Deprecated -[Periskop](https://periskop.io/) is a pull-based, language agnostic exception aggregator for microservice environments. - -![periskop-logo](https://i.imgur.com/z8BLePO.png) - -## Periskop aggregated errors - -The Periskop Backstage Plugin exposes a component named `EntityPeriskopErrorsCard`. -Each of the entries in the table will direct you to the error details in your deployed Periskop instance location. - -![periskop-errors-card](./docs/periskop-plugin-screenshot.png) - -## Setup - -1. Configure the [periskop backend plugin](https://github.com/backstage/backstage/tree/master/plugins/periskop-backend/) - -2. Install the plugin by running: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-periskop -``` - -3. Add to the app `EntityPage` component: - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { EntityPeriskopErrorsCard } from '@backstage/plugin-periskop'; - -const componentPage = ( - - {/* other tabs... */} - - - - - - - -``` - -4. [Setup the `app-config.yaml`](#instances) `periskop` block - -5. Annotate entities with the periskop service name - -```yaml -annotations: - periskop.io/service-name: '' -``` - -6. Run app with `yarn start` and navigate to `/periskop` or a catalog entity 'Periskop' tab - -### Instances - -The periskop plugin can be configured to fetch aggregated errors from multiple deployment instances. -This is especially useful if you have a multi-zone deployment, or a federated setup and would like to drill deeper into a single instance of the federation. Each of the configured instances will be included in the plugin's UI via a dropdown on the errors table. - -The plugin requires to configure _at least one_ Periskop API location in the [app-config.yaml](https://github.com/backstage/backstage/blob/master/app-config.yaml): - -```yaml -periskop: - instances: - - name: - url: -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-periskop` instead. diff --git a/plugins/periskop/package.json b/plugins/periskop/package.json index 1ab1ad729c7b65..7b53644929bb55 100644 --- a/plugins/periskop/package.json +++ b/plugins/periskop/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-periskop", - "version": "0.1.32", + "version": "0.1.33", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-periskop" }, "publishConfig": { "access": "public", @@ -55,5 +56,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-periskop instead." } diff --git a/plugins/playlist-backend/CHANGELOG.md b/plugins/playlist-backend/CHANGELOG.md index 6bfaf0a33a0009..2d29616de40c87 100644 --- a/plugins/playlist-backend/CHANGELOG.md +++ b/plugins/playlist-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-playlist-backend +## 0.3.22 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-playlist-common@0.1.16 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/plugin-auth-node@0.4.12 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-node@0.7.28 + ## 0.3.21 ### Patch Changes diff --git a/plugins/playlist-backend/README.md b/plugins/playlist-backend/README.md index d4474e23317808..f8c66335a423f7 100644 --- a/plugins/playlist-backend/README.md +++ b/plugins/playlist-backend/README.md @@ -1,104 +1,3 @@ -# Playlist Backend +# Deprecated -Welcome to the playlist backend plugin! - -## Installation - -### Install the package - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-playlist-backend -``` - -### Adding the plugin to your `packages/backend` - -You'll need to add the plugin to the router in your `backend` package. You can do this by creating a file called `packages/backend/src/plugins/playlist.ts` - -```tsx -import { createRouter } from '@backstage/plugin-playlist-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - database: env.database, - discovery: env.discovery, - identity: env.identity, - logger: env.logger, - permissions: env.permissions, - }); -} -``` - -With the `playlist.ts` router setup in place, add the router to `packages/backend/src/index.ts`: - -```diff -+import playlist from './plugins/playlist'; - -async function main() { - ... - const createEnv = makeCreateEnv(config); - - const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); -+ const playlistEnv = useHotMemoize(module, () => createEnv('playlist')); - - const apiRouter = Router(); -+ apiRouter.use('/playlist', await playlist(playlistEnv)); - ... - apiRouter.use(notFoundHandler()); - -``` - -## Setting up plugin permissions - -You configure permissions for specific playlist actions by importing the supported set of permissions from the [playlist-common](../playlist-common/README.md) package along with the custom rules/conditions provided here to incorporate into your [permission policy](https://backstage.io/docs/permissions/writing-a-policy). - -This package also exports a `DefaultPlaylistPermissionPolicy` which contains a recommended default permissions policy you can apply as a "sub-policy" in your app: - -```diff -# packages/backend/src/plugins/permission.ts - -+import { DefaultPlaylistPermissionPolicy, isPlaylistPermission } from '@backstage/plugin-playlist-backend'; -... -class BackstagePermissionPolicy implements PermissionPolicy { -+ private playlistPermissionPolicy = new DefaultPlaylistPermissionPolicy(); - - async handle( - request: PolicyQuery, - user?: BackstageIdentityResponse, - ): Promise { -+ if (isPlaylistPermission(request.permission)) { -+ return this.playlistPermissionPolicy.handle(request, user); -+ } - ... - } -} - -export default async function createPlugin(env: PluginEnvironment): Promise { - return await createRouter({ - config: env.config, - logger: env.logger, - discovery: env.discovery, - policy: new BackstagePermissionPolicy(), - ... -``` - -### New Backend System - -The Playlist backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff -import { createBackend } from '@backstage/backend-defaults'; - -const backend = createBackend(); - -backend.add(import('@backstage/plugin-playlist-backend')); -// ... other feature additions - -backend.start(); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-playlist-backend` instead. diff --git a/plugins/playlist-backend/package.json b/plugins/playlist-backend/package.json index aaf8e0a2c84053..44f410c7037ba8 100644 --- a/plugins/playlist-backend/package.json +++ b/plugins/playlist-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-playlist-backend", - "version": "0.3.21", + "version": "0.3.22", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-playlist-backend" }, "publishConfig": { "access": "public", @@ -56,5 +57,6 @@ "@backstage/cli": "workspace:^", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-playlist-backend instead." } diff --git a/plugins/playlist-common/CHANGELOG.md b/plugins/playlist-common/CHANGELOG.md index f12e229af8537c..1673a5e0f3e8a2 100644 --- a/plugins/playlist-common/CHANGELOG.md +++ b/plugins/playlist-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-playlist-common +## 0.1.16 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.13 + ## 0.1.15 ### Patch Changes diff --git a/plugins/playlist-common/README.md b/plugins/playlist-common/README.md index 72f502386c2870..8bbf2d49da94bf 100644 --- a/plugins/playlist-common/README.md +++ b/plugins/playlist-common/README.md @@ -1,3 +1,3 @@ -# Playlist Common +# Deprecated -Common functionalities, types, and permissions for the playlist plugin. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-playlist-common` instead. diff --git a/plugins/playlist-common/package.json b/plugins/playlist-common/package.json index 093586da31fd28..c538e3ae9dc8de 100644 --- a/plugins/playlist-common/package.json +++ b/plugins/playlist-common/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-playlist-common", - "version": "0.1.15", + "version": "0.1.16", "description": "Common functionalities for the playlist plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-playlist-common" }, "publishConfig": { "access": "public", @@ -37,5 +38,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-playlist-common instead." } diff --git a/plugins/playlist/CHANGELOG.md b/plugins/playlist/CHANGELOG.md index 8a30949ea4fc9f..0cf24b06508bb0 100644 --- a/plugins/playlist/CHANGELOG.md +++ b/plugins/playlist/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-playlist +## 0.2.9 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-playlist-common@0.1.16 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-common@1.0.22 + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/plugin-permission-common@0.7.13 + - @backstage/plugin-permission-react@0.4.22 + - @backstage/plugin-search-react@1.7.10 + ## 0.2.8 ### Patch Changes diff --git a/plugins/playlist/README.md b/plugins/playlist/README.md index d326bcdedbfe33..f7459197856e62 100644 --- a/plugins/playlist/README.md +++ b/plugins/playlist/README.md @@ -1,192 +1,3 @@ -# Playlist Plugin +# Deprecated -Welcome to the playlist plugin! - -This plugin allows you to create, share, and follow custom collections of entities available in the Backstage catalog. - -## Setup - -The following sections will help you get the Playlist plugin setup and running - -### Backend - -You need to setup the [Playlist backend plugin](https://github.com/backstage/backstage/tree/master/plugins/playlist-backend) before you move forward with any of these steps if you haven't already - -### Installation - -Install this plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-playlist -``` - -### Add the plugin to your `packages/app` - -Add the pages that the playlist plugin provides to your app. You can -choose any base path for the route, but we recommend the following: - -```diff -// packages/app/src/App.tsx -+import { PlaylistIndexPage, PlaylistPage } from '@backstage/plugin-playlist'; - - - - } /> - }> - {entityPage} - -+ } /> -+ } /> - ... - -``` - -You may also want to add a link to the playlist page to your application sidebar: - -```diff -// packages/app/src/components/Root/Root.tsx -+import PlaylistPlayIcon from '@material-ui/icons/PlaylistPlay'; - -export const Root = ({ children }: PropsWithChildren<{}>) => ( - - -+ - ... - -``` - -### Entity Pages - -You can also make the following changes to add the playlist context menu to your `EntityPage.tsx` -to be able to add entities to playlists directly from your entity pages: - -First we need to add the following imports: - -```ts -import { EntityPlaylistDialog } from '@backstage/plugin-playlist'; -import PlaylistAddIcon from '@material-ui/icons/PlaylistAdd'; -``` - -Next we'll update the React import that looks like this: - -```ts -import React from 'react'; -``` - -To look like this: - -```ts -import React, { ReactNode, useMemo, useState } from 'react'; -``` - -Then we have to add this chunk of code after all the imports but before any of the other code: - -```ts -const EntityLayoutWrapper = (props: { children?: ReactNode }) => { - const [playlistDialogOpen, setPlaylistDialogOpen] = useState(false); - - const extraMenuItems = useMemo(() => { - return [ - { - title: 'Add to playlist', - Icon: PlaylistAddIcon, - onClick: () => setPlaylistDialogOpen(true), - }, - ]; - }, []); - - return ( - <> - - {props.children} - - setPlaylistDialogOpen(false)} - /> - - ); -}; -``` - -The last step is to wrap all the entity pages in the `EntityLayoutWrapper` like this: - -```diff -const defaultEntityPage = ( -+ - - {overviewContent} - - - - - - - - - -+ -); -``` - -Note: the above only shows an example for the `defaultEntityPage` for a full example of this you can look at [this EntityPage](../../packages/app/src/components/catalog/EntityPage.tsx) - -## Custom Title - -You can define a custom title to be shown in all the components of this plugin to replace the default term "playlist" in the UI. To do this you just need to add some config in your **app-config.yaml**, here's an example: - -```yaml -playlist: - title: Collection -``` - -## Custom Index Page - -You can customize your playlist index page by composing your own implementation. See the [`DefaultPlaylistIndexPage`](./src/components/PlaylistIndexPage/DefaultPlaylistIndexPage.tsx) for a reference of what components are available from the default setup. - -```ts -- } /> -+ }> -+ -+ - } /> -``` - -## Features - -### View All Playlists - -![View all playlists example](./docs/playlist-view-all.png) - -### View Playlist - -![View Playlist example](./docs/playlist-view-single.png) - -### Create New Playlist - -![Create New Playlist example](./docs/playlist-create-new.png) - -### Duplicate Playlist Error - -![Duplicate Playlist Error example](./docs/playlist-duplicate-error.png) - -### Edit Existing Playlist - -![Edit Existing Playlist example](./docs/playlist-edit-existing.png) - -### Add Entities to Playlist - -![Add Entities to Playlist example](./docs/playlist-add-entities.png) - -### Add to Playlist from Entity - -![Add to Playlist from Entity example](./docs/playlist-add-from-entity.png) - -### Delete Playlist - -![Delete Playlist example](./docs/playlist-delete.png) - -## Links - -- [playlist-backend](../playlist-backend) provides the backend API for this frontend. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-playlist` instead. diff --git a/plugins/playlist/package.json b/plugins/playlist/package.json index 8fa8682f17a79d..51e127f299a1d1 100644 --- a/plugins/playlist/package.json +++ b/plugins/playlist/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-playlist", - "version": "0.2.8", + "version": "0.2.9", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-playlist" }, "publishConfig": { "access": "public", @@ -70,5 +71,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-playlist instead." } diff --git a/plugins/puppetdb/CHANGELOG.md b/plugins/puppetdb/CHANGELOG.md index 924fc16e5e44d7..c649e7577025ff 100644 --- a/plugins/puppetdb/CHANGELOG.md +++ b/plugins/puppetdb/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-puppetdb +## 0.1.18 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.17 ### Patch Changes diff --git a/plugins/puppetdb/README.md b/plugins/puppetdb/README.md index c4fa06b87460ac..2107d6ca6efa6d 100644 --- a/plugins/puppetdb/README.md +++ b/plugins/puppetdb/README.md @@ -1,63 +1,3 @@ -# PuppetDB Plugin +# Deprecated -A frontend plugin to integrate PuppetDB with Backstage. When combined with the -[catalog-backend-module-puppetdb](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-puppetdb/README.md) plugin, this -frontend plugin allows viewing PuppetDB reports, including their logs and events, of Backstage resource entities. - -## Getting started - -### Prerequisites - -To get started, you need a running instance of PuppetDB. You can find instructions on how to install it -[here](https://www.puppet.com/docs/puppetdb/7/install_via_module.html). -The PuppetDB [should be configured](https://www.puppet.com/docs/puppetdb/7/configure.html#host) to allow being accessed from your Backstage instance. - -In addition, your Backstage instance need to either have -[catalog-backend-module-puppetdb](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-puppetdb/README.md) plugin installed -or you need to ensure your Resource entities have `puppet.com/certname` annotation set to the PuppetDB node name in some other way. - -### Installation - -1. Install the plugin with `yarn` in the root of your Backstage application directory: - -```bash -yarn --cwd packages/app add @backstage/plugin-puppetdb -``` - -1. Import and use the plugin in `packages/app/src/App.tsx`: - -```tsx -import { PuppetDbPage } from '@backstage/plugin-puppetdb'; - -const routes = ( - - {/* ...other routes */} - } /> - -); -``` - -### Configuration - -1. Configure `puppetdb` proxy. As this plugin uses the Backstage proxy to securely communicate with PuppetDB API, - add the following to your `app-config.yaml` to enable this configuration: - -```yaml -proxy: - '/puppetdb': - target: https://your.puppetdb.instance.com -``` - -## Screenshots - -#### Main page with the reports list: - -![Reports list](https://raw.githubusercontent.com/backstage/backstage/42b65232e763d3e39e2e641b105d2ad469db7a59/plugins/puppetdb/assets/Reports.png) - -#### Events for the specific report: - -![Events](https://raw.githubusercontent.com/backstage/backstage/1b39e86db17f139dc995f02daca4896533e53eb0/plugins/puppetdb/assets/Events.png) - -#### Logs of the specific report: - -![Logs](https://raw.githubusercontent.com/backstage/backstage/1b39e86db17f139dc995f02daca4896533e53eb0/plugins/puppetdb/assets/Logs.png) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-puppetdb` instead. diff --git a/plugins/puppetdb/package.json b/plugins/puppetdb/package.json index 5d65129e0969f7..46f1fe644489c4 100644 --- a/plugins/puppetdb/package.json +++ b/plugins/puppetdb/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-puppetdb", - "version": "0.1.17", + "version": "0.1.18", "description": "Backstage plugin to visualize resource information and Puppet facts from PuppetDB.", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-puppetdb" }, "publishConfig": { "access": "public", @@ -60,5 +61,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-puppetdb instead." } diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index 9f87c41493fabb..4493ff1986f28f 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-rollbar-backend +## 0.1.63 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/config@1.2.0 + ## 0.1.62 ### Patch Changes diff --git a/plugins/rollbar-backend/README.md b/plugins/rollbar-backend/README.md index 1f5977f5df2309..22414c3a9d64e1 100644 --- a/plugins/rollbar-backend/README.md +++ b/plugins/rollbar-backend/README.md @@ -1,72 +1,3 @@ -# Rollbar Backend +# Deprecated -Simple plugin that proxies requests to the [Rollbar](https://rollbar.com) API. - -## Setup - -1. Install the plugin using: - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-rollbar-backend -``` - -2. Create a `rollbar.ts` file inside `packages/backend/src/plugins/`: - -```typescript -import { createRouter } from '@backstage/plugin-rollbar-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - logger: env.logger, - config: env.config, - }); -} -``` - -3. Modify your `packages/backend/src/index.ts` to include: - -```diff - ... - - import { Config } from '@backstage/config'; - import app from './plugins/app'; -+import rollbar from './plugins/rollbar'; - import scaffolder from './plugins/scaffolder'; - - ... - - async function main() { - - ... - - const authEnv = useHotMemoize(module, () => createEnv('auth')); -+ const rollbarEnv = useHotMemoize(module, () => createEnv('rollbar')); - const proxyEnv = useHotMemoize(module, () => createEnv('proxy')); - - ... - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); -+ apiRouter.use('/rollbar', await rollbar(rollbarEnv)); - apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv)); -``` - -The following values are read from the configuration file. - -```yaml -rollbar: - accountToken: ${ROLLBAR_ACCOUNT_TOKEN} -``` - -_NOTE: The `ROLLBAR_ACCOUNT_TOKEN` environment variable must be set to a read -access account token._ - -## Links - -- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/rollbar) -- [The Backstage homepage](https://backstage.io) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-rollbar-backend` instead. diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 4a2d07623fcd78..c347b9996446e5 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-rollbar-backend", - "version": "0.1.62", + "version": "0.1.63", "description": "A Backstage backend plugin that integrates towards Rollbar", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-rollbar-backend" }, "publishConfig": { "access": "public", @@ -58,5 +59,6 @@ "msw": "^1.0.0", "supertest": "^6.1.3" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-rollbar-backend instead." } diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index d8199b4cc08d2e..a7136ef0f54a28 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-rollbar +## 0.4.35 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.4.34 ### Patch Changes diff --git a/plugins/rollbar/README.md b/plugins/rollbar/README.md index 2b1fb7e40dfe83..44b53bc7892507 100644 --- a/plugins/rollbar/README.md +++ b/plugins/rollbar/README.md @@ -1,66 +1,3 @@ -# Rollbar Plugin +# Deprecated -Website: [https://rollbar.com/](https://rollbar.com/) - -## Setup - -1. Configure the [rollbar backend plugin](https://github.com/backstage/backstage/tree/master/plugins/rollbar-backend/README.md) - -2. If you have standalone app (you didn't clone this repo), then do - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-rollbar -``` - -3. Add to the app `EntityPage` component: - -```tsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { EntityRollbarContent } from '@backstage/plugin-rollbar'; - -const serviceEntityPage = ( - - {/* other tabs... */} - - - -``` - -4. Setup the `app-config.yaml` and account token environment variable - -```yaml -# app.config.yaml -rollbar: - organization: organization-name - # used by rollbar-backend - accountToken: ${ROLLBAR_ACCOUNT_TOKEN} -``` - -5. Annotate entities with the rollbar project slug - -```yaml -# pump-station-catalog-component.yaml -# ... -metadata: - annotations: - rollbar.com/project-slug: organization-name/project-name - # -- or just --- - rollbar.com/project-slug: project-name -``` - -6. Run app with `yarn start` and navigate to `/rollbar` or a catalog entity - -## Features - -- List rollbar entities that are annotated with `rollbar.com/project-slug` -- View top active items for each rollbar annotated entity - -## Limitations - -- Rollbar has rate limits per token - -## Links - -- [Backend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/rollbar-backend) -- [The Backstage homepage](https://backstage.io) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-rollbar` instead. diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index 263eb41d054a2c..1351baacef7359 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-rollbar", - "version": "0.4.34", + "version": "0.4.35", "description": "A Backstage plugin that integrates towards Rollbar", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-rollbar" }, "publishConfig": { "access": "public", @@ -62,5 +63,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-rollbar instead." } diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 12ca6996966f7c..2f4838f7405afd 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-scaffolder-backend +## 1.22.5 + +### Patch Changes + +- b6b59c5: Fix issue with the log format not being respected when logging from actions +- b6b59c5: Redact `meta` fields too with the logger + ## 1.22.4 ### Patch Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index b9675801540e02..c9028e7aacf430 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend", - "version": "1.22.4", + "version": "1.22.5", "description": "The Backstage backend plugin that helps you create new things", "backstage": { "role": "backend-plugin" @@ -95,6 +95,7 @@ "prom-client": "^15.0.0", "uuid": "^9.0.0", "winston": "^3.2.1", + "winston-transport": "^4.7.0", "yaml": "^2.0.0", "zen-observable": "^0.10.0", "zod": "^3.22.4" diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts index 81897a96f8878a..5d24ac7cc74f16 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts @@ -55,7 +55,7 @@ import { actionExecutePermission } from '@backstage/plugin-scaffolder-common/alp import { TaskRecovery } from '@backstage/plugin-scaffolder-common'; import { PermissionsService } from '@backstage/backend-plugin-api'; import { loggerToWinstonLogger } from '@backstage/backend-common'; -import { WinstonLogger } from './logger'; +import { BackstageLoggerTransport, WinstonLogger } from './logger'; type NunjucksWorkflowRunnerOptions = { workingDirectory: string; @@ -98,9 +98,11 @@ const isValidTaskSpec = (taskSpec: TaskSpec): taskSpec is TaskSpecV1beta3 => { const createStepLogger = ({ task, step, + rootLogger, }: { task: TaskContext; step: TaskStep; + rootLogger: winston.Logger; }) => { const stepLogStream = new PassThrough(); stepLogStream.on('data', async data => { @@ -117,8 +119,8 @@ const createStepLogger = ({ winston.format.simple(), ), transports: [ - new winston.transports.Console(), new winston.transports.Stream({ stream: stepLogStream }), + new BackstageLoggerTransport(rootLogger), ], }); @@ -262,7 +264,11 @@ export class NunjucksWorkflowRunner implements WorkflowRunner { const action: TemplateAction = this.options.actionRegistry.get(step.action); - const { taskLogger, streamLogger } = createStepLogger({ task, step }); + const { taskLogger, streamLogger } = createStepLogger({ + task, + step, + rootLogger: this.options.logger, + }); if (task.isDryRun) { const redactedSecrets = Object.fromEntries( diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts index b96b7470770ec1..064eb693498d37 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts @@ -19,13 +19,8 @@ import { } from '@backstage/backend-plugin-api'; import { JsonObject } from '@backstage/types'; import { Format, TransformableInfo } from 'logform'; -import { - Logger, - format, - createLogger, - transports, - transport as Transport, -} from 'winston'; +import Transport, { TransportStreamOptions } from 'winston-transport'; +import { Logger, format, createLogger, transports } from 'winston'; /** * Escapes a given string to be used inside a RegExp. @@ -43,6 +38,42 @@ interface WinstonLoggerOptions { transports: Transport[]; } +// This is a workaround for being able to preserve the log format of the root logger. +// Will revisit all of this implementation once we can break the router to use only `LoggerService`. +export class BackstageLoggerTransport extends Transport { + constructor( + private readonly backstageLogger: LoggerService, + opts?: TransportStreamOptions, + ) { + super(opts); + } + + log(info: unknown, callback: VoidFunction) { + if (typeof info !== 'object' || info === null) { + callback(); + return; + } + const { level, message, ...meta } = info as JsonObject; + switch (level) { + case 'error': + this.backstageLogger.error(String(message), meta); + break; + case 'warn': + this.backstageLogger.warn(String(message), meta); + break; + case 'info': + this.backstageLogger.info(String(message), meta); + break; + case 'debug': + this.backstageLogger.debug(String(message), meta); + break; + default: + this.backstageLogger.info(String(message), meta); + } + callback(); + } +} + export class WinstonLogger implements RootLoggerService { #winston: Logger; #addRedactions?: (redactions: Iterable) => void; @@ -76,16 +107,20 @@ export class WinstonLogger implements RootLoggerService { let redactionPattern: RegExp | undefined = undefined; - return { - format: format(info => { - if (redactionPattern && typeof info.message === 'string') { - info.message = info.message.replace(redactionPattern, '[REDACTED]'); - } - if (redactionPattern && typeof info.stack === 'string') { - info.stack = info.stack.replace(redactionPattern, '[REDACTED]'); + const replace = (obj: TransformableInfo) => { + for (const key in obj) { + if (obj.hasOwnProperty(key)) { + if (typeof obj[key] === 'object') { + obj[key] = replace(obj[key] as TransformableInfo); + } else if (typeof obj[key] === 'string') { + obj[key] = obj[key]?.replace(redactionPattern, '[REDACTED]'); + } } - return info; - })(), + } + return obj; + }; + return { + format: format(replace)(), add(newRedactions) { let added = 0; for (const redactionToTrim of newRedactions) { diff --git a/plugins/search-backend-module-catalog/CHANGELOG.md b/plugins/search-backend-module-catalog/CHANGELOG.md index 1d985231b2c87d..56507ea53e1b28 100644 --- a/plugins/search-backend-module-catalog/CHANGELOG.md +++ b/plugins/search-backend-module-catalog/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-search-backend-module-catalog +## 0.1.23 + +### Patch Changes + +- 9d6543c: Fix wiring of the module exported at the `/alpha` path, which was causing authentication failures. + ## 0.1.22 ### Patch Changes diff --git a/plugins/search-backend-module-catalog/package.json b/plugins/search-backend-module-catalog/package.json index 6aebb192d9aa2e..1c17cd42ea021c 100644 --- a/plugins/search-backend-module-catalog/package.json +++ b/plugins/search-backend-module-catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-catalog", - "version": "0.1.22", + "version": "0.1.23", "description": "A module for the search backend that exports catalog modules", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-module-catalog/src/alpha.ts b/plugins/search-backend-module-catalog/src/alpha.ts index 71dabeb011ab7b..2ae9cd8af93fdb 100644 --- a/plugins/search-backend-module-catalog/src/alpha.ts +++ b/plugins/search-backend-module-catalog/src/alpha.ts @@ -77,6 +77,7 @@ export default createBackendModule({ env.registerInit({ deps: { + auth: coreServices.auth, config: coreServices.rootConfig, discovery: coreServices.discovery, tokenManager: coreServices.tokenManager, @@ -85,6 +86,7 @@ export default createBackendModule({ catalog: catalogServiceRef, }, async init({ + auth, config, discovery, tokenManager, @@ -97,6 +99,7 @@ export default createBackendModule({ readScheduleConfigOptions(config), ), factory: DefaultCatalogCollatorFactory.fromConfig(config, { + auth, entityTransformer, discovery, tokenManager, diff --git a/plugins/search-backend-module-explore/CHANGELOG.md b/plugins/search-backend-module-explore/CHANGELOG.md index 5a3adbbbf7ddd1..22808e330a82f9 100644 --- a/plugins/search-backend-module-explore/CHANGELOG.md +++ b/plugins/search-backend-module-explore/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-search-backend-module-explore +## 0.1.23 + +### Patch Changes + +- da02d13: Migrate search collator to use the new auth services. + +## 0.1.22 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-explore-common@0.0.3 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/backend-tasks@0.5.22 + - @backstage/config@1.2.0 + - @backstage/plugin-search-backend-node@1.2.21 + - @backstage/plugin-search-common@1.2.11 + ## 0.1.21 ### Patch Changes diff --git a/plugins/search-backend-module-explore/package.json b/plugins/search-backend-module-explore/package.json index d5f6e907e7b8b9..83a7dc372784ce 100644 --- a/plugins/search-backend-module-explore/package.json +++ b/plugins/search-backend-module-explore/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-explore", - "version": "0.1.21", + "version": "0.1.23", "description": "A module for the search backend that exports explore modules", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-module-explore/src/alpha.ts b/plugins/search-backend-module-explore/src/alpha.ts index 5a990b19f6f247..21c59018853a3b 100644 --- a/plugins/search-backend-module-explore/src/alpha.ts +++ b/plugins/search-backend-module-explore/src/alpha.ts @@ -44,6 +44,7 @@ export default createBackendModule({ discovery: coreServices.discovery, scheduler: coreServices.scheduler, tokenManager: coreServices.tokenManager, + auth: coreServices.auth, indexRegistry: searchIndexRegistryExtensionPoint, }, async init({ @@ -51,8 +52,9 @@ export default createBackendModule({ logger, discovery, scheduler, - indexRegistry, tokenManager, + auth, + indexRegistry, }) { const defaultSchedule = { frequency: { minutes: 10 }, @@ -71,6 +73,7 @@ export default createBackendModule({ factory: ToolDocumentCollatorFactory.fromConfig(config, { discovery, logger, + auth, tokenManager, }), }); diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index e5667d696fb1f4..b6344a43972df3 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sentry +## 0.5.20 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.5.19 ### Patch Changes diff --git a/plugins/sentry/README.md b/plugins/sentry/README.md index 78f31952b2e3b9..2443369caeb66a 100644 --- a/plugins/sentry/README.md +++ b/plugins/sentry/README.md @@ -1,103 +1,3 @@ -# Sentry Plugin +# Deprecated -The Sentry Plugin displays issues from [Sentry](https://sentry.io). - -![Sentry Card](./docs/sentry-card.png) - -## Getting Started - -1. Install the Sentry Plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-sentry -``` - -2. Add the `EntitySentryCard` to the EntityPage: - -```jsx -// packages/app/src/components/catalog/EntityPage.tsx - -import { EntitySentryCard } from '@backstage/plugin-sentry'; - -const overviewContent = ( - - // ... - - - - // ... - -); -``` - -> You can also import the full-page `EntitySentryContent` extension if you want to have a dedicated sentry page: -> -> ```tsx -> // packages/app/src/components/catalog/EntityPage.tsx -> -> import { EntitySentryContent } from '@backstage/plugin-sentry'; -> -> const serviceEntityPage = ( -> -> // ... -> -> -> -> // ... -> -> ); -> ``` - -3. Add the proxy config: - -```yaml -# app-config.yaml - -proxy: - '/sentry/api': - target: https://sentry.io/api/ - allowedMethods: ['GET'] - headers: - Authorization: Bearer ${SENTRY_TOKEN} - -sentry: - organization: -``` - -4. Create a new internal integration with the permissions `Issues & Events: Read` (https://docs.sentry.io/product/integrations/integration-platform/) and provide it as `SENTRY_TOKEN` as env variable. - -5. Add the `sentry.io/project-slug` annotation to your catalog-info.yaml file: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: | - Backstage is an open-source developer portal that puts the developer experience first. - annotations: - sentry.io/project-slug: YOUR_PROJECT_SLUG -spec: - type: library - owner: CNCF - lifecycle: experimental -``` - -### Demo Mode - -The plugin provides a MockAPI that always returns dummy data instead of talking to the sentry backend. -You can add it by overriding the `sentryApiRef`: - -```ts -// packages/app/src/apis.ts - -import { createApiFactory } from '@backstage/core-plugin-api'; -import { MockSentryApi, sentryApiRef } from '@backstage/plugin-sentry'; - -export const apis = [ - // ... - - createApiFactory(sentryApiRef, new MockSentryApi()), -]; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-sentry` instead. diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index 77ad095c19b8a5..45fc5a75f999b0 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-sentry", - "version": "0.5.19", + "version": "0.5.20", "description": "A Backstage plugin that integrates towards Sentry", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-sentry" }, "publishConfig": { "access": "public", @@ -64,5 +65,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-sentry instead." } diff --git a/plugins/shortcuts/CHANGELOG.md b/plugins/shortcuts/CHANGELOG.md index ec22b2ec697765..f9050434bdc395 100644 --- a/plugins/shortcuts/CHANGELOG.md +++ b/plugins/shortcuts/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-shortcuts +## 0.3.24 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/theme@0.5.3 + - @backstage/types@1.1.1 + ## 0.3.23 ### Patch Changes diff --git a/plugins/shortcuts/README.md b/plugins/shortcuts/README.md index 18deb7ae375c82..752b88a92ca6e1 100644 --- a/plugins/shortcuts/README.md +++ b/plugins/shortcuts/README.md @@ -1,95 +1,3 @@ -# shortcuts +# Deprecated -The shortcuts plugin allows a user to have easy access to pages within a Backstage app by storing them as "shortcuts" in the Sidebar. - -## Usage - -### Install the package: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-shortcuts -``` - -### Register plugin: - -This plugin requires explicit registration, so you will need to add it to your App's `plugins.ts` file: - -```ts -// ... -export { shortcutsPlugin } from '@backstage/plugin-shortcuts'; -``` - -If you don't have a `plugins.ts` file see: [troubleshooting](#troubleshooting) - -### Add the `` component within your ``: - -Edit file `packages/app/src/components/Root/Root.tsx` - -```tsx -import { - Sidebar, - SidebarDivider, - SidebarSpace, -} from '@backstage/core-components'; -import { Shortcuts } from '@backstage/plugin-shortcuts'; - -export const SidebarComponent = () => ( - - {/* ... */} - - - - -); -``` - -To allow external links to be added as shortcut, you can add `allowExternalLinks` property to the `` component. - -The plugin exports a `shortcutApiRef` but the plugin includes a default implementation of the `ShortcutApi` that uses `localStorage` to store each user's shortcuts. - -To overwrite the default implementation add it to the App's `apis.ts`: - -```ts -import { shortcutsApiRef } from '@backstage/plugin-shortcuts'; -import { CustomShortcutsImpl } from '...'; - -export const apis = [ - // ... - createApiFactory({ - api: shortcutsApiRef, - deps: {}, - factory: () => new CustomShortcutsImpl(), - }), -]; -``` - -# Troubleshooting - -If you don't have a `plugins.ts` file, you can create it with the path `packages/app/src/plugins.ts` and then import it into your `App.tsx`: - -```diff -+ import * as plugins from './plugins'; - -const app = createApp({ - apis, -+ plugins: Object.values(plugins), - bindRoutes({ bind }) { - /* ... */ - }, -}); -``` - -Or simply edit `App.tsx` with: - -```diff -+ import { shortcutsPlugin } from '@backstage/plugin-shortcuts - -const app = createApp({ - apis, -+ plugins: [shortcutsPlugin], - bindRoutes({ bind }) { - /* ... */ - }, -}); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-shortcuts` instead. diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index 745ae3fe2846c3..e17f77aea0fad6 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-shortcuts", - "version": "0.3.23", + "version": "0.3.24", "description": "A Backstage plugin that provides a shortcuts feature to the sidebar", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-shortcuts" }, "publishConfig": { "access": "public", @@ -58,5 +59,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-shortcuts instead." } diff --git a/plugins/sonarqube-backend/CHANGELOG.md b/plugins/sonarqube-backend/CHANGELOG.md index ac30274d3b0308..d4a9c148545c65 100644 --- a/plugins/sonarqube-backend/CHANGELOG.md +++ b/plugins/sonarqube-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sonarqube-backend +## 0.2.20 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.2.19 ### Patch Changes diff --git a/plugins/sonarqube-backend/README.md b/plugins/sonarqube-backend/README.md index 6206cd8257535f..224fb087b57304 100644 --- a/plugins/sonarqube-backend/README.md +++ b/plugins/sonarqube-backend/README.md @@ -1,185 +1,3 @@ -# sonarqube-backend +# Deprecated -Welcome to the sonarqube-backend backend plugin! - -## New Backend System - -The Sonarqube backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - const backend = createBackend(); - // ... other feature additions -+ backend.add(import('@backstage/plugin-sonarqube-backend')); - backend.start(); -``` - -## Integrating into a backstage instance - -This plugin needs to be added to an existing backstage instance. - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-sonarqube-backend -``` - -Typically, this means creating a `src/plugins/sonarqube.ts` file and adding a reference to it to `src/index.ts` in the backend package. - -### sonarqube.ts - -```typescript -import { - createRouter, - DefaultSonarqubeInfoProvider, -} from '@backstage/plugin-sonarqube-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - logger: env.logger, - sonarqubeInfoProvider: DefaultSonarqubeInfoProvider.fromConfig(env.config), - }); -} -``` - -### src/index.ts - -```diff -diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts -index 1942c36ad1..7fdc48ba24 100644 ---- a/packages/backend/src/index.ts -+++ b/packages/backend/src/index.ts -@@ -50,6 +50,7 @@ import scaffolder from './plugins/scaffolder'; - import proxy from './plugins/proxy'; - import search from './plugins/search'; - import techdocs from './plugins/techdocs'; -+import sonarqube from './plugins/sonarqube'; - import techInsights from './plugins/techInsights'; - import todo from './plugins/todo'; - import graphql from './plugins/graphql'; -@@ -133,6 +134,7 @@ async function main() { - createEnv('tech-insights'), - ); - const permissionEnv = useHotMemoize(module, () => createEnv('permission')); -+ const sonarqubeEnv = useHotMemoize(module, () => createEnv('sonarqube')); - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); -@@ -152,6 +154,7 @@ async function main() { - apiRouter.use('/badges', await badges(badgesEnv)); - apiRouter.use('/jenkins', await jenkins(jenkinsEnv)); - apiRouter.use('/permission', await permission(permissionEnv)); -+ apiRouter.use('/sonarqube', await sonarqube(sonarqubeEnv)); - apiRouter.use(notFoundHandler()); - - const service = createServiceBuilder(module) - -``` - -This plugin must be provided with a `SonarqubeInfoProvider`, this is a strategy object for finding Sonarqube instances in configuration and retrieving data from an instance. - -There is a standard one provided (`DefaultSonarqubeInfoProvider`), but the Integrator is free to build their own. - -### DefaultSonarqubeInfoProvider - -Allows configuration of either a single or multiple global Sonarqube instances and annotating entities with the instance name. This instance name in the entities is optional, if not provided the default instance in configuration will be used. That allow to keep configuration from before multiple instances capability to keep working without changes. - -#### Example - Single global instance - -##### Config - -```yaml -sonarqube: - baseUrl: https://sonarqube.example.com - apiKey: 123456789abcdef0123456789abcedf012 -``` - -##### Catalog - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - annotations: - sonarqube.org/project-key: YOUR_INSTANCE_NAME/YOUR_PROJECT_KEY -``` - -#### Example - Multiple global instance - -The following will look for findings at `https://special-project-sonarqube.example.com` for the project of key `YOUR_PROJECT_KEY`. - -##### Config - -```yaml -sonarqube: - instances: - - name: default - baseUrl: https://default-sonarqube.example.com - apiKey: 123456789abcdef0123456789abcedf012 - - name: specialProject - baseUrl: https://special-project-sonarqube.example.com - apiKey: abcdef0123456789abcedf0123456789ab -``` - -##### Catalog - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - annotations: - sonarqube.org/project-key: specialProject/YOUR_PROJECT_KEY -``` - -If the `specialProject/` part is omitted (or replaced with `default/`), the Sonarqube instance of name `default` will be used. - -The following config is an equivalent (but less clear) version of the above: - -```yaml -sonarqube: - baseUrl: https://default-sonarqube.example.com - apiKey: 123456789abcdef0123456789abcedf012 - instances: - - name: specialProject - baseUrl: https://special-project-sonarqube.example.com - apiKey: abcdef0123456789abcedf0123456789ab -``` - -#### Example - Different frontend and backend URLs - -In some instances, you might want to use one URL for the backend and another for the frontend. -This can be achieved by using the optional `externalBaseUrl` property in the config. - -##### Single instance config - -```yaml -sonarqube: - baseUrl: https://sonarqube-internal.example.com - externalBaseUrl: https://sonarqube.example.com - apiKey: 123456789abcdef0123456789abcedf012 -``` - -##### Multiple instance config - -```yaml -sonarqube: - instances: - - name: default - baseUrl: https://default-sonarqube-internal.example.com - externalBaseUrl: https://default-sonarqube.example.com - apiKey: 123456789abcdef0123456789abcedf012 - - name: specialProject - baseUrl: https://special-project-sonarqube.example.com - apiKey: abcdef0123456789abcedf0123456789ab -``` - -## Links - -- [Sonarqube Frontend](../sonarqube/README.md) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-sonarqube-backend` instead. diff --git a/plugins/sonarqube-backend/package.json b/plugins/sonarqube-backend/package.json index 2189484d37080a..be9dc88c02eb65 100644 --- a/plugins/sonarqube-backend/package.json +++ b/plugins/sonarqube-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-sonarqube-backend", - "version": "0.2.19", + "version": "0.2.20", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-sonarqube-backend" }, "publishConfig": { "access": "public", @@ -49,5 +50,6 @@ "msw": "^1.0.0", "supertest": "^6.2.4" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-sonarqube-backend instead." } diff --git a/plugins/sonarqube-react/CHANGELOG.md b/plugins/sonarqube-react/CHANGELOG.md index 855cd56092ae0b..2b0e99fc8507ef 100644 --- a/plugins/sonarqube-react/CHANGELOG.md +++ b/plugins/sonarqube-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-sonarqube-react +## 0.1.16 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.2 + ## 0.1.15 ### Patch Changes diff --git a/plugins/sonarqube-react/README.md b/plugins/sonarqube-react/README.md new file mode 100644 index 00000000000000..1e0cf041dddbb4 --- /dev/null +++ b/plugins/sonarqube-react/README.md @@ -0,0 +1,3 @@ +# Deprecated + +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-sonarqube-react` instead. diff --git a/plugins/sonarqube-react/package.json b/plugins/sonarqube-react/package.json index d0335b1fe23677..3f7fb622d6816b 100644 --- a/plugins/sonarqube-react/package.json +++ b/plugins/sonarqube-react/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-sonarqube-react", - "version": "0.1.15", + "version": "0.1.16", "backstage": { - "role": "web-library" + "role": "web-library", + "moved": "@backstage-community/plugin-sonarqube-react" }, "publishConfig": { "access": "public" @@ -56,5 +57,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-sonarqube-react instead." } diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index 3e3783796a400e..93614337f95d4a 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-sonarqube +## 0.7.17 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-sonarqube-react@0.1.16 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.7.16 ### Patch Changes diff --git a/plugins/sonarqube/README.md b/plugins/sonarqube/README.md index 9d3bc701f90cc6..343d61b15c1ae9 100644 --- a/plugins/sonarqube/README.md +++ b/plugins/sonarqube/README.md @@ -1,64 +1,3 @@ -# SonarQube Plugin +# Deprecated -The SonarQube Plugin displays code statistics from [SonarCloud](https://sonarcloud.io) or [SonarQube](https://sonarqube.com). - -![Sonar Card](./docs/sonar-card.png) - -## Getting Started - -1. Install the SonarQube Plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-sonarqube -``` - -2. Add the `EntitySonarQubeCard` to the EntityPage: - -```diff - // packages/app/src/components/catalog/EntityPage.tsx -+ import { EntitySonarQubeCard } from '@backstage/plugin-sonarqube'; - - ... - - const overviewContent = ( - - - - -+ -+ -+ - - ); -``` - -3. Run the following commands in the root folder of the project to install and compile the changes. - -```yaml -yarn install -yarn tsc -``` - -4. Add the `sonarqube.org/project-key` annotation to the `catalog-info.yaml` file of the target repo for which code quality analysis is needed. - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: | - Backstage is an open-source developer portal that puts the developer experience first. - annotations: - sonarqube.org/project-key: YOUR_INSTANCE_NAME/YOUR_PROJECT_KEY -spec: - type: library - owner: CNCF - lifecycle: experimental -``` - -`YOUR_INSTANCE_NAME/` is optional and will query the default instance if not provided. - -## Links - -- [Sonarqube Backend](../sonarqube-backend/README.md) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-sonarqube` instead. diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 7f1835b6a37b4e..ff578bde56382a 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-sonarqube", - "version": "0.7.16", + "version": "0.7.17", "description": "", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-sonarqube" }, "publishConfig": { "access": "public", @@ -69,5 +70,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-sonarqube instead." } diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index e3338f5a7426b5..b2095d61079cd4 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-splunk-on-call +## 0.4.24 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.4.23 ### Patch Changes diff --git a/plugins/splunk-on-call/README.md b/plugins/splunk-on-call/README.md index ceeec2fa4c8030..3910e1d7595f7d 100644 --- a/plugins/splunk-on-call/README.md +++ b/plugins/splunk-on-call/README.md @@ -1,155 +1,3 @@ -# Splunk On-Call +# Deprecated -## Overview - -This plugin displays Splunk On-Call (formerly VictorOps) information associated with an entity. - -It also provides the ability to trigger new incidents to specific users and/or specific teams from within Backstage. - -This plugin requires that entities feature either a `splunk.com/on-call-team` or a `splunk.com/on-call-routing-key` annotation. See below for further details. - -This plugin provides: - -- A list of incidents -- A way to trigger a new incident to specific users and/or teams -- A way to acknowledge/resolve an incident -- Information details about the persons on-call - -## Setup instructions - -Install the plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-splunk-on-call -``` - -Add it to your `EntityPage`: - -```ts -// packages/app/src/components/catalog/EntityPage.tsx -import { - isSplunkOnCallAvailable, - EntitySplunkOnCallCard, -} from '@backstage/plugin-splunk-on-call'; -// ... -const overviewContent = ( - - - - - - - - -``` - -### `readOnly` mode - -To suppress the rendering of the actionable create-acknowledge-resolve incident buttons and UI controls, the `EntitySplunkOnCallCard` can also be instantiated in `readOnly` mode: - -```ts - -``` - -## Client configuration - -In order to be able to perform certain actions (create-acknowledge-resolve an action), you need to provide a REST Endpoint. - -To enable the REST Endpoint integration you can go on https://portal.victorops.com/ inside Integrations > 3rd Party Integrations > REST – Generic. -You can now copy the URL to notify: `/$routing_key` - -In `app-config.yaml`: - -```yaml -splunkOnCall: - eventsRestEndpoint: -``` - -In order to make the API calls, you need to provide a new proxy config which will redirect to the Splunk On-Call API endpoint and add authentication information in the headers: - -```yaml -# app-config.yaml -proxy: - # ... - '/splunk-on-call': - target: https://api.victorops.com/api-public - headers: - X-VO-Api-Id: ${SPLUNK_ON_CALL_API_ID} - X-VO-Api-Key: ${SPLUNK_ON_CALL_API_KEY} -``` - -In addition, to make certain API calls (trigger-resolve-acknowledge an incident) you need to add the `PATCH` method to the backend `cors` methods list: `[GET, POST, PUT, DELETE, PATCH]`. - -**WARNING**: In current implementation, the Splunk OnCall plugin requires the `/splunk-on-call` proxy endpoint be exposed by the Backstage backend as an unprotected endpoint, in effect enabling Splunk OnCall API access using the configured `SPLUNK_ON_CALL_API_KEY` for any user or process with access to the `/splunk-on-call` Backstage backend endpoint. See below for further configuration options enabling protection of this endpoint. If you regard this as problematic, consider using the plugin in `readOnly` mode (``) using the following proxy configuration: - -```yaml -proxy: - '/splunk-on-call': - target: https://api.victorops.com/api-public - headers: - X-VO-Api-Id: ${SPLUNK_ON_CALL_API_ID} - X-VO-Api-Key: ${SPLUNK_ON_CALL_API_KEY} - # prohibit the `/splunk-on-call` proxy endpoint from servicing non-GET requests - allowedMethods: ['GET'] -``` - -### Adding your team name to the entity annotation - -The information displayed for each entity is based on either an associated team name or an associated routing key. - -To use this plugin for an entity, the entity must be labeled with either a `splunk.com/on-call-team` or a `splunk.com/on-call-routing-key` annotation. - -For example, by specifying a `splunk.com/on-call-team`, the plugin displays Splunk On-Call data associated with the specified team: - -```yaml -annotations: - splunk.com/on-call-team: -``` - -Alternatively, by specifying a `splunk.com/on-call-routing-key`, the plugin displays Splunk On-Call data associated with _each_ of the teams associated with the specified routing key: - -```yaml -annotations: - splunk.com/on-call-routing-key: -``` - -### Create the Routing Key - -To be able to use the REST Endpoint seen above, you must have created a routing key with the **same name** as the provided team. - -You can create a new routing key on https://portal.victorops.com/ by going to Settings > Routing Keys. - -You can read [Create & Manage Alert Routing Keys](https://help.victorops.com/knowledge-base/routing-keys/#routing-key-tips-tricks) for further information. - -## Providing the API key and API id - -In order for the client to make requests to the [Splunk On-Call API](https://portal.victorops.com/public/api-docs.html#/) it needs an [API ID and an API Key](https://help.victorops.com/knowledge-base/api/). - -Then start the backend passing the values as an environment variable: - -```bash -$ SPLUNK_ON_CALL_API_KEY='' SPLUNK_ON_CALL_API_ID='' yarn start -``` - -This will proxy the request by adding `X-VO-Api-Id` and `X-VO-Api-Key` headers with the provided values. - -You can also add the values in your helm template: - -```yaml -# backend-secret.yaml -stringData: - # ... - SPLUNK_ON_CALL_API_ID: { { .Values.auth.splunkOnCallApiId } } - SPLUNK_ON_CALL_API_KEY: { { .Values.auth.splunkOnCallApiKey } } -``` - -To enable it you need to provide them in the chart's values: - -```yaml -# values.yaml -auth: - # ... - splunkOnCallApiId: h - splunkOnCallApiKey: h -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-splunk-on-call` instead. diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index 78307781953d62..86fb391a829887 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-splunk-on-call", - "version": "0.4.23", + "version": "0.4.24", "description": "A Backstage plugin that integrates towards Splunk On-Call", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-splunk-on-call" }, "publishConfig": { "access": "public", @@ -64,5 +65,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-splunk-on-call instead." } diff --git a/plugins/stack-overflow-backend/CHANGELOG.md b/plugins/stack-overflow-backend/CHANGELOG.md index c34bec1e1903e5..cc8267442612e1 100644 --- a/plugins/stack-overflow-backend/CHANGELOG.md +++ b/plugins/stack-overflow-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-stack-overflow-backend +## 0.2.22 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-search-backend-module-stack-overflow-collator@0.1.10 + ## 0.2.21 ### Patch Changes diff --git a/plugins/stack-overflow-backend/README.md b/plugins/stack-overflow-backend/README.md index 8129d36e38512c..4bfcc2dd62d393 100644 --- a/plugins/stack-overflow-backend/README.md +++ b/plugins/stack-overflow-backend/README.md @@ -1,3 +1,3 @@ -# Stack Overflow Backend +# Deprecated -Deprecated, consider using `@backstage/plugin-search-backend-module-stack-overflow-collator` instead. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-stack-overflow-backend` instead. diff --git a/plugins/stack-overflow-backend/package.json b/plugins/stack-overflow-backend/package.json index 8a106d0b1896ae..a04f24e8cfe61b 100644 --- a/plugins/stack-overflow-backend/package.json +++ b/plugins/stack-overflow-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-stack-overflow-backend", - "version": "0.2.21", + "version": "0.2.22", "description": "Deprecated, consider using @backstage/plugin-search-backend-module-stack-overflow-collator instead", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-stack-overflow-backend" }, "publishConfig": { "access": "public", @@ -46,5 +47,6 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-stack-overflow-backend instead." } diff --git a/plugins/stack-overflow/CHANGELOG.md b/plugins/stack-overflow/CHANGELOG.md index fb8dc821fb3361..2cc102d2e4d269 100644 --- a/plugins/stack-overflow/CHANGELOG.md +++ b/plugins/stack-overflow/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-stack-overflow +## 0.1.30 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-plugin-api@0.6.4 + - @backstage/plugin-home-react@0.1.12 + - @backstage/plugin-search-common@1.2.11 + - @backstage/plugin-search-react@1.7.10 + ## 0.1.29 ### Patch Changes diff --git a/plugins/stack-overflow/README.md b/plugins/stack-overflow/README.md index 96a8f524e33ca1..291e4c8b4fe398 100644 --- a/plugins/stack-overflow/README.md +++ b/plugins/stack-overflow/README.md @@ -1,54 +1,3 @@ -# Stack Overflow +# Deprecated -A plugin that provides stack overflow specific functionality that can be used in different ways (e.g. for homepage and search) to compose your Backstage App. - -## Getting started - -Before we begin, make sure: - -- You have created your own standalone Backstage app using @backstage/create-app and not using a fork of the backstage repository. If you haven't setup Backstage already, start [here](https://backstage.io/docs/getting-started/). - -To use any of the functionality this plugin provides, you need to start by configuring your App with the following config: - -```yaml -stackoverflow: - baseUrl: https://api.stackexchange.com/2.2 # alternative: your internal stack overflow instance -``` - -## Areas of Responsibility - -This stack overflow frontend plugin is primarily responsible for the following: - -- Exposing various stack-overflow related components like `` which can be used for composing the search page, and `` which can be used for composing the homepage. - -#### Use specific search result list item for Stack Overflow Question - -> Note: For Stack Overflow specific search results to be returned, it needs to be indexed. Use the [stack-overflow-backend plugin](https://github.com/backstage/backstage/blob/master/plugins/stack-overflow-backend/README.md) to index Stack Overflow Questions to search. - -When you have your `packages/app/src/components/search/SearchPage.tsx` file ready to make modifications, add the following code snippet to add the `StackOverflowSearchResultListItem` when the type of the search results are `stack-overflow`. - -```tsx - case 'stack-overflow': - return ( - - ); -``` - -#### Use Stack Overflow Questions on your homepage - -Before you are able to add the stack overflow question component to your homepage, you need to go through the [homepage getting started guide](https://backstage.io/docs/getting-started/homepage). When its ready, add the following code snippet to your `packages/app/src/components/home/HomePage.tsx` file. - -```tsx - - - -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-stack-overflow` instead. diff --git a/plugins/stack-overflow/package.json b/plugins/stack-overflow/package.json index fe56e2106b9d98..517ab9a129e4e8 100644 --- a/plugins/stack-overflow/package.json +++ b/plugins/stack-overflow/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-stack-overflow", - "version": "0.1.29", + "version": "0.1.30", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-stack-overflow" }, "publishConfig": { "access": "public" @@ -75,5 +76,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-stack-overflow instead." } diff --git a/plugins/stackstorm/CHANGELOG.md b/plugins/stackstorm/CHANGELOG.md index 6d96687c1e4804..0163e7a6d0968c 100644 --- a/plugins/stackstorm/CHANGELOG.md +++ b/plugins/stackstorm/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-stackstorm +## 0.1.16 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + ## 0.1.15 ### Patch Changes diff --git a/plugins/stackstorm/README.md b/plugins/stackstorm/README.md index 0d5caeaca2492f..404cff38ab46bb 100644 --- a/plugins/stackstorm/README.md +++ b/plugins/stackstorm/README.md @@ -1,61 +1,3 @@ -# StackStorm Plugin +# Deprecated -Welcome to the StackStorm plugin! - -A Backstage integration for the [StackStorm](https://docs.stackstorm.com/overview.html). -This plugin allows you to display a list of executions, view execution details, -browse installed packs, actions and more. - -## Getting started - -To get started, first you need a running instance of StackStorm. -One of the quickest ways is [running StackStorm with Docker](https://docs.stackstorm.com/install/docker.html). - -### Installation - -1. Install the plugin with `yarn` in the root of your Backstage directory - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-stackstorm -``` - -2. Import and use the plugin in `packages/app/src/App.tsx` - -```tsx -import { StackstormPage } from '@backstage/plugin-stackstorm'; - -const routes = ( - - {/* ...other routes */} - } /> - -``` - -### Configuration - -1. Configure `webUrl` for links to the StackStorm Web UI in `app-config.yaml`. - -```yaml -stackstorm: - webUrl: 'https://your.stackstorm.webui.com' -``` - -2. Configure `stackstorm` proxy - This plugin uses the Backstage proxy to securely communicate with StackStorm API. - Add the following to your `app-config.yaml` to enable this configuration: - -```yaml -proxy: - '/stackstorm': - target: https://your.stackstorm.instance.com/api - headers: - St2-Api-Key: ${ST2_API_KEY} -``` - -In your production deployment of Backstage, you would also need to ensure that -you've set the `ST2_API_KEY` environment variable before starting -the backend. - -Read more about how to find or generate this key in the -[StackStorm Authentication Documentation](https://docs.stackstorm.com/authentication.html#api-keys). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-stackstorm` instead. diff --git a/plugins/stackstorm/package.json b/plugins/stackstorm/package.json index 36510d02b5c03f..529622594a706c 100644 --- a/plugins/stackstorm/package.json +++ b/plugins/stackstorm/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-stackstorm", - "version": "0.1.15", + "version": "0.1.16", "description": "A Backstage plugin that integrates towards StackStorm", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-stackstorm" }, "publishConfig": { "access": "public", @@ -62,5 +63,6 @@ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-stackstorm instead." } diff --git a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md index 7f6c13deb08f4d..e9ff9a33e90fdb 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.50 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-tech-insights-common@0.2.13 + - @backstage/plugin-tech-insights-node@0.6.1 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.1.49 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/README.md b/plugins/tech-insights-backend-module-jsonfc/README.md index 33b3ad77186ee6..6f96adcaf7b418 100644 --- a/plugins/tech-insights-backend-module-jsonfc/README.md +++ b/plugins/tech-insights-backend-module-jsonfc/README.md @@ -1,155 +1,3 @@ -# Tech Insights Backend JSON Rules engine fact checker module +# Deprecated -This is an extension to module to tech-insights-backend plugin, which provides basic framework and functionality to implement tech insights within Backstage. - -This module provides functionality to run checks against a [json-rules-engine](https://github.com/CacheControl/json-rules-engine) and provide boolean logic by simply building checks using JSON conditions. - -## Getting started - -To add this FactChecker into your Tech Insights you need to install the module into your backend application: - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-tech-insights-backend-module-jsonfc -``` - -### Add to the backend - -```ts title="packages/backend/src/index.ts" -backend.add(import('@backstage/plugin-tech-insights-backend-module-jsonfc')); -``` - -This setup requires checks to be provided using the config. - -### Add to the backend (old) - -Modify the `techInsights.ts` file to contain a reference to the FactCheckers implementation. - -```diff -+import { JsonRulesEngineFactCheckerFactory } from '@backstage/plugin-tech-insights-backend-module-jsonfc'; - -+const myFactCheckerFactory = new JsonRulesEngineFactCheckerFactory({ -+ checks: [], -+ logger: env.logger, -+}), - - const builder = buildTechInsightsContext({ - logger: env.logger, - config: env.config, - database: env.database, - discovery: env.discovery, - tokenManager: env.tokenManager, - factRetrievers: [myFactRetrieverRegistration], -+ factCheckerFactory: myFactCheckerFactory - }); -``` - -By default, this implementation comes with an in-memory storage to store checks. You can inject an additional data store by adding an implementation of `TechInsightCheckRegistry` into the constructor options when creating a `JsonRulesEngineFactCheckerFactory`. That can be done as follows - -```diff - const myTechInsightCheckRegistry: TechInsightCheckRegistry = // snip - const myFactCheckerFactory = new JsonRulesEngineFactCheckerFactory({ - checks: [], - logger: env.logger, -+ checkRegistry: myTechInsightCheckRegistry - }), - -``` - -## Adding checks in code - -Checks for this FactChecker are constructed as [`json-rules-engine` compatible JSON rules](https://github.com/CacheControl/json-rules-engine/blob/master/docs/rules.md#conditions). A check could look like the following for example: - -```ts -import { - JSON_RULE_ENGINE_CHECK_TYPE, - TechInsightJsonRuleCheck, -} from '@backstage/plugin-tech-insights-backend-module-jsonfc'; - -export const exampleCheck: TechInsightJsonRuleCheck = { - id: 'demodatacheck', // Unique identifier of this check - name: 'demodatacheck', // A human readable name of this check to be displayed in the UI - type: JSON_RULE_ENGINE_CHECK_TYPE, // Type identifier of the check. Used to run logic against, determine persistence option to use and render correct components on the UI - description: 'A fact check for demoing purposes', // A description to be displayed in the UI - factIds: ['documentation-number-factretriever'], // References to fact ids that this check uses. See documentation on FactRetrievers for more information on these - rule: { - // The actual rule - conditions: { - all: [ - // 2 options are available, all and any conditions. - { - fact: 'examplenumberfact', // Reference to an individual fact to check against - operator: 'greaterThanInclusive', // Operator to use. See: https://github.com/CacheControl/json-rules-engine/blob/master/docs/rules.md#operators for more - value: 2, // The threshold value that the fact must satisfy - }, - ], - }, - }, - successMetadata: { - // Additional metadata to be returned if the check has passed - link: 'https://link.to.some.information.com', - }, - failureMetadata: { - // Additional metadata to be returned if the check has failed - link: 'https://sonar.mysonarqube.com/increasing-number-value', - }, -}; -``` - -## Adding checks in config - -Example: - -```yaml title="app-config.yaml" -techInsights: - factChecker: - checks: - groupOwnerCheck: - type: json-rules-engine - name: Group Owner Check - description: Verifies that a group has been set as the spec.owner for this entity - factIds: - - entityOwnershipFactRetriever - rule: - conditions: - all: - - fact: hasGroupOwner - operator: equal - value: true -``` - -### More than one `factIds` for a check. - -When more than one is supplied, the requested fact **MUST** be present in at least one of the fact retrievers. -The order of the fact retrievers defined in the `factIds` array has no bearing on the checks, the check will merge all facts from the various retrievers, and then check against latest fact . - -# Custom operators - -json-rules-engine supports a limited [number of built-in operators](https://github.com/CacheControl/json-rules-engine/blob/master/docs/rules.md#operators) that can be used in conditions. You can add your own operators by adding them to the `operators` array in the `JsonRulesEngineFactCheckerFactory` constructor. For example: - -```diff -+ import { Operator } from 'json-rules-engine'; - -const myFactCheckerFactory = new JsonRulesEngineFactCheckerFactory({ - checks: [], - logger: env.logger, -+ operators: [ new Operator("startsWith", (a, b) => a.startsWith(b) ] -}) -``` - -And you can then use it in your checks like this: - -```js -... -rule: { - conditions: { - any: [ - { - fact: 'version', - operator: 'startsWith', - value: '12', - }, - ], - }, -} -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-tech-insights-backend-module-jsonfc` instead. diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index 1bde53d76d7a59..5c62cdd5492319 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-tech-insights-backend-module-jsonfc", - "version": "0.1.49", + "version": "0.1.50", "backstage": { - "role": "backend-plugin-module" + "role": "backend-plugin-module", + "moved": "@backstage-community/plugin-tech-insights-backend-module-jsonfc" }, "publishConfig": { "access": "public", @@ -53,5 +54,6 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^" }, - "configSchema": "config.json" + "configSchema": "config.json", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-tech-insights-backend-module-jsonfc instead." } diff --git a/plugins/tech-insights-backend/CHANGELOG.md b/plugins/tech-insights-backend/CHANGELOG.md index 6d9430c880e9d3..189bd9fc3d9bbd 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-tech-insights-backend +## 0.5.32 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-tech-insights-common@0.2.13 + - @backstage/plugin-tech-insights-node@0.6.1 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/backend-tasks@0.5.22 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.5.31 ### Patch Changes diff --git a/plugins/tech-insights-backend/README.md b/plugins/tech-insights-backend/README.md index 56b927a10ee6a2..3b19c5a3107a73 100644 --- a/plugins/tech-insights-backend/README.md +++ b/plugins/tech-insights-backend/README.md @@ -1,386 +1,3 @@ -# Tech Insights Backend +# Deprecated -This is the backend for the default Backstage Tech Insights feature. -This provides the API for the frontend tech insights, scorecards and fact visualization functionality, -as well as a framework to run fact retrievers and store fact values in to a data store. - -## Installation - -### Install the package - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-tech-insights-backend -``` - -### Adding the plugin to your `packages/backend` - -```ts title="packages/backend/src/index.ts" -backend.add(import('@backstage/plugin-tech-insights-backend')); -``` - -You can use the extension points [@backstage/plugin-tech-insights-node](../tech-insights-node) -to add your `FactRetriever` or set a `FactCheckerFactory`. - -The built-in `FactRetrievers`: - -- `entityMetadataFactRetriever` -- `entityOwnershipFactRetriever` -- `techdocsFactRetriever` - -`FactRetrievers` only get registered if they get configured: - -```yaml title="app-config.yaml" -techInsights: - factRetrievers: - entityOwnershipFactRetriever: - cadence: '*/15 * * * *' - lifecycle: { timeToLive: { weeks: 2 } } -``` - -### Adding the plugin to your `packages/backend` (old) - -You'll need to add the plugin to the router in your `backend` package. You can -do this by creating a file called `packages/backend/src/plugins/techInsights.ts`. An example content for `techInsights.ts` could be something like this. - -```ts -import { - createRouter, - buildTechInsightsContext, -} from '@backstage/plugin-tech-insights-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const builder = buildTechInsightsContext({ - logger: env.logger, - config: env.config, - database: env.database, - discovery: env.discovery, - scheduler: env.scheduler, - tokenManager: env.tokenManager, - factRetrievers: [], // Fact retrievers registrations you want tech insights to use - }); - - return await createRouter({ - ...(await builder), - logger: env.logger, - config: env.config, - }); -} -``` - -With the `techInsights.ts` router setup in place, add the router to -`packages/backend/src/index.ts`: - -```diff -+import techInsights from './plugins/techInsights'; - - async function main() { - ... - const createEnv = makeCreateEnv(config); - - const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); -+ const techInsightsEnv = useHotMemoize(module, () => createEnv('tech_insights')); - - const apiRouter = Router(); -+ apiRouter.use('/tech-insights', await techInsights(techInsightsEnv)); - ... - apiRouter.use(notFoundHandler()); - } -``` - -### Adding fact retrievers - -At this point the Tech Insights backend is installed in your backend package, but -you will not have any fact retrievers present in your application. To have the implemented FactRetrieverEngine within this package to be able to retrieve and store fact data into the database, you need to add these. - -To create factRetrieverRegistration you need to implement `FactRetriever` interface defined in `@backstage/plugin-tech-insights-node` package (see [Creating fact retrievers](#creating-fact-retrievers) for details). After you have implemented this interface you can wrap that into a registration object like follows: - -```ts -import { createFactRetrieverRegistration } from '@backstage/plugin-tech-insights-backend'; - -const myFactRetriever = { - /** - * snip - */ -}; - -const myFactRetrieverRegistration = createFactRetrieverRegistration({ - cadence: '1 * 2 * * ', // On the first minute of the second day of the month - factRetriever: myFactRetriever, -}); -``` - -FactRetrieverRegistration also accepts an optional `lifecycle` configuration value. This can be either MaxItems or TTL (time to live). Valid options for this value are either a number for MaxItems or a Luxon duration like object for TTL. For example: - -```ts -const maxItems = { maxItems: 7 }; // Deletes all but 7 latest facts for each id/entity pair -const ttl = { timeToLive: 1209600000 }; // (2 weeks) Deletes items older than 2 weeks -const ttlWithAHumanReadableValue = { timeToLive: { weeks: 2 } }; // Deletes items older than 2 weeks -``` - -To register these fact retrievers to your application you can modify the example `techInsights.ts` file shown above like this: - -```diff -const builder = buildTechInsightsContext({ - logger: env.logger, - config: env.config, - database: env.database, - discovery: env.discovery, - tokenManager: env.tokenManager, - scheduler: env.scheduler, -- factRetrievers: [], -+ factRetrievers: [myFactRetrieverRegistration], -}); -``` - -#### Running fact retrievers in a multi-instance installation - -The Tech Insights plugin utilizes the `PluginTaskScheduler` for scheduling tasks and coordinating the task invocation across instances. See [the PluginTaskScheduler documentation](https://backstage.io/docs/reference/backend-tasks.plugintaskscheduler) for more information. - -### Creating Fact Retrievers - -A Fact Retriever consist of four required and one optional parts: - -1. `id` - unique identifier of a fact retriever -2. `version`: A semver string indicating the current version of the schema and the handler -3. `schema` - A versioned schema defining the shape of data a fact retriever returns -4. `handler` - An asynchronous function handling the logic of retrieving and returning facts for an entity -5. `entityFilter` - (Optional) EntityFilter object defining the entity kinds, types and/or names this fact retriever handles - -An example implementation of a FactRetriever could for example be as follows: - -```ts -import { FactRetriever } from '@backstage/plugin-tech-insights-node'; - -const myFactRetriever: FactRetriever = { - id: 'documentation-number-factretriever', // unique identifier of the fact retriever - version: '0.1.1', // SemVer version number of this fact retriever schema. This should be incremented if the implementation changes - entityFilter: [{ kind: 'component' }], // EntityFilter to be used in the future (creating checks, graphs etc.) to figure out which entities this fact retrieves data for. - schema: { - // Name/identifier of an individual fact that this retriever returns - examplenumberfact: { - type: 'integer', // Type of the fact - description: 'A fact of a number', // Description of the fact - }, - }, - handler: async ctx => { - // Handler function that retrieves the fact - const { discovery, config, logger } = ctx; - const catalogClient = new CatalogClient({ - discoveryApi: discovery, - }); - const entities = await catalogClient.getEntities( - { - filter: [{ kind: 'component' }], - }, - { token }, - ); - /** - * snip: Do complex logic to retrieve facts from external system or calculate fact values - */ - - // Respond with an array of entity/fact values - return entities.items.map(it => { - return { - // Entity information that this fact relates to - entity: { - namespace: it.metadata.namespace, - kind: it.kind, - name: it.metadata.name, - }, - - // All facts that this retriever returns - facts: { - examplenumberfact: 2, // - }, - // (optional) timestamp to use as a Luxon DateTime object - }; - }); - }, -}; -``` - -### Adding a fact checker - -This module comes with a possibility to additionally add a fact checker and expose fact checking endpoints from the API. To be able to enable this feature you need to add a FactCheckerFactory implementation to be part of the `DefaultTechInsightsBuilder` constructor call. - -There is a default FactChecker implementation provided in module `@backstage/plugin-tech-insights-backend-module-jsonfc`. This implementation uses `json-rules-engine` as the underlying functionality to run checks. If you want to implement your own FactChecker, for example to be able to handle other than `boolean` result types, you can do so by implementing `FactCheckerFactory` and `FactChecker` interfaces from `@backstage/plugin-tech-insights-common` package. - -To add the default FactChecker into your Tech Insights you need to install the module into your backend application: - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-tech-insights-backend-module-jsonfc -``` - -and modify the `techInsights.ts` file to contain a reference to the FactChecker implementation. - -```diff -+import { JsonRulesEngineFactCheckerFactory } from '@backstage/plugin-tech-insights-backend-module-jsonfc'; - -+const myFactCheckerFactory = new JsonRulesEngineFactCheckerFactory({ -+ checks: [], -+ logger: env.logger, -+}), - - const builder = new DefaultTechInsightsBuilder({ - logger: env.logger, - config: env.config, - database: env.database, - discovery: env.discovery, - tokenManager: env.tokenManager, - factRetrievers: [myFactRetrieverRegistration], -+ factCheckerFactory: myFactCheckerFactory - }); -``` - -NOTE: You need a Fact Checker Factory to get access to the backend routes that will allow the facts to be checked. If you don't have a Fact Checker Factory you will see 404s and potentially other errors. - -To be able to run checks, you need to additionally add individual checks into your FactChecker implementation. For examples how to add these, you can check the documentation of the individual implementation of the FactChecker - -#### Modifying check persistence - -The default FactChecker implementation comes with an in-memory storage to store checks. You can inject an additional data store by adding an implementation of `TechInsightCheckRegistry` into the constructor options when creating a `JsonRulesEngineFactCheckerFactory`. That can be done as follows: - -```diff -const myTechInsightCheckRegistry: TechInsightCheckRegistry = // snip -const myFactCheckerFactory = new JsonRulesEngineFactCheckerFactory({ - checks: [], - logger: env.logger, -+ checkRegistry: myTechInsightCheckRegistry -}), - -``` - -## Included FactRetrievers - -There are three FactRetrievers that come out of the box with Tech Insights: - -- `entityMetadataFactRetriever`: Generates facts which indicate the completeness of entity metadata -- `entityOwnershipFactRetriever`: Generates facts which indicate the quality of data in the spec.owner field -- `techdocsFactRetriever`: Generates facts related to the completeness of techdocs configuration for entities - -## Backend Example - -Here's an example backend setup that will use the three included fact retrievers so you can get an idea of how this all works. This will be the entire contents of your `techInsights.ts` file found at `\packages\backend\src\plugins` as per [Adding the plugin to your `packages/backend`](#adding-the-plugin-to-your-packagesbackend) - -```ts -import { - createRouter, - buildTechInsightsContext, - createFactRetrieverRegistration, - entityOwnershipFactRetriever, - entityMetadataFactRetriever, - techdocsFactRetriever, -} from '@backstage/plugin-tech-insights-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; -import { - JsonRulesEngineFactCheckerFactory, - JSON_RULE_ENGINE_CHECK_TYPE, -} from '@backstage/plugin-tech-insights-backend-module-jsonfc'; - -const ttlTwoWeeks = { timeToLive: { weeks: 2 } }; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const techInsightsContext = await buildTechInsightsContext({ - logger: env.logger, - config: env.config, - database: env.database, - discovery: env.discovery, - tokenManager: env.tokenManager, - scheduler: env.scheduler, - factRetrievers: [ - createFactRetrieverRegistration({ - cadence: '0 */6 * * *', // Run every 6 hours - https://crontab.guru/#0_*/6_*_*_* - factRetriever: entityOwnershipFactRetriever, - lifecycle: ttlTwoWeeks, - }), - createFactRetrieverRegistration({ - cadence: '0 */6 * * *', - factRetriever: entityMetadataFactRetriever, - lifecycle: ttlTwoWeeks, - }), - createFactRetrieverRegistration({ - cadence: '0 */6 * * *', - factRetriever: techdocsFactRetriever, - lifecycle: ttlTwoWeeks, - }), - ], - factCheckerFactory: new JsonRulesEngineFactCheckerFactory({ - logger: env.logger, - checks: [ - { - id: 'groupOwnerCheck', - type: JSON_RULE_ENGINE_CHECK_TYPE, - name: 'Group Owner Check', - description: - 'Verifies that a Group has been set as the owner for this entity', - factIds: ['entityOwnershipFactRetriever'], - rule: { - conditions: { - all: [ - { - fact: 'hasGroupOwner', - operator: 'equal', - value: true, - }, - ], - }, - }, - }, - { - id: 'titleCheck', - type: JSON_RULE_ENGINE_CHECK_TYPE, - name: 'Title Check', - description: - 'Verifies that a Title, used to improve readability, has been set for this entity', - factIds: ['entityMetadataFactRetriever'], - rule: { - conditions: { - all: [ - { - fact: 'hasTitle', - operator: 'equal', - value: true, - }, - ], - }, - }, - }, - { - id: 'techDocsCheck', - type: JSON_RULE_ENGINE_CHECK_TYPE, - name: 'TechDocs Check', - description: - 'Verifies that TechDocs has been enabled for this entity', - factIds: ['techdocsFactRetriever'], - rule: { - conditions: { - all: [ - { - fact: 'hasAnnotationBackstageIoTechdocsRef', - operator: 'equal', - value: true, - }, - ], - }, - }, - }, - ], - }), - }); - - return await createRouter({ - ...techInsightsContext, - logger: env.logger, - config: env.config, - }); -} -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-tech-insights-backend` instead. diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index c536ae287a05fe..85e4dc82d24093 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-tech-insights-backend", - "version": "0.5.31", + "version": "0.5.32", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-tech-insights-backend" }, "publishConfig": { "access": "public", @@ -67,5 +68,6 @@ "supertest": "^6.1.3", "wait-for-expect": "^3.0.2" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-tech-insights-backend instead." } diff --git a/plugins/tech-insights-common/CHANGELOG.md b/plugins/tech-insights-common/CHANGELOG.md index 15e8949b5caa12..c0537a6e5da2cf 100644 --- a/plugins/tech-insights-common/CHANGELOG.md +++ b/plugins/tech-insights-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights-common +## 0.2.13 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/types@1.1.1 + ## 0.2.12 ### Patch Changes diff --git a/plugins/tech-insights-common/README.md b/plugins/tech-insights-common/README.md index af14ef0e0d94d2..9cfc812797da4d 100644 --- a/plugins/tech-insights-common/README.md +++ b/plugins/tech-insights-common/README.md @@ -1,3 +1,3 @@ -# Tech Insights Common +# Deprecated -Common types and functionalities for tech insights shared in an isomorphic manner between BE and FE implementations. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-tech-insights-common` instead. diff --git a/plugins/tech-insights-common/package.json b/plugins/tech-insights-common/package.json index bcaaca84e5961f..23bc81bfc53f6a 100644 --- a/plugins/tech-insights-common/package.json +++ b/plugins/tech-insights-common/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-tech-insights-common", - "version": "0.2.12", + "version": "0.2.13", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-tech-insights-common" }, "publishConfig": { "access": "public", @@ -42,5 +43,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-tech-insights-common instead." } diff --git a/plugins/tech-insights-node/CHANGELOG.md b/plugins/tech-insights-node/CHANGELOG.md index 6efcd7df393f0d..26c0f4c5144e77 100644 --- a/plugins/tech-insights-node/CHANGELOG.md +++ b/plugins/tech-insights-node/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-tech-insights-node +## 0.6.1 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-tech-insights-common@0.2.13 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + ## 0.6.0 ### Minor Changes diff --git a/plugins/tech-insights-node/README.md b/plugins/tech-insights-node/README.md index 40656118373763..1de60038432da8 100644 --- a/plugins/tech-insights-node/README.md +++ b/plugins/tech-insights-node/README.md @@ -1,3 +1,3 @@ -# Tech Insights Node +# Deprecated -Common types and functionalities for tech insights backend implementations to be shared between tech-insights-backend and individual implementations of FactRetrievers, FactCheckers and their persistence options. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-tech-insights-node` instead. diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index 4d18010237b3f3..5578060a203b08 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-tech-insights-node", - "version": "0.6.0", + "version": "0.6.1", "backstage": { - "role": "node-library" + "role": "node-library", + "moved": "@backstage-community/plugin-tech-insights-node" }, "publishConfig": { "access": "public", @@ -45,5 +46,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-tech-insights-node instead." } diff --git a/plugins/tech-insights/CHANGELOG.md b/plugins/tech-insights/CHANGELOG.md index 2e89e91c312cd1..b566a46520c703 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-tech-insights +## 0.3.27 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-tech-insights-common@0.2.13 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.3.26 ### Patch Changes diff --git a/plugins/tech-insights/README.md b/plugins/tech-insights/README.md index 9145e892e7dd74..46c9f2d9a21523 100644 --- a/plugins/tech-insights/README.md +++ b/plugins/tech-insights/README.md @@ -1,152 +1,3 @@ -# Tech Insights +# Deprecated -This plugin provides the UI for the `@backstage/tech-insights-backend` plugin, in order to display results of the checks running following the rules and the logic defined in the `@backstage/tech-insights-backend` plugin itself. - -Main areas covered by this plugin currently are: - -- Providing an overview for default boolean checks in a form of Scorecards. - -- Providing an option to render different custom components based on type of the checks running in the backend. - -## Installation - -### Install the plugin - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-tech-insights -``` - -### Add boolean checks overview (Scorecards) page to the EntityPage: - -```tsx -// packages/app/src/components/catalog/EntityPage.tsx - -import { EntityTechInsightsScorecardContent } from '@backstage/plugin-tech-insights'; - -const serviceEntityPage = ( - - - {overviewContent} - - - {cicdContent} - - ... - - - - ... - -); -``` - -It is obligatory to pass `title` prop to `EntityTechInsightsScorecardContent`, `description` prop is optional. - -If you like to display multiple cards in a `EntityLayout.Route` use `EntityTechInsightsScorecardCard`. - -You can pass an array `checksId` as a prop with the [Fact Retrievers ids](../tech-insights-backend#creating-fact-retrievers) to limit which checks you want to show in this card. If you don't pass, the default value is show all checks. - -```tsx - -``` - -If you want to show checks in the overview of an entity use `EntityTechInsightsScorecardCard`. - -```tsx -// packages/app/src/components/catalog/EntityPage.tsx - -import { EntityTechInsightsScorecardCard } from '@backstage/plugin-tech-insights'; - -const overviewContent = ( - - {entityWarningContent} - - - - - - - ... - - - - -); -``` - -## Boolean Scorecard Example - -If you follow the [Backend Example](https://github.com/backstage/backstage/tree/master/plugins/tech-insights-backend#backend-example), once the needed facts have been generated the default boolean scorecard will look like this: - -![Boolean Scorecard Example](./docs/boolean-scorecard-example.png) - -## Adding custom rendering components - -Default scorecard implementation displays only `json-rules-engine` check results. If you would like to support different types, you need to inject custom rendering components to the `TechInsightsClient` constructor. - -```ts -// packages/app/src/apis.ts - -export const apis: AnyApiFactory[] = [ -... - createApiFactory({ - api: techInsightsApiRef, - deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef }, - factory: ({ discoveryApi, identityApi }) => - new TechInsightsClient({ - discoveryApi, - identityApi, - renderers: [ - jsonRulesEngineCheckResultRenderer, // default json-rules-engine renderer - myCustomBooleanRenderer, // custom renderer - ], - }), - }), -... -]; -``` - -```tsx -// packages/app/src/components/myCustomBooleanRenderer.tsx - -export const myCustomBooleanRenderer: CheckResultRenderer = { - type: 'boolean', - component: (checkResult: CheckResult) => ( - - ), -}; -``` - -It's also possible to customize the description. Both strings and React components are accepted. As an example, you would like -to display another information if the check has failed. In such cases, you could do something like the following: - -```tsx -// packages/app/src/components/myCustomBooleanRenderer.tsx - -export const myCustomBooleanRenderer: CheckResultRenderer = { - type: 'boolean', - component: (checkResult: CheckResult) => ( - - ), - description: (checkResult: CheckResult) => ( - <> - { - checkResult.result - ? checkResult.check.description // In case of success, return the same description - : `The check has failed! ${checkResult.check.description}` // Add a prefix text if the check failed - } - - ), -}; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-tech-insights` instead. diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 61ed06e44e47b6..9c7cf95a89e589 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -1,8 +1,9 @@ { "name": "@backstage/plugin-tech-insights", - "version": "0.3.26", + "version": "0.3.27", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-tech-insights" }, "publishConfig": { "access": "public", @@ -57,5 +58,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-tech-insights instead." } diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md index b95e57650f71e5..cacbde4e66002d 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-tech-radar +## 0.7.4 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-compat-api@0.2.4 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/frontend-plugin-api@0.6.4 + ## 0.7.3 ### Patch Changes diff --git a/plugins/tech-radar/README.md b/plugins/tech-radar/README.md index f90bd2748e7f90..12dbd7196ce403 100644 --- a/plugins/tech-radar/README.md +++ b/plugins/tech-radar/README.md @@ -1,261 +1,3 @@ -# @backstage/plugin-tech-radar +# Deprecated -Screenshot of Tech Radar plugin - -The Backstage integration for the Tech Radar based on [Zalando's Tech Radar](https://opensource.zalando.com/tech-radar/) open sourced on [GitHub](https://github.com/zalando/tech-radar). This is used at [Spotify](https://spotify.github.io) for visualizing the official guidelines of different areas of software development such as languages, frameworks, infrastructure and processes. - -Read the [blog post on backstage.io about the Tech Radar](https://backstage.io/blog/2020/05/14/tech-radar-plugin). - -## Purpose - -Zalando has a fantastic description [on their website](https://opensource.zalando.com/tech-radar/): - -> The Tech Radar is a tool to inspire and support engineering teams at Zalando to pick the best technologies for new projects; it provides a platform to share knowledge and experience in technologies, to reflect on technology decisions and continuously evolve our technology landscape. Based on the pioneering work of ThoughtWorks, our Tech Radar sets out the changes in technologies that are interesting in software development — changes that we think our engineering teams should pay attention to and consider using in their projects. - -It serves and scales well for teams and companies of all sizes that want to have alignment across dozens of technologies and visualize it in a simple way. - -## Getting Started - -The Tech Radar can be used in two ways: - -- **Simple (Recommended)** - This gives you an out-of-the-box Tech Radar experience. It lives on the `/tech-radar` URL of your Backstage installation. -- **Advanced** - This gives you the React UI component directly. It enables you to insert the Radar on your own layout or page for a more customized feel. - -### Install - -For either simple or advanced installations, you'll need to add the dependency using Yarn: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-tech-radar -``` - -### Configuration - -Modify your app routes to include the Router component exported from the tech radar, for example: - -```tsx -// In packages/app/src/App.tsx -import { TechRadarPage } from '@backstage/plugin-tech-radar'; - -const routes = ( - - {/* ...other routes */} - } - /> -``` - -If you'd like to configure it more, see the `TechRadarPageProps` and `TechRadarComponentProps` types for options: - -```ts -export type TechRadarPageProps = TechRadarComponentProps & { - title?: string; - subtitle?: string; - pageTitle?: string; -}; - -export interface TechRadarPageProps { - width: number; - height: number; - svgProps?: object; -} -``` - -### Radar properties - -When defining the radar entries you can see the available properties on the file [api](./src/api.ts) - -## Tech radar data model - -| Name | Type | Description | Required? | -| ----------- | ----------------------- | -------------------------------------------------------------------- | --------- | -| `title` | string | The title of the radar | Yes | -| `quadrants` | [quadrant[]](#quadrant) | The 4 quadrants of the radar, clockwise starting at the bottom right | Yes | -| `rings` | [ring[]](#ring) | The radar rings, starting from the inside | Yes | -| `entries` | [entry[]](#entry) | The radar entries | Yes | - -### quadrant - -| Name | Type | Description | Required? | -| ------ | ------ | ------------------------ | --------- | -| `id` | string | The id of the quadrant | Yes | -| `name` | string | The name of the quadrant | Yes | - -### ring - -| Name | Type | Description | Required? | -| ------------- | ------ | ------------------------------------------------- | --------- | -| `id` | string | The id of the ring | Yes | -| `name` | string | The name of the ring | Yes | -| `color` | string | The color of the ring and entries inside the ring | Yes | -| `description` | string | Description of the Ring | No | - -### entry - -| Name | Type | Description | Required? | -| ------------- | ----------------------- | ----------------------------------------------- | --------- | -| `id` | string | The unique id from the entry | Yes | -| `title` | string | The title that is shown in the radar | Yes | -| `description` | string | The full description of the entry | No | -| key | string | The entry key | Yes | -| `url` | string | The URL to the entry internal or external page | No | -| `quadrant` | string | The name of the quadrant connected to the entry | Yes | -| `timeline` | [timeline[]](#timeline) | Requires minimal one timeline entry | Yes | - -### timeline - -| Name | Type | Description | Required? | -| ------------- | ------ | ------------------------------------------------------------- | --------- | -| `moved` | number | Possible values are: -1 (moved out), 0 (stayed), 1 (moved in) | Yes | -| `ringId` | string | The ring id | Yes | -| `date` | string | Date in format (YYYY-MM-dd) | Yes | -| `description` | string | A long description | Yes | - -### Sample - -This is a sample on how the JSON file could look like. -The TS example can be found [here](src/sample.ts). - -```JSON -{ - "title": "Title of your Tech radar", - "quadrants": [ - { - "id": "1", - "name": "Bottom right" - }, - { - "id": "2", - "name": "Bottom left" - }, - { - "id": "3", - "name": "Top left" - }, - { - "id": "4", - "name": "Top right" - } - ], - "rings": [ - { - "id": "adopt", - "name": "ADOPT", - "color": "#93c47d" - }, - { - "id": "trial", - "name": "TRIAL", - "color": "#93d2c2" - }, - { - "id": "assess", - "name": "ASSESS", - "color": "#fbdb84" - }, - { - "id": "hold", - "name": "HOLD", - "color": "#efafa9" - } - ], - "entries": [ - { - "id": "typescript", - "title": "Typescript", - "description": "Long description for Typescript", - "key": "typescript", - "url": "#", - "quadrant": "1", - "timeline": [ - { - "moved": 1, - "ringId": "adopt", - "date": "2022-02-08", - "description": "Long description for adopt" - }, - { - "moved": 0, - "ringId": "trial", - "date": "2022-02-06", - "description": "Long description for trial" - } - ] - }, - ... - ] -} -``` - -## Frequently Asked Questions - -### Who created the Tech Radar? - -[ThoughtWorks](https://thoughtworks.com/radar) created the Tech Radar concept, and [Zalando created the visualization](https://opensource.zalando.com/tech-radar/) that we use at Spotify and in this plugin. - -### How do I load in my own data? - -The `TechRadar` plugin uses the `techRadarApiRef` to get a client which implements the `TechRadarApi` interface. The default sample one is located [here](https://github.com/backstage/backstage/blob/master/plugins/tech-radar/src/sample.ts). To load your own data, you'll need to provide a class that implements the `TechRadarApi` and override the `techRadarApiRef` in the `app/src/apis.ts`. - -```ts -// app/src/lib/MyClient.ts -import { - TechRadarApi, - TechRadarLoaderResponse, -} from '@backstage/plugin-tech-radar'; - -export class MyOwnClient implements TechRadarApi { - async load(id: string | undefined): Promise { - // if needed id prop can be used to fetch the correct data - - const data = await fetch('https://mydata.json').then(res => res.json()); - - // For example, this converts the timeline dates into date objects - return { - ...data, - entries: data.entries.map(entry => ({ - ...entry, - timeline: entry.timeline.map(timeline => ({ - ...timeline, - date: new Date(timeline.date), - })), - })), - }; - } -} - -// app/src/apis.ts -import { MyOwnClient } from './lib/MyClient'; -import { techRadarApiRef } from '@backstage/plugin-tech-radar'; - -export const apis: AnyApiFactory[] = [ - /* - ... - */ - createApiFactory(techRadarApiRef, new MyOwnClient()), -]; -``` - -### How do I write tests? - -You can use the `svgProps` option to pass custom React props to the `` element we create for the Tech Radar. This complements well with the `data-testid` attribute and the `@testing-library/react` library we use in Backstage. - -```tsx - - -// Then, in your tests... -// const { getByTestId } = render(...); -// expect(getByTestId('tech-radar-svg')).toBeInTheDocument(); -``` - -### How do I support multiple radars - -The `TechRadarPage` and `TechRadarComponent` components both take an optional `id` prop which is subsequently passed to the `load` method of the API to distinguish which radar's data to load. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-tech-radar` instead. diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index 0b03684f78137e..38547863ffdbec 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-tech-radar", - "version": "0.7.3", + "version": "0.7.4", "description": "A Backstage plugin that lets you display a Tech Radar for your organization", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-tech-radar" }, "publishConfig": { "access": "public" @@ -76,5 +77,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-tech-radar instead." } diff --git a/plugins/todo-backend/CHANGELOG.md b/plugins/todo-backend/CHANGELOG.md index 3dad3cca275f19..e4b7fe01a0bc1f 100644 --- a/plugins/todo-backend/CHANGELOG.md +++ b/plugins/todo-backend/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-todo-backend +## 0.3.17 + +### Patch Changes + +- 89856da: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.3.16 ### Patch Changes diff --git a/plugins/todo-backend/README.md b/plugins/todo-backend/README.md index 0aec607b93295c..3e2558bb518950 100644 --- a/plugins/todo-backend/README.md +++ b/plugins/todo-backend/README.md @@ -1,78 +1,3 @@ -# @backstage/plugin-todo-backend +# Deprecated -Backend for the `@backstage/plugin-todo` plugin. Assists in scanning for and listing `// TODO` comments in source code repositories. - -## Installation - -Install the `@backstage/plugin-todo-backend` package in your backend packages, and then integrate the plugin using the following default setup for `src/plugins/todo.ts`: - -```ts -import { Router } from 'express'; -import { CatalogClient } from '@backstage/catalog-client'; -import { - createRouter, - TodoReaderService, - TodoScmReader, -} from '@backstage/plugin-todo-backend'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const todoReader = TodoScmReader.fromConfig(env.config, { - logger: env.logger, - reader: env.reader, - }); - - const catalogClient = new CatalogClient({ - discoveryApi: env.discovery, - }); - - const todoService = new TodoReaderService({ - todoReader, - catalogClient, - }); - - return await createRouter({ todoService }); -} -``` - -And then add to `packages/backend/src/index.ts`: - -```js -// In packages/backend/src/index.ts -import todo from './plugins/todo'; -// ... -async function main() { - // ... - const todoEnv = useHotMemoize(module, () => createEnv('todo')); - // ... - apiRouter.use('/todo', await todo(todoEnv)); -``` - -## Scanned Files - -The included `TodoReaderService` and `TodoScmReader` works by getting the entity source location from the catalog. - -The location source code is determined automatically. In case of the source code of the component is not in the same place of the entity YAML file, you can explicitly set the value of the [`backstage.io/source-location`](https://backstage.io/docs/features/software-catalog/well-known-annotations#backstageiosource-location) annotation of the entity, and if that is missing it falls back to the [`backstage.io/managed-by-location `](https://backstage.io/docs/features/software-catalog/well-known-annotations#backstageiomanaged-by-location) annotation. Only `url` locations are currently supported, meaning locally configured `file` locations won't work. Also note that dot-files and folders are ignored. - -## Parser Configuration - -The `TodoScmReader` accepts a `TodoParser` option, which can be used to configure your own parser. The default one is based on [Leasot](https://github.com/pgilad/leasot) and supports a wide range of languages. You can add to the list of supported tags by configuring your own version of the built-in parser, for example: - -```ts -import { - TodoScmReader, - createTodoParser, -} from '@backstage/plugin-todo-backend'; - -// ... - -const todoReader = TodoScmReader.fromConfig(env.config, { - logger: env.logger, - reader: env.reader, - parser: createTodoParser({ - additionalTags: ['NOTE', 'XXX'], - }), -}); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-todo-backend` instead. diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index cb6b3787c18649..ff85a8b7482180 100644 --- a/plugins/todo-backend/package.json +++ b/plugins/todo-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-todo-backend", - "version": "0.3.16", + "version": "0.3.17", "description": "A Backstage backend plugin that lets you browse TODO comments in your source code", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-todo-backend" }, "publishConfig": { "access": "public", @@ -53,5 +54,6 @@ "@backstage/repo-tools": "workspace:^", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-todo-backend instead." } diff --git a/plugins/todo/CHANGELOG.md b/plugins/todo/CHANGELOG.md index c4941faee1483e..e7d2cc80080042 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-todo +## 0.2.39 + +### Patch Changes + +- 89856da: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. + ## 0.2.38 ### Patch Changes diff --git a/plugins/todo/README.md b/plugins/todo/README.md index fd3a7f4733c2a0..01be891a423d74 100644 --- a/plugins/todo/README.md +++ b/plugins/todo/README.md @@ -1,107 +1,3 @@ -# @backstage/plugin-todo +# Deprecated -This plugin lists `// TODO` comments in source code. It currently exports a single component extension for use on entity pages. - -## Setup - -1. Run: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-todo -yarn --cwd packages/backend add @backstage/plugin-todo-backend -``` - -2. Add the plugin backend: - -In a new file named `todo.ts` under `backend/src/plugins`: - -```js -import { Router } from 'express'; -import { CatalogClient } from '@backstage/catalog-client'; -import { - createRouter, - TodoReaderService, - TodoScmReader, -} from '@backstage/plugin-todo-backend'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const todoReader = TodoScmReader.fromConfig(env.config, { - logger: env.logger, - reader: env.reader, - }); - - const catalogClient = new CatalogClient({ - discoveryApi: env.discovery, - }); - - const todoService = new TodoReaderService({ - todoReader, - catalogClient, - }); - - return await createRouter({ todoService }); -} -``` - -And then add to `packages/backend/src/index.ts`: - -```js -// In packages/backend/src/index.ts -import todo from './plugins/todo'; -// ... -async function main() { - // ... - const todoEnv = useHotMemoize(module, () => createEnv('todo')); - // ... - apiRouter.use('/todo', await todo(todoEnv)); -``` - -3. Add the plugin as a tab to your service entities: - -```jsx -// In packages/app/src/components/catalog/EntityPage.tsx -import { EntityTodoContent } from '@backstage/plugin-todo'; - -const serviceEntityPage = ( - - {/* other tabs... */} - - - -``` - -## Format - -The default parser uses [Leasot](https://github.com/pgilad/leasot), which supports a wide range of languages. By default it supports the `TODO` and `FIXME` tags, along with `@` prefix and author reference through with either a `()` suffix or trailing `/`. For more information on how to configure the parser, see `@backstage/plugin-todo-backend`. - -Below are some examples of formats that are supported by default: - -```ts -// TODO: Ideally this would be working - -// TODO(Rugvip): Not sure why this works, investigate - -// @todo: This worked last Monday /Rugvip - -// FIXME Nobody knows why this is here -``` - -Note that trailing comments are not supported, the following TODO would not be listed: - -```ts -function reverse(str: string) { - return str.reverse(); // TODO: optimize -} -``` - -The scanner also ignores all dot-files and directories, meaning TODOs inside of those will not be listed. - -## Extensions - -| name | description | -| ------------------- | ------------------------------------------------------------------------------- | -| `EntityTodoContent` | Content for an entity page, showing a table of TODO items for the given entity. | +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-todo` instead. diff --git a/plugins/todo/package.json b/plugins/todo/package.json index 2574b8347407fd..2b06897531a3aa 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-todo", - "version": "0.2.38", + "version": "0.2.39", "description": "A Backstage plugin that lets you browse TODO comments in your source code", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-todo" }, "publishConfig": { "access": "public", @@ -54,5 +55,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-todo instead." } diff --git a/plugins/vault-backend/CHANGELOG.md b/plugins/vault-backend/CHANGELOG.md index dc6aa0eea3d74c..d781badd002f26 100644 --- a/plugins/vault-backend/CHANGELOG.md +++ b/plugins/vault-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-vault-backend +## 0.4.11 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/plugin-vault-node@0.1.11 + - @backstage/backend-common@0.21.7 + - @backstage/backend-plugin-api@0.6.17 + - @backstage/backend-tasks@0.5.22 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.4.10 ### Patch Changes diff --git a/plugins/vault-backend/README.md b/plugins/vault-backend/README.md index 2c7dd06e52e4fa..7a2fd2714c1ed8 100644 --- a/plugins/vault-backend/README.md +++ b/plugins/vault-backend/README.md @@ -1,183 +1,3 @@ -# @backstage/plugin-vault-backend +# Deprecated -A backend for [Vault](https://www.vaultproject.io/), this plugin adds a few routes that are used by the frontend plugin to fetch the information from Vault. - -## Introduction - -Vault is an identity-based secrets and encryption management system. A secret is anything that you want to tightly control access to, such as API encryption keys, passwords, or certificates. Vault provides encryption services that are gated by authentication and authorization methods. - -This plugins allows you to view all the available secrets at a certain location, and redirect you to the official UI so backstage can rely on LIST permissions, which is safer. - -## Getting started - -To get started, first you need a running instance of Vault. You can follow [this tutorial](https://learn.hashicorp.com/tutorials/vault/getting-started-intro?in=vault/getting-started) to install vault and start your server locally. - -1. When your Vault instance is up and running, then you will need to install the plugin into your app: - - ```bash - # From your Backstage root directory - yarn --cwd packages/backend add @backstage/plugin-vault-backend - ``` - -2. Create a file in `src/plugins/vault.ts` and add a reference to it in `src/index.ts`: - - ```typescript - // In packages/backend/src/plugins/vault.ts - import { createRouter } from '@backstage/plugin-vault-backend'; - import { Router } from 'express'; - import { PluginEnvironment } from '../types'; - - export default async function createPlugin( - env: PluginEnvironment, - ): Promise { - return await createRouter({ - logger: env.logger, - config: env.config, - scheduler: env.scheduler, - }); - } - ``` - - ```diff - diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts - index f2b14b2..2c64f47 100644 - --- a/packages/backend/src/index.ts - +++ b/packages/backend/src/index.ts - @@ -22,6 +22,7 @@ import { Config } from '@backstage/config'; - import app from './plugins/app'; - +import vault from './plugins/vault'; - import scaffolder from './plugins/scaffolder'; - @@ -56,6 +57,7 @@ async function main() { - const authEnv = useHotMemoize(module, () => createEnv('auth')); - + const vaultEnv = useHotMemoize(module, () => createEnv('vault')); - const proxyEnv = useHotMemoize(module, () => createEnv('proxy')); - @@ -63,6 +65,7 @@ async function main() { - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); - + apiRouter.use('/vault', await vault(vaultEnv)); - apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv)); - ``` - -3. Add some extra configurations in your [`app-config.yaml`](https://github.com/backstage/backstage/blob/master/app-config.yaml). - - ```yaml - vault: - baseUrl: http://your-internal-vault-url.svc - publicUrl: https://your-vault-url.example.com - token: - secretEngine: 'customSecretEngine' # Optional. By default it uses 'secrets'. Can be overwritten by the annotation of the entity - kvVersion: # Optional. The K/V version that your instance is using. The available options are '1' or '2' - schedule: # Optional. If the token renewal is enabled this schedule will be used instead of the hourly one - frequency: { hours: 1 } - timeout: { hours: 1 } - ``` - -4. Get a `VAULT_TOKEN` with **LIST** permissions, as it's enough for the plugin. You can check [this tutorial](https://learn.hashicorp.com/tutorials/vault/tokens) for more info. - -5. If you also want to use the `renew` functionality, you need to attach the following block to your custom policy, so that Backstage can perform a token-renew: - ``` - # Allow tokens to renew themselves - path "auth/token/renew-self" { - capabilities = ["update"] - } - ``` - -## New Backend System - -The Vault backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: - -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - const backend = createBackend(); - // ... other feature additions -+ backend.add(import('@backstage/plugin-vault-backend'); - backend.start(); -``` - -The token renewal is enabled automatically in the new backend system depending on the `app-config.yaml`. If the `schedule` is not defined there, no -task will be executed. If you want to use the default renewal scheduler (which runs hourly), set `schedule: true`. In case you want a custom schedule -just use a configuration like the one set above. - -## Integration with the Catalog - -The plugin can be integrated into each Component in the catalog. To allow listing the available secrets a new annotation must be added to the `catalog-info.yaml`: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - vault.io/secrets-path: path/to/secrets -``` - -The path is relative to your secrets engine folder. So if you want to get the secrets for backstage and you have the following directory structure: - - . - ├── ... - ├── secrets # Your secret engine name (usually it is `secrets`) - │ ├── test # Folder with test secrets - │ │ ├── backstage # In this folder there are secrets for Backstage - │ ├── other # Other folder with more secrets inside - │ └── folder # And another folder - └── ... - -You will set the `vault.io/secret-path` to `test/backstage`. If the folder `backstage` contains other sub-folders, the plugin will fetch the secrets inside them and adapt the **View** and **Edit** URLs to point to the correct place. - -In case you need to support different secret engines for entities of the catalog you can provide optional annotation to the entity in `catalog-info.yaml`: - -```diff - apiVersion: backstage.io/v1alpha1 - kind: Component - metadata: - # ... - annotations: - vault.io/secrets-path: path/to/secrets -+ vault.io/secrets-engine: customSecretEngine # Optional. By default it uses the 'secretEngine' value from your app-config. -``` - -That will overwrite the default secret engine from the configuration. - -## Renew token - -In a secure Vault instance, it's usual that the tokens are refreshed after some time. In order to always have a valid token to fetch the secrets, it might be necessary to execute a renew action after some time. By default this is deactivated, but it can be easily activated and configured to be executed periodically (hourly by default, but customizable by the user within the app-config.yaml file). In order to do that, modify your `src/plugins/vault.ts` file to look like this one: - -```typescript -import { VaultBuilder } from '@backstage/plugin-vault-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const builder = await VaultBuilder.createBuilder({ - logger: env.logger, - config: env.config, - scheduler: env.scheduler, - }).enableTokenRenew( - env.scheduler.createScheduledTaskRunner({ - frequency: { minutes: 10 }, - timeout: { minutes: 1 }, - }), - ); - - const { router } = builder.build(); - - return router; -} -``` - -If the `taskRunner` is not set when calling the `enableTokenRenew`, the plugin will automatically check what is set in the `app-config.yaml` file. Refer to [the new backend system setup](#new-backend-system) for more information about it. - -## Features - -- List the secrets present in a certain path -- Use different secret engines for different entities -- Open a link to view the secret -- Open a link to edit the secret -- Renew the token automatically with a defined periodicity - -The secrets cannot be edited/viewed from within Backstage to make it more secure. Backstage will only have permissions to LIST data from Vault or to renew its own token if that is needed. And the user who wants to edit/view a certain secret needs the correct permissions to do so. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-vault-backend` instead. diff --git a/plugins/vault-backend/package.json b/plugins/vault-backend/package.json index 1a19d7f3db65bb..f46ff66a39b446 100644 --- a/plugins/vault-backend/package.json +++ b/plugins/vault-backend/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-vault-backend", - "version": "0.4.10", + "version": "0.4.11", "description": "A Backstage backend plugin that integrates towards Vault", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-vault-backend" }, "publishConfig": { "access": "public", @@ -62,5 +63,6 @@ "msw": "^1.0.0", "supertest": "^6.1.6" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-vault-backend instead." } diff --git a/plugins/vault-node/CHANGELOG.md b/plugins/vault-node/CHANGELOG.md index 0ffdf9aaa2ef5b..d006d77296189b 100644 --- a/plugins/vault-node/CHANGELOG.md +++ b/plugins/vault-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-vault-node +## 0.1.11 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.17 + ## 0.1.10 ### Patch Changes diff --git a/plugins/vault-node/README.md b/plugins/vault-node/README.md index 5f777e792b0ba3..21993e11f750b5 100644 --- a/plugins/vault-node/README.md +++ b/plugins/vault-node/README.md @@ -1,3 +1,3 @@ -# @backstage/plugin-vault-node +# Deprecated -Houses types and utilities for building the vault modules +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-vault-node` instead. diff --git a/plugins/vault-node/package.json b/plugins/vault-node/package.json index 74a42ba8ef1615..16ea4e5568be6f 100644 --- a/plugins/vault-node/package.json +++ b/plugins/vault-node/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-vault-node", - "version": "0.1.10", + "version": "0.1.11", "description": "Node.js library for the vault plugin", "backstage": { - "role": "node-library" + "role": "node-library", + "moved": "@backstage-community/plugin-vault-node" }, "publishConfig": { "access": "public", @@ -34,5 +35,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-vault-node instead." } diff --git a/plugins/vault/CHANGELOG.md b/plugins/vault/CHANGELOG.md index f4d34e4cebeaf1..49b4f09fab6716 100644 --- a/plugins/vault/CHANGELOG.md +++ b/plugins/vault/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-vault +## 0.1.30 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + - @backstage/plugin-catalog-react@1.11.3 + ## 0.1.29 ### Patch Changes diff --git a/plugins/vault/README.md b/plugins/vault/README.md index fe86a30bd223b0..0e9b26032b5741 100644 --- a/plugins/vault/README.md +++ b/plugins/vault/README.md @@ -1,112 +1,3 @@ -# @backstage/plugin-vault +# Deprecated -A frontend for [Vault](https://www.vaultproject.io/), this plugin allows you to display a list of secrets in a certain path inside your vault instance. There are also some useful links to edit and/or view them using the official UI. - -![Screenshot of the vault plugin table](images/vault-table.png) - -## Introduction - -Vault is an identity-based secrets and encryption management system. A secret is anything that you want to tightly control access to, such as API encryption keys, passwords, or certificates. Vault provides encryption services that are gated by authentication and authorization methods. - -This plugins allows you to view all the available secrets at a certain location, and redirect you to the official UI so backstage can rely on LIST permissions, which is safer. - -## Getting started - -To get started, first you need a running instance of Vault. You can follow [this tutorial](https://learn.hashicorp.com/tutorials/vault/getting-started-intro?in=vault/getting-started) to install vault and start your server locally. - -1. When your Vault instance is up and running, then you will need to install the plugin into your app: - - ```bash - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-vault - ``` - -2. Add the Vault card to the overview tab on the EntityPage: - - ```typescript - // In packages/app/src/components/catalog/EntityPage.tsx - import { EntityVaultCard } from '@backstage/plugin-vault'; - - const overviewContent = ( - - {/* ...other content */} - - - - ); - ``` - -3. Add some extra configurations in your [`app-config.yaml`](https://github.com/backstage/backstage/blob/master/app-config.yaml). - - ```yaml - vault: - baseUrl: http://your-vault-url - token: - secretEngine: 'customSecretEngine' # Optional. By default it uses 'secrets'. Can be overwritten by the annotation of the entity - kvVersion: # Optional. The K/V version that your instance is using. The available options are '1' or '2' - ``` - -4. Get a `VAULT_TOKEN` with **LIST** permissions, as it's enough for the plugin. You can check [this tutorial](https://learn.hashicorp.com/tutorials/vault/tokens) for more info. - -5. If you also want to use the `renew` functionality, you need to attach the following block to your custom policy, so that Backstage can perform a token-renew: - ``` - # Allow tokens to renew themselves - path "auth/token/renew-self" { - capabilities = ["update"] - } - ``` - -## Integration with the Catalog - -The plugin can be integrated into each Component in the catalog. To allow listing the available secrets a new annotation must be added to the `catalog-info.yaml`: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - # ... - annotations: - vault.io/secrets-path: path/to/secrets - vault.io/secrets-engine: customSecretEngine # Optional. By default it uses the 'secretEngine' value from your app-config. -``` - -The path is relative to your secrets engine folder. So if you want to get the secrets for backstage and you have the following directory structure: - - . - ├── ... - ├── secrets # Your secret engine name (usually it is `secrets`) - │ ├── test # Folder with test secrets - │ │ ├── backstage # In this folder there are secrets for Backstage - │ ├── other # Other folder with more secrets inside - │ └── folder # And another folder - └── ... - -You will set the `vault.io/secret-path` to `test/backstage`. If the folder `backstage` contains other sub-folders, the plugin will fetch the secrets inside them and adapt the **View** and **Edit** URLs to point to the correct place. - -If the annotation is missing for a certain component, then the card will show some information to the user: - -![Screenshot of the vault plugin with missing annotation](images/annotation-missing.png) - -In case you need to support different secret engines for entities of the catalog you can provide optional annotation to the entity in `catalog-info.yaml`: - -```diff - apiVersion: backstage.io/v1alpha1 - kind: Component - metadata: - # ... - annotations: - vault.io/secrets-path: path/to/secrets -+ vault.io/secrets-engine: customSecretEngine # Optional. By default it uses 'secertEngine' value from configuration. -``` - -That will overwrite the default secret engine from the configuration. - -## Features - -- List the secrets present in a certain path -- Use different secret engines for different components -- Open a link to view the secret -- Open a link to edit the secret -- Renew the token automatically with a defined periodicity - -The secrets cannot be edited/viewed from within Backstage to make it more secure. Backstage will only have permissions to LIST data from Vault. And the user who wants to edit/view a certain secret needs the correct permissions to do so. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-vault` instead. diff --git a/plugins/vault/package.json b/plugins/vault/package.json index a3b1281e33de04..ee76460581c723 100644 --- a/plugins/vault/package.json +++ b/plugins/vault/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-vault", - "version": "0.1.29", + "version": "0.1.30", "description": "A Backstage plugin that integrates towards Vault", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-vault" }, "publishConfig": { "access": "public", @@ -62,5 +63,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-vault instead." } diff --git a/plugins/xcmetrics/CHANGELOG.md b/plugins/xcmetrics/CHANGELOG.md index 2ea8a2547508ee..a0adc935562505 100644 --- a/plugins/xcmetrics/CHANGELOG.md +++ b/plugins/xcmetrics/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-xcmetrics +## 0.2.53 + +### Patch Changes + +- c2112f2: These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. +- Updated dependencies + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/errors@1.2.4 + ## 0.2.52 ### Patch Changes diff --git a/plugins/xcmetrics/README.md b/plugins/xcmetrics/README.md index 0823cbbb24b35f..2fb0f202ae4033 100644 --- a/plugins/xcmetrics/README.md +++ b/plugins/xcmetrics/README.md @@ -1,37 +1,3 @@ -# XCMetrics +# Deprecated -[XCMetrics](https://xcmetrics.io) is a tool for collecting build metrics from XCode. -With this plugin, you can view data from XCMetrics directly in Backstage. - -![XCMetrics-overview](./docs/XCMetrics-overview.png) - -## Getting started - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-xcmetrics -``` - -In `packages/app/src/App.tsx`, add the following: - -```ts -import { XcmetricsPage } from '@backstage/plugin-xcmetrics'; -``` - -```tsx - - {/* Other routes... */} - } /> - -``` - -Add the URL to your XCMetrics backend instance in `app-config.yaml` like so: - -```yaml -proxy: - ... - '/xcmetrics': - target: http://127.0.0.1:8080/v1 -``` - -Start Backstage and navigate to `/xcmetrics` to view your build metrics! +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-xcmetrics` instead. diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index 2ba48c6fcbb4d8..90d0f06ac6e692 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -1,9 +1,10 @@ { "name": "@backstage/plugin-xcmetrics", - "version": "0.2.52", + "version": "0.2.53", "description": "A Backstage plugin that shows XCode build metrics for your components", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-xcmetrics" }, "publishConfig": { "access": "public", @@ -59,5 +60,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-xcmetrics instead." } diff --git a/yarn.lock b/yarn.lock index e78a81049033cd..3f0e5551a0ba79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3483,7 +3483,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/backend-plugin-api@workspace:^, @backstage/backend-plugin-api@workspace:packages/backend-plugin-api": +"@backstage/backend-plugin-api@^0.6.17, @backstage/backend-plugin-api@workspace:^, @backstage/backend-plugin-api@workspace:packages/backend-plugin-api": version: 0.0.0-use.local resolution: "@backstage/backend-plugin-api@workspace:packages/backend-plugin-api" dependencies: @@ -3729,6 +3729,7 @@ __metadata: react-dev-utils: ^12.0.0-next.60 react-refresh: ^0.14.0 recursive-readdir: ^2.2.2 + replace-in-file: ^7.1.0 rollup: ^4.0.0 rollup-plugin-dts: ^6.1.0 rollup-plugin-esbuild: ^6.1.1 @@ -4110,7 +4111,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/errors@^1.2.3, @backstage/errors@workspace:^, @backstage/errors@workspace:packages/errors": +"@backstage/errors@^1.2.3, @backstage/errors@^1.2.4, @backstage/errors@workspace:^, @backstage/errors@workspace:packages/errors": version: 0.0.0-use.local resolution: "@backstage/errors@workspace:packages/errors" dependencies: @@ -5768,6 +5769,7 @@ __metadata: "@backstage/plugin-search-backend-module-catalog": "workspace:^" "@backstage/repo-tools": "workspace:^" "@backstage/types": "workspace:^" + "@janus-idp/backstage-plugin-audit-log-node": ^1.1.0 "@opentelemetry/api": ^1.3.0 "@types/core-js": ^2.5.4 "@types/express": ^4.17.6 @@ -8650,6 +8652,7 @@ __metadata: uuid: ^9.0.0 wait-for-expect: ^3.0.2 winston: ^3.2.1 + winston-transport: ^4.7.0 yaml: ^2.0.0 zen-observable: ^0.10.0 zod: ^3.22.4 @@ -12024,6 +12027,19 @@ __metadata: languageName: node linkType: hard +"@janus-idp/backstage-plugin-audit-log-node@npm:^1.1.0": + version: 1.1.0 + resolution: "@janus-idp/backstage-plugin-audit-log-node@npm:1.1.0" + dependencies: + "@backstage/backend-plugin-api": ^0.6.17 + "@backstage/errors": ^1.2.4 + "@backstage/types": ^1.1.1 + express: ^4.19.2 + lodash: ^4.17.21 + checksum: 0a1c6600768c16fdc807d677cb59370e2d5e72ccfc0aa64a30686997ae032bccb48bca7b9774a94be2ce4b260f881c0191a8380e63bc1f93ce774e88d848887f + languageName: node + linkType: hard + "@jest-mock/express@npm:^2.0.1": version: 2.0.2 resolution: "@jest-mock/express@npm:2.0.2" @@ -29083,7 +29099,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.0, glob@npm:^8.0.1, glob@npm:^8.0.3": +"glob@npm:^8.0.0, glob@npm:^8.0.1, glob@npm:^8.0.3, glob@npm:^8.1.0": version: 8.1.0 resolution: "glob@npm:8.1.0" dependencies: @@ -40433,6 +40449,19 @@ __metadata: languageName: node linkType: hard +"replace-in-file@npm:^7.1.0": + version: 7.1.0 + resolution: "replace-in-file@npm:7.1.0" + dependencies: + chalk: ^4.1.2 + glob: ^8.1.0 + yargs: ^17.7.2 + bin: + replace-in-file: bin/cli.js + checksum: 2ed61bd0cf0752b18775b52342ad36f4ee6c806f7eca0b0d085c23bafe0cb4828e4ec8f59058bde6b67d2ed5ac51e1681284f586089b58b966e2489712830db0 + languageName: node + linkType: hard + "request@npm:^2.88.0": version: 2.88.2 resolution: "request@npm:2.88.2"