diff --git a/packages/cli-node/.eslintrc.js b/packages/cli-node/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/packages/cli-node/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/packages/cli-node/README.md b/packages/cli-node/README.md new file mode 100644 index 0000000000..d3f7e509da --- /dev/null +++ b/packages/cli-node/README.md @@ -0,0 +1,8 @@ +# @backstage/monorepo-node + +This library provides utilities for building CLI tools for Backstage. + +## Documentation + +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://backstage.io/docs) diff --git a/packages/cli-node/package.json b/packages/cli-node/package.json new file mode 100644 index 0000000000..a0d4327d94 --- /dev/null +++ b/packages/cli-node/package.json @@ -0,0 +1,30 @@ +{ + "name": "@backstage/cli-node", + "description": "Node.js library for Backstage CLIs", + "version": "0.0.0", + "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": "node-library" + }, + "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": "workspace:^" + }, + "files": [ + "dist" + ] +} diff --git a/packages/cli-node/src/index.ts b/packages/cli-node/src/index.ts new file mode 100644 index 0000000000..fcd851e2ed --- /dev/null +++ b/packages/cli-node/src/index.ts @@ -0,0 +1,21 @@ +/* + * 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. + */ + +/** + * Node.js library for Backstage CLIs + * + * @packageDocumentation + */ diff --git a/packages/cli-node/src/setupTests.ts b/packages/cli-node/src/setupTests.ts new file mode 100644 index 0000000000..4b9026cde5 --- /dev/null +++ b/packages/cli-node/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 085a76bb6a..a1f21dde5c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3694,6 +3694,14 @@ __metadata: languageName: unknown linkType: soft +"@backstage/cli-node@workspace:packages/cli-node": + version: 0.0.0-use.local + resolution: "@backstage/cli-node@workspace:packages/cli-node" + dependencies: + "@backstage/cli": "workspace:^" + languageName: unknown + linkType: soft + "@backstage/cli@workspace:*, @backstage/cli@workspace:^, @backstage/cli@workspace:packages/cli": version: 0.0.0-use.local resolution: "@backstage/cli@workspace:packages/cli"