@ethersphere/bee-dashboard 0.8.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +10 -3
  3. package/build/asset-manifest.json +12 -12
  4. package/build/index.html +1 -1
  5. package/build/static/js/2.4ff98457.chunk.js +3 -0
  6. package/build/static/js/{2.ab1e4c48.chunk.js.LICENSE.txt → 2.4ff98457.chunk.js.LICENSE.txt} +13 -0
  7. package/build/static/js/2.4ff98457.chunk.js.map +1 -0
  8. package/build/static/js/3.11a1627e.chunk.js +2 -0
  9. package/build/static/js/3.11a1627e.chunk.js.map +1 -0
  10. package/build/static/js/main.83c3a1a6.chunk.js +2 -0
  11. package/build/static/js/main.83c3a1a6.chunk.js.map +1 -0
  12. package/build/static/js/{runtime-main.e4043ba2.js → runtime-main.6c2da3b6.js} +2 -2
  13. package/build/static/js/{runtime-main.e4043ba2.js.map → runtime-main.6c2da3b6.js.map} +1 -1
  14. package/lib/App.js +105277 -0
  15. package/lib/App.js.map +1 -0
  16. package/lib/assets/fonts/IBMPlexMono500.ttf +0 -0
  17. package/lib/assets/fonts/IBMPlexMono600.ttf +0 -0
  18. package/lib/assets/fonts/IBMPlexMonoregular.ttf +0 -0
  19. package/lib/assets/fonts/WorkSans-Italic-VariableFont_wght.ttf +0 -0
  20. package/lib/assets/fonts/WorkSans-VariableFont_wght.ttf +0 -0
  21. package/lib/assets/logo.svg +11 -0
  22. package/lib/src/App.d.ts +9 -0
  23. package/lib/src/App.test.d.ts +1 -0
  24. package/lib/src/components/AlertUploadSize.d.ts +6 -0
  25. package/lib/src/components/AlertVersion.d.ts +2 -0
  26. package/lib/src/components/Capacity.d.ts +7 -0
  27. package/lib/src/components/CashoutModal.d.ts +7 -0
  28. package/lib/src/components/ClipboardCopy.d.ts +6 -0
  29. package/lib/src/components/CodeBlock.d.ts +8 -0
  30. package/lib/src/components/CodeBlockTabs.d.ts +8 -0
  31. package/lib/src/components/ErrorBoundary.d.ts +16 -0
  32. package/lib/src/components/EthereumAddress.d.ts +9 -0
  33. package/lib/src/components/ExpandableElement.d.ts +8 -0
  34. package/lib/src/components/ExpandableList.d.ts +10 -0
  35. package/lib/src/components/ExpandableListItem.d.ts +8 -0
  36. package/lib/src/components/ExpandableListItemActions.d.ts +6 -0
  37. package/lib/src/components/ExpandableListItemInput.d.ts +16 -0
  38. package/lib/src/components/ExpandableListItemKey.d.ts +7 -0
  39. package/lib/src/components/ExpandableListItemLink.d.ts +10 -0
  40. package/lib/src/components/ExpandableListItemNote.d.ts +6 -0
  41. package/lib/src/components/FitImage.d.ts +9 -0
  42. package/lib/src/components/History.d.ts +8 -0
  43. package/lib/src/components/HistoryHeader.d.ts +6 -0
  44. package/lib/src/components/Loading.d.ts +2 -0
  45. package/lib/src/components/QRCodeModal.d.ts +7 -0
  46. package/lib/src/components/SideBar.d.ts +2 -0
  47. package/lib/src/components/SideBarItem.d.ts +9 -0
  48. package/lib/src/components/SideBarStatus.d.ts +6 -0
  49. package/lib/src/components/StatusIcon.d.ts +9 -0
  50. package/lib/src/components/StripedWrapper.d.ts +6 -0
  51. package/lib/src/components/SwarmButton.d.ts +12 -0
  52. package/lib/src/components/TabsContainer.d.ts +12 -0
  53. package/lib/src/components/TopologyStats.d.ts +7 -0
  54. package/lib/src/components/TroubleshootConnectionCard.d.ts +2 -0
  55. package/lib/src/components/WithdrawDepositModal.d.ts +14 -0
  56. package/lib/src/config.d.ts +11 -0
  57. package/lib/src/containers/DepositModal.d.ts +2 -0
  58. package/lib/src/containers/WithdrawModal.d.ts +2 -0
  59. package/lib/src/hooks/accounting.d.ts +18 -0
  60. package/lib/src/hooks/apiHooks.d.ts +6 -0
  61. package/lib/src/index.d.ts +1 -0
  62. package/lib/src/layout/Dashboard.d.ts +6 -0
  63. package/lib/src/models/Token.d.ts +25 -0
  64. package/lib/src/models/Token.test.d.ts +1 -0
  65. package/lib/src/pages/accounting/PeerBalances.d.ts +10 -0
  66. package/lib/src/pages/accounting/index.d.ts +2 -0
  67. package/lib/src/pages/files/AssetIcon.d.ts +6 -0
  68. package/lib/src/pages/files/AssetPreview.d.ts +8 -0
  69. package/lib/src/pages/files/AssetSummary.d.ts +6 -0
  70. package/lib/src/pages/files/Download.d.ts +2 -0
  71. package/lib/src/pages/files/DownloadActionBar.d.ts +10 -0
  72. package/lib/src/pages/files/FileNavigation.d.ts +6 -0
  73. package/lib/src/pages/files/SelectStamp.d.ts +9 -0
  74. package/lib/src/pages/files/Share.d.ts +7 -0
  75. package/lib/src/pages/files/StampPreview.d.ts +7 -0
  76. package/lib/src/pages/files/Upload.d.ts +2 -0
  77. package/lib/src/pages/files/UploadActionBar.d.ts +13 -0
  78. package/lib/src/pages/files/UploadArea.d.ts +6 -0
  79. package/lib/src/pages/files/UploadLander.d.ts +2 -0
  80. package/lib/src/pages/info/index.d.ts +2 -0
  81. package/lib/src/pages/settings/index.d.ts +2 -0
  82. package/lib/src/pages/stamps/CreatePostageStampModal.d.ts +6 -0
  83. package/lib/src/pages/stamps/PostageStamp.d.ts +8 -0
  84. package/lib/src/pages/stamps/SelectPostageStampModal.d.ts +9 -0
  85. package/lib/src/pages/stamps/StampsTable.d.ts +7 -0
  86. package/lib/src/pages/stamps/index.d.ts +2 -0
  87. package/lib/src/pages/status/SetupSteps/ChequebookDeployFund.d.ts +3 -0
  88. package/lib/src/pages/status/SetupSteps/DebugConnectionCheck.d.ts +2 -0
  89. package/lib/src/pages/status/SetupSteps/EthereumConnectionCheck.d.ts +2 -0
  90. package/lib/src/pages/status/SetupSteps/NodeConnectionCheck.d.ts +2 -0
  91. package/lib/src/pages/status/SetupSteps/PeerConnection.d.ts +2 -0
  92. package/lib/src/pages/status/SetupSteps/VersionCheck.d.ts +2 -0
  93. package/lib/src/pages/status/index.d.ts +2 -0
  94. package/lib/src/providers/Bee.d.ts +45 -0
  95. package/lib/src/providers/File.d.ts +13 -0
  96. package/lib/src/providers/Platform.d.ts +23 -0
  97. package/lib/src/providers/Settings.d.ts +21 -0
  98. package/lib/src/providers/Stamps.d.ts +22 -0
  99. package/lib/src/reportWebVitals.d.ts +3 -0
  100. package/lib/src/routes.d.ts +15 -0
  101. package/lib/src/setupTests.d.ts +1 -0
  102. package/lib/src/theme.d.ts +7 -0
  103. package/lib/src/types.d.ts +19 -0
  104. package/lib/src/utils/SwarmFile.d.ts +10 -0
  105. package/lib/src/utils/date.d.ts +1 -0
  106. package/lib/src/utils/file.d.ts +7 -0
  107. package/lib/src/utils/hash.d.ts +1 -0
  108. package/lib/src/utils/index.d.ts +52 -0
  109. package/lib/src/utils/local-storage.d.ts +12 -0
  110. package/lib/src/utils/threshold.d.ts +22 -0
  111. package/package.json +70 -39
  112. package/serve.js +0 -0
  113. package/build/static/js/2.ab1e4c48.chunk.js +0 -3
  114. package/build/static/js/2.ab1e4c48.chunk.js.map +0 -1
  115. package/build/static/js/3.ad8c73af.chunk.js +0 -2
  116. package/build/static/js/3.ad8c73af.chunk.js.map +0 -1
  117. package/build/static/js/main.105fda76.chunk.js +0 -2
  118. package/build/static/js/main.105fda76.chunk.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import type { ReactElement } from 'react';
