Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ“ˆ (repo) [DSDK-368]: Add backstage metadata #558

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/docs/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import globals from "globals";
export default [
...baseConfig,
{
ignores: [".next"],
ignores: [".next", "**/_meta.js"],
},
{
languageOptions: {
Expand All @@ -15,7 +15,7 @@ export default [
},
{
files: [
"next.config.js",
"next.config.mjs",
"postcss.config.js",
"tailwind.config.js",
"theme.config.tsx",
Expand Down
8 changes: 0 additions & 8 deletions apps/docs/next.config.js

This file was deleted.

8 changes: 8 additions & 0 deletions apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import nextra from "nextra";

const withNextra = nextra({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
});

export default withNextra();
15 changes: 8 additions & 7 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ledgerhq/ledger-dmk-docs",
"version": "1.0.0",
"description": "",
"description": "Device Management Kit documentation",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -17,16 +17,17 @@
"author": "",
"license": "ISC",
"dependencies": {
"autoprefixer": "^10.4.17",
"next": "^14.1.0",
"nextra": "^2.13.3",
"nextra-theme-docs": "^2.13.3",
"postcss": "^8.4.35",
"next": "^14.2.15",
"nextra": "^3.0.13",
"nextra-theme-blog": "^3.0.13",
"nextra-theme-docs": "^3.0.15",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwindcss": "^3.4.1"
"tailwindcss": "^3.4.16",
"tailwind-merge": "^1.14.0"
},
"devDependencies": {
"autoprefixer": "^10.4.17",
"@ledgerhq/eslint-config-dsdk": "workspace:*",
"@ledgerhq/prettier-config-dsdk": "workspace:*",
"@ledgerhq/tsconfig-dsdk": "workspace:*",
Expand Down
File renamed without changes.
13 changes: 13 additions & 0 deletions apps/docs/pages/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
index: {
title: "Home",
theme: {
layout: "raw",
},
display: "hidden",
},
docs: {
title: "Documentation",
type: "page",
},
};
13 changes: 0 additions & 13 deletions apps/docs/pages/_meta.json

This file was deleted.

8 changes: 8 additions & 0 deletions apps/docs/pages/docs/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
docs: "Ledger Device Management Kits",
explanations: "Explanations",
beginners: "Beginner's guide",
integration_walkthroughs: "Integration Walkthrough",
migrations: "Migrations",
references: "References (TSDoc)",
};
8 changes: 0 additions & 8 deletions apps/docs/pages/docs/_meta.json

This file was deleted.

6 changes: 6 additions & 0 deletions apps/docs/pages/docs/beginners/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
setup: "Setup",
init_dmk: "Initialize Device Management Kit",
discover_and_connect: "Discover and connect",
exchange_data: "Exchange data with the device",
};
6 changes: 0 additions & 6 deletions apps/docs/pages/docs/beginners/_meta.json

This file was deleted.

6 changes: 6 additions & 0 deletions apps/docs/pages/docs/explanations/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
introduction: "Why the Device Management Kit?",
ledgerjs: "Differences with LedgerJS",
dmk: "Device Management Kit",
signers: "Signer kits",
};
6 changes: 0 additions & 6 deletions apps/docs/pages/docs/explanations/_meta.json

This file was deleted.

5 changes: 5 additions & 0 deletions apps/docs/pages/docs/explanations/signers/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
eth: "Signer Ethereum (EVM)",
solana: "Signer Solana",
btc: "Signer Bitcoin",
};
5 changes: 0 additions & 5 deletions apps/docs/pages/docs/explanations/signers/_meta.json

This file was deleted.

3 changes: 3 additions & 0 deletions apps/docs/pages/docs/integration_walkthroughs/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
how_to: "How to ...",
};
3 changes: 0 additions & 3 deletions apps/docs/pages/docs/integration_walkthroughs/_meta.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
how_to_use_a_signer: "use a Signer",
build_custom_command: "build a custom command",
};

This file was deleted.

3 changes: 3 additions & 0 deletions apps/docs/pages/docs/migrations/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
"04_to_05": "DMK: Migrate from v0.4.0 to 0.5.0",
};
3 changes: 0 additions & 3 deletions apps/docs/pages/docs/migrations/_meta.json

This file was deleted.

