From f19b7e2f68f19d6759c4d5fc849262fce9adc11a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 31 May 2022 14:41:35 +0200 Subject: [PATCH] packages: add initial backend app and plugin API packages Signed-off-by: Patrik Oldsberg --- packages/backend-app-api/.eslintrc.js | 1 + packages/backend-app-api/README.md | 17 +++++++++ packages/backend-app-api/package.json | 44 ++++++++++++++++++++++++ packages/backend-app-api/src/index.ts | 23 +++++++++++++ packages/backend-plugin-api/.eslintrc.js | 1 + packages/backend-plugin-api/README.md | 17 +++++++++ packages/backend-plugin-api/package.json | 44 ++++++++++++++++++++++++ packages/backend-plugin-api/src/index.ts | 23 +++++++++++++ 8 files changed, 170 insertions(+) create mode 100644 packages/backend-app-api/.eslintrc.js create mode 100644 packages/backend-app-api/README.md create mode 100644 packages/backend-app-api/package.json create mode 100644 packages/backend-app-api/src/index.ts create mode 100644 packages/backend-plugin-api/.eslintrc.js create mode 100644 packages/backend-plugin-api/README.md create mode 100644 packages/backend-plugin-api/package.json create mode 100644 packages/backend-plugin-api/src/index.ts diff --git a/packages/backend-app-api/.eslintrc.js b/packages/backend-app-api/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/packages/backend-app-api/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/packages/backend-app-api/README.md b/packages/backend-app-api/README.md new file mode 100644 index 0000000000..295a04c7a1 --- /dev/null +++ b/packages/backend-app-api/README.md @@ -0,0 +1,17 @@ +# @backstage/backend-app-api + +This package provides the core API used by Backstage backend apps. + +## Installation + +Add the library to your backend app package: + +```bash +# From your Backstage root directory +yarn add --cwd packages/backend @backstage/backend-app-api +``` + +## Documentation + +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json new file mode 100644 index 0000000000..fe2d517086 --- /dev/null +++ b/packages/backend-app-api/package.json @@ -0,0 +1,44 @@ +{ + "name": "@backstage/backend-app-api", + "description": "Core API used by Backstage backend apps", + "version": "0.0.0", + "main": "src/index.ts", + "types": "src/index.ts", + "private": false, + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "types": "dist/index.d.ts", + "alphaTypes": "dist/index.alpha.d.ts" + }, + "backstage": { + "role": "node-library" + }, + "homepage": "https://backstage.io", + "repository": { + "type": "git", + "url": "https://github.com/backstage/backstage", + "directory": "packages/backend-app-api" + }, + "keywords": [ + "backstage" + ], + "license": "Apache-2.0", + "scripts": { + "build": "backstage-cli package build --experimental-type-build", + "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" + }, + "dependencies": {}, + "devDependencies": { + "@backstage/cli": "^0.17.2-next.0" + }, + "files": [ + "dist", + "alpha" + ] +} diff --git a/packages/backend-app-api/src/index.ts b/packages/backend-app-api/src/index.ts new file mode 100644 index 0000000000..1888a9b037 --- /dev/null +++ b/packages/backend-app-api/src/index.ts @@ -0,0 +1,23 @@ +/* + * Copyright 2020 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. + */ + +/** + * Core API used by Backstage backend apps. + * + * @packageDocumentation + */ + +export {}; diff --git a/packages/backend-plugin-api/.eslintrc.js b/packages/backend-plugin-api/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/packages/backend-plugin-api/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/packages/backend-plugin-api/README.md b/packages/backend-plugin-api/README.md new file mode 100644 index 0000000000..9e28e220a1 --- /dev/null +++ b/packages/backend-plugin-api/README.md @@ -0,0 +1,17 @@ +# @backstage/backend-plugin-api + +This package provides the core API used by Backstage backend plugins. + +## Installation + +Add the library to your backend plugin package: + +```bash +# From your Backstage root directory +yarn add --cwd plugin/-backend @backstage/backend-plugin-api +``` + +## Documentation + +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/backend-plugin-api/package.json b/packages/backend-plugin-api/package.json new file mode 100644 index 0000000000..967ae734ee --- /dev/null +++ b/packages/backend-plugin-api/package.json @@ -0,0 +1,44 @@ +{ + "name": "@backstage/backend-plugin-api", + "description": "Core API used by Backstage backend plugins", + "version": "0.0.0", + "main": "src/index.ts", + "types": "src/index.ts", + "private": false, + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "types": "dist/index.d.ts", + "alphaTypes": "dist/index.alpha.d.ts" + }, + "backstage": { + "role": "node-library" + }, + "homepage": "https://backstage.io", + "repository": { + "type": "git", + "url": "https://github.com/backstage/backstage", + "directory": "packages/backend-plugin-api" + }, + "keywords": [ + "backstage" + ], + "license": "Apache-2.0", + "scripts": { + "build": "backstage-cli package build --experimental-type-build", + "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" + }, + "dependencies": {}, + "devDependencies": { + "@backstage/cli": "^0.17.2-next.0" + }, + "files": [ + "dist", + "alpha" + ] +} diff --git a/packages/backend-plugin-api/src/index.ts b/packages/backend-plugin-api/src/index.ts new file mode 100644 index 0000000000..caef25e2ad --- /dev/null +++ b/packages/backend-plugin-api/src/index.ts @@ -0,0 +1,23 @@ +/* + * Copyright 2020 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. + */ + +/** + * Core API used by Backstage backend plugins. + * + * @packageDocumentation + */ + +export {};