2
+ declare const ChequebookDeployFund: () => ReactElement | null;
3
+ export default ChequebookDeployFund;
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export default function NodeConnectionCheck(): ReactElement | null;
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export default function EthereumConnectionCheck(): ReactElement | null;
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export default function NodeConnectionCheck(): ReactElement | null;
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export default function PeerConnection(): ReactElement | null;
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export default function VersionCheck(): ReactElement | null;
@@ -0,0 +1,2 @@
1
+ import type { ReactElement } from 'react';
2
+ export default function NodeSetupWorkflow(): ReactElement;
@@ -0,0 +1,45 @@
1
+ import type { ChequebookAddressResponse, Health, LastChequesResponse, NodeAddresses, Peer, Topology } from '@ethersphere/bee-js';
2
+ import { ReactChild, ReactElement } from 'react';
3
+ import type { Balance, ChequebookBalance, Settlements } from '../types';
4
+ interface Status {
5
+ all: boolean;
6
+ version: boolean;
7
+ blockchainConnection: boolean;
8
+ debugApiConnection: boolean;
9
+ apiConnection: boolean;
10
+ topology: boolean;
11
+ chequebook: boolean;
12
+ }
13
+ interface ContextInterface {
14
+ status: Status;
15
+ latestPublishedVersion?: string;
16
+ latestUserVersion?: string;
17
+ latestUserVersionExact?: string;
18
+ isLatestBeeVersion: boolean;
19
+ latestBeeVersionUrl: string;
20
+ error: Error | null;
21
+ apiHealth: boolean;
22
+ debugApiHealth: Health | null;
23
+ nodeAddresses: NodeAddresses | null;
24
+ topology: Topology | null;
25
+ chequebookAddress: ChequebookAddressResponse | null;
26
+ peers: Peer[] | null;
27
+ chequebookBalance: ChequebookBalance | null;
28
+ peerBalances: Balance[] | null;
29
+ peerCheques: LastChequesResponse | null;
30
+ settlements: Settlements | null;
31
+ latestBeeRelease: LatestBeeRelease | null;
32
+ isLoading: boolean;
33
+ isRefreshing: boolean;
34
+ lastUpdate: number | null;
35
+ start: (frequency?: number) => void;
36
+ stop: () => void;
37
+ refresh: () => Promise<void>;
38
+ }
39
+ export declare const Context: import("react").Context<ContextInterface>;
40
+ export declare const Consumer: import("react").Consumer<ContextInterface>;
41
+ interface Props {
42
+ children: ReactChild;
43
+ }
44
+ export declare function Provider({ children }: Props): ReactElement;
45
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ReactChild, ReactElement } from 'react';
2
+ import { SwarmFile } from '../utils/SwarmFile';
3
+ interface ContextInterface {
4
+ files: SwarmFile[];
5
+ setFiles: (files: SwarmFile[]) => void;
6
+ }
7
+ export declare const Context: import("react").Context<ContextInterface>;
8
+ export declare const Consumer: import("react").Consumer<ContextInterface>;
9
+ interface Props {
10
+ children: ReactChild;
11
+ }
12
+ export declare function Provider({ children }: Props): ReactElement;
13
+ export {};
@@ -0,0 +1,23 @@
1
+ import { ReactChild, ReactElement } from 'react';
2
+ export declare enum Platforms {
3
+ macOS = 0,
4
+ Linux = 1,
5
+ Windows = 2,
6
+ iOS = 3,
7
+ Android = 4
8
+ }
9
+ export declare enum SupportedPlatforms {
10
+ macOS = 0,
11
+ Linux = 1
12
+ }
13
+ interface ContextInterface {
14
+ platform: SupportedPlatforms;
15
+ setPlatform: (platform: SupportedPlatforms) => void;
16
+ }
17
+ export declare const Context: import("react").Context<ContextInterface>;
18
+ export declare const Consumer: import("react").Consumer<ContextInterface>;
19
+ interface Props {
20
+ children: ReactChild;
21
+ }
22
+ export declare function Provider({ children }: Props): ReactElement;
23
+ export {};
@@ -0,0 +1,21 @@
1
+ import { Bee, BeeDebug } from '@ethersphere/bee-js';
2
+ import { ReactChild, ReactElement } from 'react';
3
+ interface ContextInterface {
4
+ apiUrl: string;
5
+ apiDebugUrl: string;
6
+ beeApi: Bee | null;
7
+ beeDebugApi: BeeDebug | null;
8
+ setApiUrl: (url: string) => void;
9
+ setDebugApiUrl: (url: string) => void;
10
+ lockedApiSettings: boolean;
11
+ }
12
+ export declare const Context: import("react").Context<ContextInterface>;
13
+ export declare const Consumer: import("react").Consumer<ContextInterface>;
14
+ interface Props {
15
+ children: ReactChild;
16
+ beeApiUrl?: string;
17
+ beeDebugApiUrl?: string;
18
+ lockedApiSettings?: boolean;
19
+ }
20
+ export declare function Provider({ children, beeApiUrl, beeDebugApiUrl, lockedApiSettings: extLockedApiSettings, }: Props): ReactElement;
21
+ export {};
@@ -0,0 +1,22 @@
1
+ import { PostageBatch } from '@ethersphere/bee-js';
2
+ import { ReactChild, ReactElement } from 'react';
3
+ export interface EnrichedPostageBatch extends PostageBatch {
4
+ usage: number;
5
+ usageText: string;
6
+ }
7
+ interface ContextInterface {
8
+ stamps: EnrichedPostageBatch[] | null;
9
+ error: Error | null;
10
+ isLoading: boolean;
11
+ lastUpdate: number | null;
12
+ start: (frequency?: number) => void;
13
+ stop: () => void;
14
+ refresh: () => Promise<void>;
15
+ }
16
+ export declare const Context: import("react").Context<ContextInterface>;
17
+ export declare const Consumer: import("react").Consumer<ContextInterface>;
18
+ interface Props {
19
+ children: ReactChild;
20
+ }
21
+ export declare function Provider({ children }: Props): ReactElement;
22
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+ declare const reportWebVitals: (onPerfEntry?: ReportHandler | undefined) => void;
3
+ export default reportWebVitals;
@@ -0,0 +1,15 @@
1
+ import type { ReactElement } from 'react';
2
+ export declare enum ROUTES {
3
+ INFO = "/",
4
+ FILES = "/files",
5
+ UPLOAD = "/files/upload",
6
+ UPLOAD_IN_PROGRESS = "/files/upload/workflow",
7
+ DOWNLOAD = "/files/download",
8
+ HASH = "/files/hash/:hash",
9
+ ACCOUNTING = "/accounting",
10
+ SETTINGS = "/settings",
11
+ STAMPS = "/stamps",
12
+ STATUS = "/status"
13
+ }
14
+ declare const BaseRouter: () => ReactElement;
15
+ export default BaseRouter;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,7 @@
1
+ import { Theme } from '@material-ui/core/styles';
2
+ declare module '@material-ui/core/styles/createPalette' {
3
+ interface TypeBackground {
4
+ appBar: string;
5
+ }
6
+ }
7
+ export declare const theme: Theme;
@@ -0,0 +1,19 @@
1
+ import type { Token } from './models/Token';
2
+ export interface ChequebookBalance {
3
+ totalBalance: Token;
4
+ availableBalance: Token;
5
+ }
6
+ export interface Balance {
7
+ peer: string;
8
+ balance: Token;
9
+ }
10
+ export interface Settlement {
11
+ peer: string;
12
+ received: Token;
13
+ sent: Token;
14
+ }
15
+ export interface Settlements {
16
+ totalReceived: Token;
17
+ totalSent: Token;
18
+ settlements: Settlement[];
19
+ }
@@ -0,0 +1,10 @@
1
+ export declare class SwarmFile {
2
+ name: string;
3
+ path: string;
4
+ type: string;
5
+ size: number;
6
+ webkitRelativePath: string;
7
+ arrayBuffer: () => Promise<ArrayBuffer>;
8
+ private data;
9
+ constructor(file: File);
10
+ }
@@ -0,0 +1 @@
1
+ export declare function getPrettyDateString(date: Date): string;
@@ -0,0 +1,7 @@
1
+ import { FileData } from '@ethersphere/bee-js';
2
+ import { SwarmFile } from './SwarmFile';
3
+ export declare function detectIndexHtml(files: SwarmFile[]): string | false;
4
+ export declare function getHumanReadableFileSize(bytes: number): string;
5
+ export declare function convertBeeFileToBrowserFile(file: FileData<ArrayBuffer>): Partial<File>;
6
+ export declare function convertManifestToFiles(files: Record<string, string>): SwarmFile[];
7
+ export declare function getAssetNameFromFiles(files: SwarmFile[]): string;
@@ -0,0 +1 @@
1
+ export declare function shortenHash(hash: string, sliceLength?: number): string;
@@ -0,0 +1,52 @@
1
+ import { BigNumber } from 'bignumber.js';
2
+ /**
3
+ * Test if value is an integer
4
+ *
5
+ * @param value Value to be tested if it is an integer
6
+ *
7
+ * @returns True if the passed in value is integer
8
+ */
9
+ export declare function isInteger(value: unknown): value is BigNumber | bigint;
10
+ /**
11
+ *Convert value into a BigNumber if not already
12
+ *
13
+ * @param value Value to be converted
14
+ *
15
+ * @throws {TypeError} if the value is not convertible to a BigNumber
16
+ *
17
+ * @returns BigNumber - but it may still be NaN or Infinite
18
+ */
19
+ export declare function makeBigNumber(value: BigNumber | BigInt | number | string): BigNumber | never;
20
+ export declare type PromiseSettlements<T> = {
21
+ fulfilled: PromiseFulfilledResult<T>[];
22
+ rejected: PromiseRejectedResult[];
23
+ };
24
+ export declare type UnwrappedPromiseSettlements<T> = {
25
+ fulfilled: T[];
26
+ rejected: string[];
27
+ };
28
+ export declare function sleepMs(ms: number): Promise<void>;
29
+ /**
30
+ * Maps the returned results of `Promise.allSettled` to an object
31
+ * with `fulfilled` and `rejected` arrays for easy access.
32
+ *
33
+ * The results still need to be unwrapped to get the fulfilled values or rejection reasons.
34
+ */
35
+ export declare function mapPromiseSettlements<T>(promises: PromiseSettledResult<T>[]): PromiseSettlements<T>;
36
+ /**
37
+ * Maps the returned values of `Promise.allSettled` to an object
38
+ * with `fulfilled` and `rejected` arrays for easy access.
39
+ *
40
+ * For rejected promises, the value is the stringified `reason`,
41
+ * or `'Unknown error'` string when it is unavailable.
42
+ */
43
+ export declare function unwrapPromiseSettlements<T>(promiseSettledResults: PromiseSettledResult<T>[]): UnwrappedPromiseSettlements<T>;
44
+ /**
45
+ * Wraps a `Promise<T>` or async function inside a new `Promise<T>`,
46
+ * which retries the original function up to `maxRetries` times,
47
+ * waiting `delayMs` milliseconds between failed attempts.
48
+ *
49
+ * If all attempts fail, then this `Promise<T>` also rejects.
50
+ */
51
+ export declare function makeRetriablePromise<T>(fn: () => Promise<T>, maxRetries?: number, delayMs?: number): Promise<T>;
52
+ export declare function extractSwarmHash(string: string): string | null;
@@ -0,0 +1,12 @@
1
+ export declare enum HISTORY_KEYS {
2
+ UPLOAD_HISTORY = "UPLOAD_HISTORY",
3
+ DOWNLOAD_HISTORY = "DOWNLOAD_HISTORY"
4
+ }
5
+ export interface HistoryItem {
6
+ createdAt: number;
7
+ name: string;
8
+ hash: string;
9
+ }
10
+ export declare function putHistory(key: string, hash: string, name: string): void;
11
+ export declare function getHistorySafe(key: string): HistoryItem[];
12
+ export declare function determineHistoryName(hash: string, indexDocument?: string | null): string;
@@ -0,0 +1,22 @@
1
+ interface Threshold {
2
+ minimumValue: number;
3
+ explanation: string;
4
+ score: number;
5
+ }
6
+ declare type Thresholds = {
7
+ connectedPeers: Threshold[];
8
+ population: Threshold[];
9
+ depth: Threshold[];
10
+ };
11
+ declare type ThresholdValue = {
12
+ score: number;
13
+ maximumScore: number;
14
+ explanation: string;
15
+ };
16
+ export declare type ThresholdValues = {
17
+ connectedPeers: ThresholdValue;
18
+ population: ThresholdValue;
19
+ depth: ThresholdValue;
20
+ };
21
+ export declare function pickThreshold(key: keyof Thresholds, value: number): ThresholdValue;
22
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethersphere/bee-dashboard",
3
- "version": "0.8.0",
3
+ "version": "0.11.2",
4
4
  "description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
