From 0c48cb2137f4deb863677b2707df4427eca7888b Mon Sep 17 00:00:00 2001 From: Tomas Dabasinskas Date: Sun, 5 Feb 2023 14:58:42 +0200 Subject: [PATCH] Generate new plugin Signed-off-by: Tomas Dabasinskas --- .../.eslintrc.js | 1 + .../catalog-backend-module-puppetdb/README.md | 14 +++++ .../package.json | 54 +++++++++++++++++++ .../src/setupTests.ts | 16 ++++++ yarn.lock | 16 ++++++ 5 files changed, 101 insertions(+) create mode 100644 plugins/catalog-backend-module-puppetdb/.eslintrc.js create mode 100644 plugins/catalog-backend-module-puppetdb/README.md create mode 100644 plugins/catalog-backend-module-puppetdb/package.json create mode 100644 plugins/catalog-backend-module-puppetdb/src/setupTests.ts diff --git a/plugins/catalog-backend-module-puppetdb/.eslintrc.js b/plugins/catalog-backend-module-puppetdb/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/plugins/catalog-backend-module-puppetdb/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/catalog-backend-module-puppetdb/README.md b/plugins/catalog-backend-module-puppetdb/README.md new file mode 100644 index 0000000000..c66627fa8b --- /dev/null +++ b/plugins/catalog-backend-module-puppetdb/README.md @@ -0,0 +1,14 @@ +# catalog-backend-module-puppetdb + +Welcome to the catalog-backend-module-puppetdb backend 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 [/catalog-backend-module-puppetdb](http://localhost:3000/catalog-backend-module-puppetdb). + +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. diff --git a/plugins/catalog-backend-module-puppetdb/package.json b/plugins/catalog-backend-module-puppetdb/package.json new file mode 100644 index 0000000000..5f6a39f73d --- /dev/null +++ b/plugins/catalog-backend-module-puppetdb/package.json @@ -0,0 +1,54 @@ +{ + "name": "@backstage/plugin-catalog-backend-module-puppetdb-backend", + "description": "A Backstage catalog backend module that helps integrate towards PuppetDB", + "version": "0.0.1", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "types": "dist/index.d.ts" + }, + "backstage": { + "role": "backend-plugin-module" + }, + "homepage": "https://backstage.io", + "repository": { + "type": "git", + "url": "https://github.com/backstage/backstage", + "directory": "catalog-backend-module-puppetdb" + }, + "keywords": [ + "backstage", + "puppetdb", + "puppet" + ], + "scripts": { + "start": "backstage-cli package start", + "build": "backstage-cli package build", + "lint": "backstage-cli package lint", + "test": "backstage-cli package test", + "clean": "backstage-cli package clean", + "prepack": "backstage-cli package prepack", + "postpack": "backstage-cli package postpack" + }, + "dependencies": { + "@backstage/backend-common": "workspace:^", + "@backstage/config": "workspace:^", + "lodash": "^4.17.21", + "node-fetch": "^2.6.7", + "uuid": "^8.0.0", + "winston": "^3.2.1" + }, + "devDependencies": { + "@backstage/cli": "workspace:^", + "@types/lodash": "^4.14.151", + "msw": "^0.49.0" + }, + "files": [ + "dist", + "config.d.ts" + ], + "configSchema": "config.d.ts" +} diff --git a/plugins/catalog-backend-module-puppetdb/src/setupTests.ts b/plugins/catalog-backend-module-puppetdb/src/setupTests.ts new file mode 100644 index 0000000000..4b9026cde5 --- /dev/null +++ b/plugins/catalog-backend-module-puppetdb/src/setupTests.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export {}; diff --git a/yarn.lock b/yarn.lock index 6973779ac5..33261fc7da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5206,6 +5206,22 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-catalog-backend-module-puppetdb-backend@workspace:plugins/catalog-backend-module-puppetdb": + version: 0.0.0-use.local + resolution: "@backstage/plugin-catalog-backend-module-puppetdb-backend@workspace:plugins/catalog-backend-module-puppetdb" + dependencies: + "@backstage/backend-common": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/config": "workspace:^" + "@types/lodash": ^4.14.151 + lodash: ^4.17.21 + msw: ^0.49.0 + node-fetch: ^2.6.7 + uuid: ^8.0.0 + winston: ^3.2.1 + languageName: unknown + linkType: soft + "@backstage/plugin-catalog-backend@workspace:^, @backstage/plugin-catalog-backend@workspace:plugins/catalog-backend": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-backend@workspace:plugins/catalog-backend"