diff --git a/workspaces/boost/plugins/boost-common/package.json b/workspaces/boost/plugins/boost-common/package.json new file mode 100644 index 0000000000..b8063f7e9a --- /dev/null +++ b/workspaces/boost/plugins/boost-common/package.json @@ -0,0 +1,44 @@ +{ + "name": "@red-hat-developer-hub/backstage-plugin-boost-common", + "version": "0.1.0", + "license": "Apache-2.0", + "description": "Common functionalities for the boost plugin", + "main": "src/index.ts", + "types": "src/index.ts", + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "module": "dist/index.esm.js", + "types": "dist/index.d.ts" + }, + "backstage": { + "role": "common-library", + "pluginId": "boost", + "pluginPackage": "@red-hat-developer-hub/backstage-plugin-boost-common", + "pluginPackages": [ + "@red-hat-developer-hub/backstage-plugin-boost-common" + ] + }, + "sideEffects": false, + "scripts": { + "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" + }, + "devDependencies": { + "@backstage/cli": "^0.34.5" + }, + "files": [ + "dist" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/redhat-developer/rhdh-plugins.git", + "directory": "workspaces/boost/plugins/boost-common" + }, + "homepage": "https://red.ht/rhdh", + "bugs": "https://github.com/redhat-developer/rhdh-plugins/issues" +} diff --git a/workspaces/boost/plugins/boost-common/src/index.ts b/workspaces/boost/plugins/boost-common/src/index.ts new file mode 100644 index 0000000000..93791f1c41 --- /dev/null +++ b/workspaces/boost/plugins/boost-common/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright Red Hat, Inc. + * + * 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 { BOOST_PLUGIN_ID } from './types'; diff --git a/workspaces/boost/plugins/boost-common/src/types.test.ts b/workspaces/boost/plugins/boost-common/src/types.test.ts new file mode 100644 index 0000000000..188cd106da --- /dev/null +++ b/workspaces/boost/plugins/boost-common/src/types.test.ts @@ -0,0 +1,23 @@ +/* + * Copyright Red Hat, Inc. + * + * 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. + */ + +import { BOOST_PLUGIN_ID } from './types'; + +describe('boost-common', () => { + it('should export the correct plugin ID', () => { + expect(BOOST_PLUGIN_ID).toBe('boost'); + }); +}); diff --git a/workspaces/boost/plugins/boost-common/src/types.ts b/workspaces/boost/plugins/boost-common/src/types.ts new file mode 100644 index 0000000000..04ae23bf05 --- /dev/null +++ b/workspaces/boost/plugins/boost-common/src/types.ts @@ -0,0 +1,22 @@ +/* + * Copyright Red Hat, Inc. + * + * 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. + */ + +/** + * The plugin ID for the boost plugin. + * + * @public + */ +export const BOOST_PLUGIN_ID = 'boost'; diff --git a/workspaces/boost/yarn.lock b/workspaces/boost/yarn.lock index ca1f0dd60b..103dbcbe85 100644 --- a/workspaces/boost/yarn.lock +++ b/workspaces/boost/yarn.lock @@ -3700,6 +3700,14 @@ __metadata: languageName: node linkType: hard +"@red-hat-developer-hub/backstage-plugin-boost-common@workspace:plugins/boost-common": + version: 0.0.0-use.local + resolution: "@red-hat-developer-hub/backstage-plugin-boost-common@workspace:plugins/boost-common" + dependencies: + "@backstage/cli": "npm:^0.34.5" + languageName: unknown + linkType: soft + "@rollup/plugin-commonjs@npm:^26.0.0": version: 26.0.3 resolution: "@rollup/plugin-commonjs@npm:26.0.3"