5
5
  "keywords": [
6
6
  "bee",
@@ -15,6 +15,8 @@
15
15
  "bin": {
16
16
  "bee-dashboard": "./serve.js"
17
17
  },
18
+ "main": "lib/App.js",
19
+ "types": "lib/src/App.d.ts",
18
20
  "bugs": {
19
21
  "url": "https://github.com/ethersphere/bee-dashboard/issues/"
20
22
  },
@@ -24,72 +26,101 @@
24
26
  "url": "https://github.com/ethersphere/bee-dashboard.git"
25
27
  },
26
28
  "dependencies": {
27
- "@ethersphere/bee-js": "2.1.0",
29
+ "@ethersphere/bee-js": "3.0.0",
30
+ "@ethersphere/manifest-js": "^1.0.0",
28
31
  "@material-ui/core": "4.12.3",
29
32
  "@material-ui/icons": "4.11.2",
30
33
  "@material-ui/lab": "4.0.0-alpha.57",
31
- "@types/react-router": "5.1.13",
32
- "@types/react-router-dom": "5.1.7",
33
- "axios": "0.21.1",
34
+ "axios": "0.24.0",
34
35
  "bignumber.js": "9.0.1",
35
- "feather-icons": "4.28.0",
36
- "formik": "2.2.8",
36
+ "file-saver": "^2.0.5",
37
+ "formik": "2.2.9",
37
38
  "formik-material-ui": "3.0.1",
39
+ "jszip": "^3.7.1",
38
40
  "material-ui-dropzone": "3.5.0",
39
- "notistack": "1.0.9",
41
+ "notistack": "1.0.10",
40
42
  "opener": "1.5.2",
41
43
  "qrcode.react": "1.0.1",
42
- "react": "17.0.2",
43
- "react-copy-to-clipboard": "5.0.3",
44
- "react-dom": "17.0.2",
44
+ "react": ">= 17.0.2",
45
+ "react-copy-to-clipboard": "5.0.4",
46
+ "react-dom": ">= 17.0.2",
45
47
  "react-feather": "2.0.9",
46
48
  "react-identicons": "1.2.5",
49
+ "react-router": "5.2.0",
47
50
  "react-router-dom": "5.2.0",
48
- "react-syntax-highlighter": "15.4.3",
49
- "semver": "7.3.2",
51
+ "react-syntax-highlighter": "15.4.4",
52
+ "semver": "7.3.5",
50
53
  "serve-handler": "6.1.3"
51
54
  },