2 changes: 1 addition & 1 deletion apps/docs/tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"next.config.js",
"next.config.mjs",
"postcss.config.js",
"eslint.config.mjs",
"tailwind.config.js"
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"**/*.js",
"eslint.config.mjs",
"pages/_app.js",
"tailwind.config.js"
],
"exclude": ["node_modules"]
Expand Down
Binary file added apps/sample/public/devices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/sample/public/devices_crop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/sample/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/sample/public/nano-x.png
Binary file not shown.
3 changes: 3 additions & 0 deletions apps/sample/src/app/client-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const ClientRootLayout: React.FC<PropsWithChildren> = ({ children }) => {
<SignerEthProvider>
<StyleProvider selectedPalette="dark" fontsPath="/fonts">
<GlobalStyle />
<head>
<link rel="shortcut icon" href="../favicon.png" />
</head>
<body>
<Root>
<Sidebar />
Expand Down
18 changes: 7 additions & 11 deletions apps/sample/src/components/MainView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import styled, { type DefaultTheme } from "styled-components";

import { ConnectDeviceActions } from "./ConnectDeviceActions";

const Root = styled(Flex)`
const Root = styled(Flex).attrs({ rowGap: 6 })`
flex: 1;
justify-content: center;
align-items: center;
Expand All @@ -18,14 +18,10 @@ const ErrorNotification = styled(Notification)`
width: 70%;
`;

const Description = styled(Text).attrs({ my: 6 })`
const Description = styled(Text)`
color: ${({ theme }: { theme: DefaultTheme }) => theme.colors.neutral.c70};
`;

const NanoLogo = styled(Image).attrs({ mb: 8 })`
transform: rotate(23deg);
`;

export const MainView: React.FC = () => {
const [connectionError, setConnectionError] = useState<DmkError | null>(null);

Expand All @@ -44,11 +40,11 @@ export const MainView: React.FC = () => {
}, [connectionError]);
return (
<Root>
<NanoLogo
src={"/nano-x.png"}
alt={"nano-x-logo"}
width={155}
height={250}
<Image
src={"/devices_crop.png"}
alt={"ledger-devices-image"}
width={400}
height={330}
/>
<Text variant={"h2Inter"} fontWeight={"semiBold"} textTransform={"none"}>
Ledger Device Management Kit
Expand Down
102 changes: 102 additions & 0 deletions catalog-info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: device-management-kit-ts
description: Device Management Kit Library
tags:
- typescript
- sdk
- device-management-kit
annotations:
#backstage.io/techdocs-ref: dir:.
#backstage.io/adr-location: docs/architecture/decisions
github.com/project-slug: "LedgerHQ/device-sdk-ts"
github.com/team-slug: "LedgerHQ/live-devices"
ledger.com/code_repository: https://github.com/LedgerHQ/device-sdk-ts
ledger.com/documentation: https://developers.ledger.com/docs/device-interaction/getting-started
jira/project-key: DSDK
labels:
ledger.com/contains_pii: "no"
ledger.com/donjon_review: "on-demand"
license: Apache-2.0
spec:
type: library
lifecycle: production
owner: group:live-devices
system: ledger-device-management-kit
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: ts-device-management-kit
description: Device Management Kit Library
tags:
- typescript
- library
- device-management-kit
- npm
spec:
type: library
lifecycle: production
owner: group:live-devices
system: ledger-device-management-kit
subComponentOf: device-management-kit-ts
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: ts-device-signer-kit-ethereum
description: Signer Kit for ETH
spec:
type: library
lifecycle: production
owner: group:live-devices
system: ledger-device-management-kit
subComponentOf: ts-device-management-kit
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: ts-device-signer-kit-ethereum
description: Signer Kit for ETH
spec:
type: library
lifecycle: production
owner: group:live-devices
system: ledger-device-management-kit
subComponentOf: ts-device-management-kit
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: ts-device-signer-kit-solana
description: Signer Kit for Solana
tags:
- typescript
- signer
- solana
- npm
spec:
type: library
lifecycle: production
owner: group:live-devices
system: ledger-device-management-kit
subComponentOf: device-management-kit-ts
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: ts-context-module
description: Module for adding context to transactions
tags:
- typescript
- cal-service
- clear-signing
- npm
spec:
type: library
lifecycle: production
owner: group:live-devices
system: ledger-device-management-kit
subComponentOf: device-management-kit-ts
Loading
Loading