Merge branch 'master' of github.com:mikqi/backstage into ci/deploy-storybook
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
const path = require('path')
|
||||
const base = require('@spotify-backstage/cli/config/eslint');
|
||||
const path = require('path');
|
||||
const base = require('@backstage/cli/config/eslint');
|
||||
|
||||
module.exports = {
|
||||
...base,
|
||||
@@ -8,7 +8,7 @@ module.exports = {
|
||||
'notice/notice': [
|
||||
'error',
|
||||
{
|
||||
templateFile: path.resolve(__dirname, "scripts/copyright.js"),
|
||||
templateFile: path.resolve(__dirname, 'scripts/copyright.js'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -17,10 +17,11 @@ jobs:
|
||||
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: find location of yarn cache
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
@@ -17,14 +17,18 @@ jobs:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
env:
|
||||
CI: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: fetch branch master
|
||||
run: git fetch origin master
|
||||
- name: find location of yarn cache
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
@@ -39,14 +43,10 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: yarn install, build, and test
|
||||
run: |
|
||||
yarn install
|
||||
yarn lint
|
||||
yarn build
|
||||
yarn test
|
||||
env:
|
||||
CI: true
|
||||
- run: yarn install
|
||||
- run: yarn lint
|
||||
- run: yarn build
|
||||
- run: yarn test
|
||||
|
||||
deploy-storybook:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
node-version: [12.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: build storybook'
|
||||
- name: build storybook
|
||||
run: |
|
||||
yarn install
|
||||
yarn workspace storybook build-storybook
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
name: Master Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
env:
|
||||
CI: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: cache node_modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- run: yarn install
|
||||
- run: yarn lint
|
||||
- run: yarn build
|
||||
- run: yarn test
|
||||
# Publishes current version of packages that are not already present in the registry
|
||||
- name: publish
|
||||
run: npx --no-install lerna publish from-package --yes
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
# Tags the commit with the version in the core package if the tag doesn't exist
|
||||
- uses: Klemensas/action-autotag@1.2.3
|
||||
with:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
package_root: "packages/core"
|
||||
tag_prefix: "v"
|
||||
@@ -0,0 +1,38 @@
|
||||
# Deploying Backstage
|
||||
|
||||
## Heroku
|
||||
|
||||
Deploying to heroku is relatively easy following these steps.
|
||||
|
||||
First, make sure you have the [heroku CLI installed](https://devcenter.heroku.com/articles/heroku-cli) and log into it as well as loging into Heroku's [container registry](https://devcenter.heroku.com/articles/container-registry-and-runtime).
|
||||
|
||||
```bash
|
||||
$ heroku login
|
||||
$ heroku container:login
|
||||
```
|
||||
|
||||
You _might_ also need to set your Heroku app's stack to `container`
|
||||
|
||||
```bash
|
||||
$ heroku stack:set container -a <your-app>
|
||||
```
|
||||
|
||||
There are two small tweaks made to Backstage's default Dockerfile to run on Heroku:
|
||||
|
||||
1. Do not run nginx as the `nginx` user.
|
||||
2. Replace the standard port (80) in `/etc/nginx/conf.d/default.conf` with the wildcard `$PORT`, which Heroku will set for us.
|
||||
|
||||
These changes are in the `deployment/Dockerfile.heroku` file, which you will need to copy into your root directory before deploying:
|
||||
|
||||
```bash
|
||||
$ cp deployment/Dockerfile.heroku Dockerfile
|
||||
```
|
||||
|
||||
With these changes, we can build/push the Docker image to Heroku's container registry and release it to the `web` worker.
|
||||
|
||||
```bash
|
||||
$ heroku container:push web -a <your-app>
|
||||
$ heroku container:release web -a <your-app>
|
||||
```
|
||||
|
||||
With that, you should have Backstage up and running!
|
||||
@@ -15,3 +15,4 @@ RUN yarn build
|
||||
FROM nginx:mainline
|
||||
|
||||
COPY --from=builder /app/packages/app/build /usr/share/nginx/html
|
||||
COPY ./docker/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
@@ -33,7 +33,7 @@ We created Backstage about 4 years ago. While our internal version of Backstage
|
||||
|
||||
- 🐇 **Phase 3:** Ecosystem (later) - Everyone's infrastructure stack is different. By fostering a vibrant community of contributors we hope to provide an ecosystem of Open Source plugins/integrations that allows you to pick the tools that match your stack.
|
||||
|
||||
Check out our [Milestones](https://github.com/spotify/backstage/milestones) and how they relate to the 3 Phases outlined above.
|
||||
Check out our [Milestones](https://github.com/spotify/backstage/milestones) and open [RFCs](https://github.com/spotify/backstage/labels/rfc) how they relate to the three Phases outlined above.
|
||||
|
||||
Our vision for Backstage is for it to become the trusted standard toolbox (read: UX layer) for the open source infrastructure landscape. Think of it like Kubernetes for developer experience. We realize this is an ambitious goal. We can’t do it alone. If this sounds interesting or you'd like to help us shape our product vision, we'd love to talk. You can email me directly: [alund@spotify.com](mailto:alund@spotify.com).
|
||||
|
||||
@@ -69,16 +69,8 @@ $ yarn start
|
||||
|
||||
The final `yarn start` command should open a local instance of Backstage in your browser, otherwise open one of the URLs printed in the terminal.
|
||||
|
||||
### (Optional)Try on Docker
|
||||
|
||||
Run the following commands if you have Docker environment
|
||||
|
||||
```bash
|
||||
$ docker build . -t spotify/backstage
|
||||
$ docker run --rm -it -p 80:80 spotify/backstage
|
||||
```
|
||||
|
||||
Then open http://localhost/ on your browser.
|
||||
For more complex development environment configuration, see the
|
||||
[Development Environment](docs/getting-started/development-environment.md) section of the Getting Started docs.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -93,8 +85,10 @@ Then open http://localhost/ on your browser.
|
||||
|
||||
- [Discord chat](https://discord.gg/MUpMjP2) - Get support or discuss the project
|
||||
- [Good First Issues](https://github.com/spotify/backstage/labels/good%20first%20issue) - Start here if you want to contribute
|
||||
- [RFCs](https://github.com/spotify/backstage/labels/rfc) - Help shape the technical direction
|
||||
- [FAQ](docs/FAQ.md) - Frequently Asked Questions
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md) - This is how we roll
|
||||
- [Blog](https://backstage.io/blog/) - Announcements and updates
|
||||
- Give us a star ⭐️ - If you are using Backstage or think it is an interesting project, we would love a star ❤️
|
||||
|
||||
Or, if you are an open source developer and are interested in joining our team, please reach out to [foss-opportunities@spotify.com ](mailto:foss-opportunities@spotify.com)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
FROM node:12 as builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock .yarnrc .npmrc /app/
|
||||
COPY .yarn /app/.yarn
|
||||
COPY packages /app/packages
|
||||
COPY plugins /app/plugins
|
||||
|
||||
RUN yarn
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn build
|
||||
|
||||
FROM nginx:mainline
|
||||
|
||||
COPY --from=builder /app/packages/app/build /usr/share/nginx/html
|
||||
|
||||
# Run nginx as root
|
||||
RUN sed -i 's/user nginx.*$//' /etc/nginx/nginx.conf
|
||||
|
||||
# Copy in the nginx conf template and replace "$PORT" with the environment variable set by heroku
|
||||
COPY deployment/default.conf.template /etc/nginx/conf.d/default.conf.template
|
||||
CMD /bin/bash -c "envsubst '\$PORT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf" && nginx -g 'daemon off;'
|
||||
@@ -0,0 +1,8 @@
|
||||
server {
|
||||
listen $PORT default_server;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
#charset koi8-r;
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,3 +31,12 @@ Bitbucket. We believe that in time there will be plugins that will provide funct
|
||||
as well. Hopefully contributed by the community.
|
||||
|
||||
And note that implementations of Backstage can be hosted wherever you feel suits your needs best.
|
||||
|
||||
## Can Backstage by used for other things than developer portals?
|
||||
|
||||
Yes.
|
||||
|
||||
The core frontend framework could be used for building any large-scale web application where multiple teams are building separate parts of the app, but you want the overall experience to be consistent.
|
||||
|
||||
That being said, in [Phase 2](https://github.com/spotify/backstage#project-roadmap) of the project we will add features that are needed for developer portals and systems for managing software ecosystems. Our ambition will be to keep Backstage modular.
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@ Check out [https://backstage.io]() or see the table of content below.
|
||||
- [Architecture and terminology](architecture-terminology.md)
|
||||
- [Getting started](getting-started/README.md)
|
||||
- [References](reference/README.md)
|
||||
- [Publishing](publishing.md)
|
||||
|
||||
@@ -40,7 +40,7 @@ The app will call the `createPlugin` method on each plugin, passing in a `router
|
||||
of methods on it.
|
||||
|
||||
```typescript
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
Here is a collection of tutorials that will guide you through setting up and extending an instance of Backstage with your own plugins.
|
||||
|
||||
- [Development Environment](development-environment.md)
|
||||
- [Create a Backstage plugin](create-a-plugin.md)
|
||||
- [Structure of a plugin](structure-of-a-plugin.md)
|
||||
- Using Backstage components (TODO)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Development Environment
|
||||
|
||||
Open a terminal window and start the web app using the following commands from the project root:
|
||||
|
||||
```bash
|
||||
$ yarn install # may take a while
|
||||
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
The final `yarn start` command should open a local instance of Backstage in your browser, otherwise open one of the URLs printed in the terminal.
|
||||
|
||||
By default, backstage will start on port 3000, however you can override this by setting an environment variable `PORT` on your local machine. e.g. `export PORT=8080` then running `yarn start`. Or `PORT=8080 yarn start`.
|
||||
|
||||
Once successfully started, you should see the following message in your terminal window:
|
||||
|
||||
```
|
||||
You can now view @backstage/app in the browser.
|
||||
|
||||
Local: http://localhost:8080
|
||||
On Your Network: http://192.168.1.224:8080
|
||||
```
|
||||
|
||||
### (Optional)Try on Docker
|
||||
|
||||
Run the following commands if you have Docker environment
|
||||
|
||||
```bash
|
||||
$ docker build . -t spotify/backstage
|
||||
$ docker run --rm -it -p 80:80 spotify/backstage
|
||||
```
|
||||
|
||||
Then open http://localhost/ on your browser.
|
||||
|
||||
[Back to Docs](README.md)
|
||||
@@ -43,7 +43,7 @@ In the root folder you have some configuration for typescript and jest, the test
|
||||
In the `src` folder we get to the interesting bits. Check out the `plugin.ts`:
|
||||
|
||||
```jsx
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# Publishing
|
||||
|
||||
## NPM
|
||||
|
||||
NPM packages are published through CI/CD in the
|
||||
[.github/workflows/master.yml](../.github/workflows/master.yml) workflow. Every
|
||||
commit that is merged to master will be checked for new versions of all public
|
||||
packages, and any new versions will automatically be published to NPM.
|
||||
|
||||
### Creating a new release
|
||||
|
||||
Version bumps are made through release PRs. To create a new release, checkout out
|
||||
a new branch that you will use for the release, e.g.
|
||||
|
||||
```sh
|
||||
$ git checkout -b new-release
|
||||
```
|
||||
|
||||
Then, from the root of the repo, run
|
||||
|
||||
```sh
|
||||
$ yarn release
|
||||
```
|
||||
|
||||
This will bring up the lerna release CLI where you choose what type of version bump
|
||||
you want to make, (major/minor/patch/prerelease). The CLI will take you through choosing
|
||||
a version, previewing all changes, and then approving the release. Once the release
|
||||
is approved, a new commit is created that you can submit as a PR. Push the branch to GitHub:
|
||||
|
||||
```sh
|
||||
$ git push origin -u new-release
|
||||
```
|
||||
|
||||
And then create a PR. Once the PR is approved and merged into master, the master build
|
||||
will publish new versions of all bumped packages.
|
||||
|
||||
[Back to Docs](README.md)
|
||||
@@ -26,7 +26,7 @@ type PluginHooks = {
|
||||
Showcasing adding multiple routes and a redirect.
|
||||
|
||||
```jsx
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
+5
-2
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"packages": ["packages/*", "plugins/*"],
|
||||
"packages": [
|
||||
"packages/*",
|
||||
"plugins/*"
|
||||
],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.1.0"
|
||||
"version": "0.1.1-alpha.0"
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,13 +5,13 @@
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "yarn build && yarn workspace @spotify-backstage/app start",
|
||||
"start": "yarn build && yarn workspace @backstage/app start",
|
||||
"build": "lerna run build",
|
||||
"test": "cross-env CI=true lerna run test --since origin/master -- --coverage",
|
||||
"create-plugin": "backstage-cli create-plugin",
|
||||
"release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push; fi",
|
||||
"lint": "lerna run lint",
|
||||
"storybook": "yarn workspace @spotify-backstage/core storybook",
|
||||
"build-storybook": "yarn workspace @spotify-backstage/core build-storybook"
|
||||
"storybook": "yarn workspace storybook start"
|
||||
},
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# @backstage/app
|
||||
|
||||
This package is an example of a Backstage application.
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@spotify-backstage/app",
|
||||
"version": "0.0.0",
|
||||
"name": "@backstage/app",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@backstage/core": "^0.1.1-alpha.0",
|
||||
"@backstage/plugin-home-page": "^0.1.1-alpha.0",
|
||||
"@backstage/plugin-welcome": "^0.1.1-alpha.0",
|
||||
"@material-ui/core": "^4.9.1",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@spotify-backstage/core": "^0.1.0",
|
||||
"@spotify-backstage/plugin-home-page": "^0.1.0",
|
||||
"@spotify-backstage/plugin-welcome": "^0.1.0",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { CssBaseline, makeStyles, ThemeProvider } from '@material-ui/core';
|
||||
import { BackstageTheme, createApp } from '@spotify-backstage/core';
|
||||
import { BackstageTheme, createApp } from '@backstage/core';
|
||||
import React, { FC } from 'react';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import Root from './components/Root';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiHolder, ApiRegistry, errorApiRef } from '@spotify-backstage/core';
|
||||
import { ApiHolder, ApiRegistry, errorApiRef } from '@backstage/core';
|
||||
import { ErrorDisplayForwarder } from './components/ErrorDisplay/ErrorDisplay';
|
||||
|
||||
const builder = ApiRegistry.builder();
|
||||
|
||||
@@ -18,7 +18,7 @@ import React, { FC, useEffect, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Snackbar } from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { ErrorApi, ErrorContext } from '@spotify-backstage/core';
|
||||
import { ErrorApi, ErrorContext } from '@backstage/core';
|
||||
|
||||
type SubscriberFunc = (error: Error) => void;
|
||||
type Unsubscribe = () => void;
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
SidebarSpacer,
|
||||
SidebarDivider,
|
||||
SidebarSpace,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
|
||||
const useSidebarLogoStyles = makeStyles({
|
||||
root: {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* eslint-disable notice/notice */
|
||||
export { default as HomePagePlugin } from '@spotify-backstage/plugin-home-page';
|
||||
export { default as WelcomePlugin } from '@spotify-backstage/plugin-welcome';
|
||||
export { default as HomePagePlugin } from '@backstage/plugin-home-page';
|
||||
export { default as WelcomePlugin } from '@backstage/plugin-welcome';
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# @backstage/cli
|
||||
|
||||
This package provides a CLI for developing Backstage plugins and apps.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the package via npm or yarn:
|
||||
|
||||
```sh
|
||||
$ npm install --save @backstage/cli
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add @backstage/cli
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md)
|
||||
- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md)
|
||||
@@ -1,9 +1,22 @@
|
||||
{
|
||||
"name": "@spotify-backstage/cli",
|
||||
"version": "0.1.0",
|
||||
"main": "dist",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"homepage": "https://backstage.io",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spotify/backstage",
|
||||
"directory": "packages/cli"
|
||||
},
|
||||
"keywords": [
|
||||
"backstage"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist",
|
||||
"scripts": {
|
||||
"exec": "npx ts-node ./src",
|
||||
"build": "tsc --outDir dist --noEmit false --module CommonJS",
|
||||
|
||||
@@ -59,9 +59,8 @@ describe('createPlugin', () => {
|
||||
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'test-'));
|
||||
try {
|
||||
const sourceData =
|
||||
'{"name": "@spotify-backstage/{{id}}", "version": "{{version}}"}';
|
||||
const targetData =
|
||||
'{"name": "@spotify-backstage/foo", "version": "0.0.0"}';
|
||||
'{"name": "@backstage/{{id}}", "version": "{{version}}"}';
|
||||
const targetData = '{"name": "@backstage/foo", "version": "0.0.0"}';
|
||||
const sourcePath = path.join(tempDir, 'in.hbs');
|
||||
const targetPath = path.join(tempDir, 'out.json');
|
||||
fs.writeFileSync(sourcePath, sourceData);
|
||||
|
||||
@@ -130,7 +130,7 @@ export const addPluginDependencyToApp = (
|
||||
console.log();
|
||||
console.log(chalk.green(' Adding plugin as dependency in app:'));
|
||||
|
||||
const pluginPackage = `@spotify-backstage/plugin-${pluginName}`;
|
||||
const pluginPackage = `@backstage/plugin-${pluginName}`;
|
||||
const packageFile = path.join(rootDir, 'packages', 'app', 'package.json');
|
||||
|
||||
process.stdout.write(
|
||||
@@ -171,7 +171,7 @@ export const addPluginToApp = (rootDir: string, pluginName: string) => {
|
||||
console.log();
|
||||
console.log(chalk.green(' Import plugin in app:'));
|
||||
|
||||
const pluginPackage = `@spotify-backstage/plugin-${pluginName}`;
|
||||
const pluginPackage = `@backstage/plugin-${pluginName}`;
|
||||
const pluginNameCapitalized = pluginName
|
||||
.split('-')
|
||||
.map(name => capitalize(name))
|
||||
@@ -414,7 +414,7 @@ const createPlugin = async () => {
|
||||
console.log(
|
||||
chalk.green(
|
||||
`🥇 Successfully created ${chalk.cyan(
|
||||
`@spotify-backstage/plugin-${answers.id}`,
|
||||
`@backstage/plugin-${answers.id}`,
|
||||
)}`,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -26,7 +26,7 @@ import { waitForExit } from '../../helpers/run';
|
||||
|
||||
const PACKAGE_BLACKLIST = [
|
||||
// We never want to watch for changes in the cli, but all packages will depend on it.
|
||||
'@spotify-backstage/cli',
|
||||
'@backstage/cli',
|
||||
];
|
||||
|
||||
const WATCH_LOCATIONS = ['package.json', 'src', 'assets'];
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
{
|
||||
"name": "@spotify-backstage/plugin-{{id}}",
|
||||
"name": "@backstage/plugin-{{id}}",
|
||||
"version": "{{version}}",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
"license": "Apache-2.0",
|
||||
"private": false,
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "backstage-cli plugin:build",
|
||||
"lint": "backstage-cli lint",
|
||||
"test": "backstage-cli test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/cli": "^{{version}}",
|
||||
"@backstage/cli": "^{{version}}",
|
||||
"@types/testing-library__jest-dom": "5.0.2",
|
||||
"jest-fetch-mock": "^3.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core": "^{{version}}",
|
||||
"@material-ui/lab": "4.0.0-alpha.45"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import { render } from '@testing-library/react';
|
||||
import mockFetch from 'jest-fetch-mock';
|
||||
import ExampleComponent from './ExampleComponent';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@spotify-backstage/core';
|
||||
import { BackstageTheme } from '@backstage/core';
|
||||
|
||||
describe('ExampleComponent', () => {
|
||||
it('should render', () => {
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import {
|
||||
ContentHeader,
|
||||
HeaderLabel,
|
||||
SupportButton,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
import ExampleFetchComponent from '../ExampleFetchComponent';
|
||||
|
||||
const ExampleComponent: FC<{}> = () => (
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import TableHead from '@material-ui/core/TableHead';
|
||||
import TableRow from '@material-ui/core/TableRow';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import { useAsync } from 'react-use';
|
||||
import { Progress } from '@spotify-backstage/core';
|
||||
import { Progress } from '@backstage/core';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
table: {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# @backstage/core
|
||||
|
||||
This package provides the core API used by Backstage plugins and apps.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the package via npm or yarn:
|
||||
|
||||
```sh
|
||||
$ npm install --save @backstage/core
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add @backstage/core
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md)
|
||||
- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md)
|
||||
@@ -1,8 +1,21 @@
|
||||
{
|
||||
"name": "@spotify-backstage/core",
|
||||
"version": "0.1.0",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@backstage/core",
|
||||
"description": "Core API used by Backstage plugins and apps",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"homepage": "https://backstage.io",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spotify/backstage",
|
||||
"directory": "packages/core"
|
||||
},
|
||||
"keywords": [
|
||||
"backstage"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
"scripts": {
|
||||
@@ -26,7 +39,7 @@
|
||||
"recompose": "0.30.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# storybook
|
||||
|
||||
This package provides a storybook build for Backstage. See [storybook.backstage.io](http://storybook.backstage.io)
|
||||
@@ -1,11 +1,14 @@
|
||||
{
|
||||
"name": "@spotify-backstage/plugin-home-page",
|
||||
"version": "0.1.0",
|
||||
"name": "@backstage/plugin-home-page",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@spotify-backstage/core": "^0.1.0",
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@backstage/core": "^0.1.1-alpha.0",
|
||||
"@material-ui/core": "^4.9.1",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
@@ -13,9 +16,7 @@
|
||||
"@types/node": "^12.0.0",
|
||||
"@types/testing-library__jest-dom": "5.0.2",
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"@material-ui/core": "^4.9.1",
|
||||
"@material-ui/icons": "^4.9.1"
|
||||
"react-dom": "^16.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "backstage-cli plugin:build",
|
||||
|
||||
@@ -18,7 +18,7 @@ import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import HomePage from './HomePage';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@spotify-backstage/core';
|
||||
import { BackstageTheme } from '@backstage/core';
|
||||
|
||||
describe('HomePage', () => {
|
||||
it('should render', () => {
|
||||
|
||||
@@ -17,13 +17,7 @@
|
||||
import React, { FC } from 'react';
|
||||
import { Typography, Link, Grid } from '@material-ui/core';
|
||||
import HomePageTimer from '../HomepageTimer';
|
||||
import {
|
||||
Content,
|
||||
InfoCard,
|
||||
Header,
|
||||
Page,
|
||||
pageTheme,
|
||||
} from '@spotify-backstage/core';
|
||||
import { Content, InfoCard, Header, Page, pageTheme } from '@backstage/core';
|
||||
import SquadTechHealth from './SquadTechHealth';
|
||||
import Table from '@material-ui/core/Table';
|
||||
import TableBody from '@material-ui/core/TableBody';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import React, { FC } from 'react';
|
||||
import { Grid, Typography } from '@material-ui/core';
|
||||
|
||||
import { HorizontalScrollGrid, ProgressCard } from '@spotify-backstage/core';
|
||||
import { HorizontalScrollGrid, ProgressCard } from '@backstage/core';
|
||||
|
||||
const SquadTechHealth: FC<{}> = () => {
|
||||
return (
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import { HeaderLabel } from '@spotify-backstage/core';
|
||||
import { HeaderLabel } from '@backstage/core';
|
||||
|
||||
const timeFormat = { hour: '2-digit', minute: '2-digit' };
|
||||
const utcOptions = { timeZone: 'UTC', ...timeFormat };
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import HomePage from './components/HomePage';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"name": "@spotify-backstage/plugin-welcome",
|
||||
"version": "0.1.0",
|
||||
"name": "@backstage/plugin-welcome",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
"license": "Apache-2.0",
|
||||
"private": false,
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "backstage-cli plugin:build",
|
||||
"lint": "backstage-cli lint",
|
||||
"test": "backstage-cli test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/core": "^0.1.0",
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@backstage/core": "^0.1.1-alpha.0",
|
||||
"@types/testing-library__jest-dom": "5.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import { HeaderLabel } from '@spotify-backstage/core';
|
||||
import { HeaderLabel } from '@backstage/core';
|
||||
|
||||
const timeFormat = { hour: '2-digit', minute: '2-digit' };
|
||||
const utcOptions = { timeZone: 'UTC', ...timeFormat };
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import React from 'react';
|
||||
import { render, fireEvent } from '@testing-library/react';
|
||||
import ErrorButton from './ErrorButton';
|
||||
import { ApiRegistry, errorApiRef, ApiProvider } from '@spotify-backstage/core';
|
||||
import { ApiRegistry, errorApiRef, ApiProvider } from '@backstage/core';
|
||||
|
||||
describe('ErrorButton', () => {
|
||||
it('should trigger an error', () => {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import { Button } from '@material-ui/core';
|
||||
import { errorApiRef, useApi } from '@spotify-backstage/core';
|
||||
import { errorApiRef, useApi } from '@backstage/core';
|
||||
|
||||
const ErrorButton: FC<{}> = () => {
|
||||
const errorApi = useApi(errorApiRef);
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
ApiProvider,
|
||||
ApiRegistry,
|
||||
errorApiRef,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
|
||||
describe('WelcomePage', () => {
|
||||
it('should render', () => {
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
pageTheme,
|
||||
ContentHeader,
|
||||
SupportButton,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
import ErrorButton from './ErrorButton';
|
||||
|
||||
const WelcomePage: FC<{}> = () => {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import WelcomePage from './components/WelcomePage';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
Reference in New Issue
Block a user