52
55
  "devDependencies": {
53
- "@testing-library/jest-dom": "5.12.0",
54
- "@testing-library/react": "11.2.6",
55
- "@testing-library/user-event": "13.1.5",
56
- "@types/jest": "26.0.22",
57
- "@types/node": "14.14.41",
58
- "@types/qrcode.react": "1.0.1",
59
- "@types/react": "17.0.3",
60
- "@types/react-copy-to-clipboard": "5.0.0",
61
- "@types/react-dom": "17.0.3",
62
- "@types/react-syntax-highlighter": "13.5.0",
63
- "@types/semver": "7.3.6",
64
- "eslint": "7.32.0",
65
- "eslint-config-prettier": "8.3.0",
66
- "eslint-plugin-jest": "24.4.0",
67
- "eslint-plugin-prettier": "3.4.1",
68
- "eslint-plugin-react": "7.24.0",
69
- "prettier": "2.3.2",
56
+ "@babel/core": "7.16.0",
57
+ "@babel/plugin-proposal-class-properties": "7.16.0",
58
+ "@babel/plugin-transform-runtime": "7.16.4",
59
+ "@babel/preset-env": "7.16.4",
60
+ "@babel/preset-react": "7.16.0",
61
+ "@babel/preset-typescript": "7.16.0",
62
+ "@commitlint/config-conventional": "14.1.0",
63
+ "@testing-library/jest-dom": "5.15.0",
64
+ "@testing-library/react": "12.1.2",
65
+ "@types/file-saver": "2.0.4",
66
+ "@types/jest": "27.0.2",
67
+ "@types/qrcode.react": "1.0.2",
68
+ "@types/react": "17.0.34",
69
+ "@types/react-copy-to-clipboard": "5.0.2",
70
+ "@types/react-dom": "17.0.11",
71
+ "@types/react-router": "5.1.17",
72
+ "@types/react-router-dom": "5.3.2",
73
+ "@types/react-syntax-highlighter": "13.5.2",
74
+ "@types/semver": "7.3.9",
75
+ "@typescript-eslint/eslint-plugin": "4.33.0",
76
+ "@typescript-eslint/parser": "4.33.0",
77
+ "babel-eslint": "10.1.0",
78
+ "babel-loader": "8.1.0",
79
+ "babel-plugin-syntax-dynamic-import": "6.18.0",
80
+ "babel-plugin-tsconfig-paths": "1.0.2",
81
+ "depcheck": "1.4.2",
82
+ "eslint": "7.24.0",
83
+ "eslint-config-prettier": "8.2.0",
84
+ "eslint-config-react-app": "6.0.0",
85
+ "eslint-plugin-flowtype": "5.10.0",
86
+ "eslint-plugin-import": "2.25.2",
87
+ "eslint-plugin-jest": "24.3.5",
88
+ "eslint-plugin-jsx-a11y": "6.4.1",
89
+ "eslint-plugin-prettier": "3.4.0",
90
+ "eslint-plugin-react": "7.23.2",
91
+ "eslint-plugin-react-hooks": "4.2.0",
92
+ "eslint-plugin-testing-library": "3.10.2",
93
+ "file-loader": "6.2.0",
94
+ "prettier": "2.4.1",
70
95
  "react-scripts": "4.0.3",
71
- "typescript": "4.2.4",
72
- "web-vitals": "1.1.1"
96
+ "ts-node": "^10.4.0",
97
+ "typescript": "4.4.4",
98
+ "web-vitals": "2.1.2",
99
+ "webpack": "4.44.2",
100
+ "webpack-cli": "^4.9.1"
101
+ },
102
+ "peerDependencies": {
103
+ "react": ">= 17.0.2",
104
+ "react-dom": ">= 17.0.2"
73
105
  },
74
106
  "scripts": {
75
107
  "prepare": "npm run build",
76
108
  "start": "react-scripts start",
77
109
  "build": "react-scripts build",
110
+ "build:component": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' webpack --mode=production",
111
+ "compile:types": "tsc --project tsconfig.lib.json --emitDeclarationOnly --declaration",
78
112
  "test": "react-scripts test",
79
113
  "serve": "node ./serve.js",
114
+ "depcheck": "depcheck .",
80
115
  "lint": "eslint --fix \"src/**/*.ts\" \"src/**/*.tsx\" && prettier --write \"src/**/*.ts\" \"src/**/*.tsx\"",
81
- "lint:check": "eslint \"src/**/*.ts\" \"src/**/*.tsx\" && prettier --check \"src/**/*.ts\" \"src/**/*.tsx\""
116
+ "lint:check": "eslint \"src/**/*.ts\" \"src/**/*.tsx\" && prettier --check \"src/**/*.ts\" \"src/**/*.tsx\"",
117
+ "check:types": "tsc --project tsconfig.lib.json"
82
118
  },
83
119
  "files": [
120
+ "lib",
84
121
  "build",
85
122
  "serve.js"
86
123
  ],
87
- "eslintConfig": {
88
- "extends": [
89
- "react-app",
90
- "react-app/jest"
91
- ]
92
- },
93
124
  "browserslist": {
94
125
  "production": [
95
126
  ">0.2%",
package/serve.js CHANGED
File without changes