From 8c78768facec2edfab05fa78b0ae56fb6cbfa215 Mon Sep 17 00:00:00 2001 From: peetzweg/ <839848+peetzweg@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:05:53 +0200 Subject: [PATCH] chore: change `deno` to `node` with `pnpm` (#55) Co-authored-by: Sam Ruberti --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 3 +- .github/workflows/lint.yml | 8 +- .github/workflows/release.yml | 28 +- .github/workflows/test.yml | 19 - .github/workflows/udd.yml | 25 - .gitignore | 7 +- .vscode/extensions.json | 4 + .vscode/settings.json | 13 + CONTRIBUTING.md | 9 +- _tasks/dnt.ts | 75 - _tasks/star.ts | 18 - _tasks/udd.ts | 18 - chains/mod.ts | 2 - core/mod.ts | 3 - core/substrate/mod.ts | 2 - core/types/result.ts | 1 - core/types/talisman-connect-wallets.ts | 2 - core/types/unsub.ts | 1 - cspell.json | 8 +- deno.jsonc | 45 - deps/dnt.ts | 1 - deps/std/fs.ts | 1 - deps/std/path.ts | 1 - import_map.json | 22 - mod.ts | 1 - package.json | 28 + packages/useink/package.json | 92 + .../useink/src/chains}/data/chaindata.ts | 0 .../useink/src/chains/data/index.ts | 0 .../src/chains}/data/testnet-chaindata.ts | 55 +- .../useink/src/chains}/data/types.ts | 0 packages/useink/src/chains/index.ts | 2 + .../useink/src/chains}/types.ts | 0 .../useink/src/core}/contracts/call.ts | 6 +- .../src/core}/contracts/decodeCallResult.ts | 2 +- .../useink/src/core}/contracts/decodeError.ts | 8 +- .../src/core}/contracts/getRegistryError.ts | 2 +- .../useink/src/core/contracts/index.ts | 0 .../core}/contracts/toContractAbiMessage.ts | 6 +- .../core}/contracts/toRegistryErrorDecoded.ts | 2 +- .../src/core}/contracts/txPaymentInfo.ts | 6 +- .../useink/src/core}/contracts/types.ts | 4 +- packages/useink/src/core/index.ts | 3 + .../core}/substrate/balances/getBalance.ts | 2 +- .../src/core/substrate/balances/index.ts | 1 - .../src/core}/substrate/balances/transfer.ts | 7 +- packages/useink/src/core/substrate/index.ts | 2 + .../core}/substrate/timestamp/getTimestamp.ts | 2 +- .../substrate/timestamp/getTimestampNow.ts | 2 +- .../src/core/substrate/timestamp/index.ts | 0 .../useink/src/core}/types/array.ts | 0 .../useink/src/core}/types/contracts.ts | 6 +- .../useink/src/core/types/index.ts | 0 packages/useink/src/core/types/result.ts | 3 + .../useink/src/core}/types/substrate.ts | 0 .../core/types/talisman-connect-wallets.ts | 2 + packages/useink/src/core/types/unsub.ts | 1 + packages/useink/src/index.ts | 1 + .../useink/src/notifications}/README.md | 0 .../useink/src/notifications}/context.ts | 2 +- .../useink/src/notifications/hooks/index.ts | 0 .../notifications}/hooks/useNotifications.ts | 12 +- .../hooks/useTxNotifications.ts | 6 +- .../useink/src/notifications/index.ts | 4 +- .../useink/src/notifications}/model.ts | 2 +- .../useink/src/notifications}/provider.tsx | 40 +- .../useink/src/notifications}/reducer.ts | 0 .../useink/src/notifications}/types.ts | 0 .../useink/src/notifications/utils/index.ts | 0 .../utils/toNotificationLevel.ts | 0 .../useink/src/react}/constants.ts | 0 .../useink/src/react/hooks/config/index.ts | 0 .../src/react}/hooks/config/useChain.ts | 4 +- .../src/react}/hooks/config/useChainRpc.ts | 2 +- .../react}/hooks/config/useChainRpcList.ts | 4 +- .../src/react}/hooks/config/useChains.ts | 4 +- .../src/react}/hooks/config/useConfig.ts | 2 +- .../react}/hooks/config/useDefaultCaller.ts | 13 +- .../useink/src/react/hooks/contracts/index.ts | 0 .../src/react}/hooks/contracts/types.ts | 2 +- .../react}/hooks/contracts/useAbiMessage.ts | 4 +- .../src/react}/hooks/contracts/useCall.ts | 16 +- .../hooks/contracts/useCallSubscription.ts | 4 +- .../src/react}/hooks/contracts/useContract.ts | 8 +- .../src/react}/hooks/contracts/useDryRun.ts | 12 +- .../hooks/contracts/useEventSubscription.ts | 74 + .../src/react}/hooks/contracts/useEvents.ts | 14 +- .../src/react}/hooks/contracts/useTx.ts | 69 +- .../hooks/contracts/useTxPaymentInfo.ts | 58 +- packages/useink/src/react/hooks/index.ts | 4 + .../src/react}/hooks/internal/useInterval.ts | 0 .../src/react}/hooks/internal/useIsMounted.ts | 0 .../useink/src/react/hooks/substrate/index.ts | 0 .../src/react}/hooks/substrate/useApi.ts | 6 +- .../src/react}/hooks/substrate/useBalance.ts | 15 +- .../react}/hooks/substrate/useBlockHeader.ts | 14 +- .../src/react}/hooks/substrate/useTransfer.ts | 12 +- .../useink/src/react/hooks/wallets/index.ts | 0 .../src/react}/hooks/wallets/useAllWallets.ts | 4 +- .../hooks/wallets/useInstalledWallets.ts | 4 +- .../hooks/wallets/useUninstalledWallets.ts | 4 +- .../src/react}/hooks/wallets/useWallet.ts | 4 +- packages/useink/src/react/index.ts | 2 + .../src/react}/providers/UseInkProvider.tsx | 18 +- .../src/react}/providers/api/context.ts | 2 +- .../useink/src/react/providers/api/index.ts | 0 .../useink/src/react/providers/api/model.ts | 13 + .../src/react/providers/api/provider.tsx | 30 + .../src/react}/providers/api/reducer.ts | 2 +- .../react}/providers/blockHeader/context.ts | 2 +- .../src/react/providers/blockHeader/index.ts | 0 .../src/react/providers/blockHeader/model.ts | 11 + .../react}/providers/blockHeader/provider.tsx | 46 +- .../react}/providers/blockHeader/reducer.ts | 2 +- .../src/react}/providers/config/context.ts | 2 +- .../src/react/providers/config/index.ts | 0 .../src/react}/providers/config/model.ts | 4 +- .../src/react}/providers/config/provider.tsx | 36 +- .../src/react}/providers/events/context.ts | 2 +- .../src/react/providers/events/index.ts | 2 +- .../src/react}/providers/events/model.ts | 0 .../src/react}/providers/events/provider.tsx | 35 +- .../src/react}/providers/events/reducer.ts | 0 .../useink/src/react/providers/index.ts | 2 +- .../src/react}/providers/wallet/context.ts | 2 +- .../src/react/providers/wallet/index.ts | 2 +- .../src/react}/providers/wallet/model.ts | 4 +- .../src/react}/providers/wallet/provider.tsx | 142 +- .../useink/src/utils/contracts/index.ts | 0 .../useink/src/utils}/contracts/txUtils.ts | 14 +- .../src/utils}/helpers/getExpiredItem.ts | 5 +- .../useink/src/utils/helpers/index.ts | 0 .../useink/src/utils}/helpers/parseUnits.ts | 2 +- .../src/utils/helpers/pseudoRandomId.ts | 15 + packages/useink/src/utils/index.ts | 7 + .../useink/src/utils/pick/index.ts | 0 .../useink/src/utils}/pick/pickCallInfo.ts | 2 +- .../useink/src/utils}/pick/pickDecoded.ts | 2 +- .../src/utils}/pick/pickDecodedError.ts | 4 +- .../useink/src/utils}/pick/pickError.ts | 2 +- .../useink/src/utils}/pick/pickResultErr.ts | 2 +- .../useink/src/utils}/pick/pickResultOk.ts | 2 +- .../useink/src/utils}/pick/pickTxInfo.ts | 4 +- .../src/utils}/substrate/bnToBalance.ts | 4 +- packages/useink/src/utils/substrate/index.ts | 1 + .../useink/src/utils}/types/common.ts | 0 .../useink/src/utils/types/index.ts | 0 packages/useink/tsconfig.json | 14 + packages/useink/tsup.config.ts | 13 + playground/.gitignore | 36 + playground/contract/Cargo.lock | 4385 +++++++++++++++++ playground/contract/Cargo.toml | 27 + playground/contract/lib.rs | 120 + playground/next.config.js | 8 + playground/package.json | 30 + playground/postcss.config.js | 6 + playground/public/favicon.ico | Bin 0 -> 25931 bytes playground/public/next.svg | 1 + playground/public/thirteen.svg | 1 + playground/public/vercel.svg | 1 + .../Notifications/Notifications.tsx | 23 + .../src/components/Notifications/index.ts | 1 + .../src/components/Snackbar/Snackbar.tsx | 53 + playground/src/components/Snackbar/index.ts | 1 + .../src/components/pg-home/HomePage.tsx | 591 +++ playground/src/components/pg-home/index.ts | 3 + playground/src/metadata/playground.json | 673 +++ playground/src/pages/_app.tsx | 46 + playground/src/pages/_document.tsx | 13 + playground/src/pages/index.tsx | 16 + playground/src/styles/globals.css | 3 + playground/tailwind.config.js | 34 + playground/tsconfig.json | 31 + pnpm-lock.yaml | 4010 +++++++++++++++ pnpm-workspace.yaml | 3 + react/hooks/contracts/useEventSubscription.ts | 77 - react/hooks/mod.ts | 4 - react/mod.ts | 2 - react/providers/api/model.ts | 15 - react/providers/api/provider.tsx | 30 - react/providers/blockHeader/model.ts | 13 - react/providers/temp.test.ts | 5 - rome.json | 34 + utils/helpers/pseudoRandomId.ts | 12 - utils/mod.ts | 7 - utils/substrate/mod.ts | 1 - words.txt | 84 +- 187 files changed, 10959 insertions(+), 880 deletions(-) delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/udd.yml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json delete mode 100644 _tasks/dnt.ts delete mode 100644 _tasks/star.ts delete mode 100644 _tasks/udd.ts delete mode 100644 chains/mod.ts delete mode 100644 core/mod.ts delete mode 100644 core/substrate/mod.ts delete mode 100644 core/types/result.ts delete mode 100644 core/types/talisman-connect-wallets.ts delete mode 100644 core/types/unsub.ts delete mode 100644 deno.jsonc delete mode 100644 deps/dnt.ts delete mode 100644 deps/std/fs.ts delete mode 100644 deps/std/path.ts delete mode 100644 import_map.json delete mode 100644 mod.ts create mode 100644 package.json create mode 100644 packages/useink/package.json rename {chains => packages/useink/src/chains}/data/chaindata.ts (100%) rename chains/data/mod.ts => packages/useink/src/chains/data/index.ts (100%) rename {chains => packages/useink/src/chains}/data/testnet-chaindata.ts (97%) rename {chains => packages/useink/src/chains}/data/types.ts (100%) create mode 100644 packages/useink/src/chains/index.ts rename {chains => packages/useink/src/chains}/types.ts (100%) rename {core => packages/useink/src/core}/contracts/call.ts (94%) rename {core => packages/useink/src/core}/contracts/decodeCallResult.ts (95%) rename {core => packages/useink/src/core}/contracts/decodeError.ts (80%) rename {core => packages/useink/src/core}/contracts/getRegistryError.ts (80%) rename core/contracts/mod.ts => packages/useink/src/core/contracts/index.ts (100%) rename {core => packages/useink/src/core}/contracts/toContractAbiMessage.ts (65%) rename {core => packages/useink/src/core}/contracts/toRegistryErrorDecoded.ts (93%) rename {core => packages/useink/src/core}/contracts/txPaymentInfo.ts (86%) rename {core => packages/useink/src/core}/contracts/types.ts (58%) create mode 100644 packages/useink/src/core/index.ts rename {core => packages/useink/src/core}/substrate/balances/getBalance.ts (91%) rename core/substrate/balances/mod.ts => packages/useink/src/core/substrate/balances/index.ts (98%) rename {core => packages/useink/src/core}/substrate/balances/transfer.ts (79%) create mode 100644 packages/useink/src/core/substrate/index.ts rename {core => packages/useink/src/core}/substrate/timestamp/getTimestamp.ts (65%) rename {core => packages/useink/src/core}/substrate/timestamp/getTimestampNow.ts (82%) rename core/substrate/timestamp/mod.ts => packages/useink/src/core/substrate/timestamp/index.ts (100%) rename {core => packages/useink/src/core}/types/array.ts (100%) rename {core => packages/useink/src/core}/types/contracts.ts (94%) rename core/types/mod.ts => packages/useink/src/core/types/index.ts (100%) create mode 100644 packages/useink/src/core/types/result.ts rename {core => packages/useink/src/core}/types/substrate.ts (100%) create mode 100644 packages/useink/src/core/types/talisman-connect-wallets.ts create mode 100644 packages/useink/src/core/types/unsub.ts create mode 100644 packages/useink/src/index.ts rename {notifications => packages/useink/src/notifications}/README.md (100%) rename {notifications => packages/useink/src/notifications}/context.ts (100%) rename notifications/hooks/mod.ts => packages/useink/src/notifications/hooks/index.ts (100%) rename {notifications => packages/useink/src/notifications}/hooks/useNotifications.ts (91%) rename {notifications => packages/useink/src/notifications}/hooks/useTxNotifications.ts (93%) rename notifications/mod.ts => packages/useink/src/notifications/index.ts (64%) rename {notifications => packages/useink/src/notifications}/model.ts (96%) rename {notifications => packages/useink/src/notifications}/provider.tsx (57%) rename {notifications => packages/useink/src/notifications}/reducer.ts (100%) rename {notifications => packages/useink/src/notifications}/types.ts (100%) rename notifications/utils/mod.ts => packages/useink/src/notifications/utils/index.ts (100%) rename {notifications => packages/useink/src/notifications}/utils/toNotificationLevel.ts (100%) rename {react => packages/useink/src/react}/constants.ts (100%) rename react/hooks/config/mod.ts => packages/useink/src/react/hooks/config/index.ts (100%) rename {react => packages/useink/src/react}/hooks/config/useChain.ts (84%) rename {react => packages/useink/src/react}/hooks/config/useChainRpc.ts (87%) rename {react => packages/useink/src/react}/hooks/config/useChainRpcList.ts (78%) rename {react => packages/useink/src/react}/hooks/config/useChains.ts (53%) rename {react => packages/useink/src/react}/hooks/config/useConfig.ts (100%) rename {react => packages/useink/src/react}/hooks/config/useDefaultCaller.ts (61%) rename react/hooks/contracts/mod.ts => packages/useink/src/react/hooks/contracts/index.ts (100%) rename {react => packages/useink/src/react}/hooks/contracts/types.ts (96%) rename {react => packages/useink/src/react}/hooks/contracts/useAbiMessage.ts (93%) rename {react => packages/useink/src/react}/hooks/contracts/useCall.ts (85%) rename {react => packages/useink/src/react}/hooks/contracts/useCallSubscription.ts (100%) rename {react => packages/useink/src/react}/hooks/contracts/useContract.ts (83%) rename {react => packages/useink/src/react}/hooks/contracts/useDryRun.ts (92%) create mode 100644 packages/useink/src/react/hooks/contracts/useEventSubscription.ts rename {react => packages/useink/src/react}/hooks/contracts/useEvents.ts (67%) rename {react => packages/useink/src/react}/hooks/contracts/useTx.ts (58%) rename {react => packages/useink/src/react}/hooks/contracts/useTxPaymentInfo.ts (51%) create mode 100644 packages/useink/src/react/hooks/index.ts rename {react => packages/useink/src/react}/hooks/internal/useInterval.ts (100%) rename {react => packages/useink/src/react}/hooks/internal/useIsMounted.ts (100%) rename react/hooks/substrate/mod.ts => packages/useink/src/react/hooks/substrate/index.ts (100%) rename {react => packages/useink/src/react}/hooks/substrate/useApi.ts (58%) rename {react => packages/useink/src/react}/hooks/substrate/useBalance.ts (74%) rename {react => packages/useink/src/react}/hooks/substrate/useBlockHeader.ts (53%) rename {react => packages/useink/src/react}/hooks/substrate/useTransfer.ts (83%) rename react/hooks/wallets/mod.ts => packages/useink/src/react/hooks/wallets/index.ts (100%) rename {react => packages/useink/src/react}/hooks/wallets/useAllWallets.ts (63%) rename {react => packages/useink/src/react}/hooks/wallets/useInstalledWallets.ts (67%) rename {react => packages/useink/src/react}/hooks/wallets/useUninstalledWallets.ts (81%) rename {react => packages/useink/src/react}/hooks/wallets/useWallet.ts (71%) create mode 100644 packages/useink/src/react/index.ts rename {react => packages/useink/src/react}/providers/UseInkProvider.tsx (54%) rename {react => packages/useink/src/react}/providers/api/context.ts (100%) rename react/providers/api/mod.ts => packages/useink/src/react/providers/api/index.ts (100%) create mode 100644 packages/useink/src/react/providers/api/model.ts create mode 100644 packages/useink/src/react/providers/api/provider.tsx rename {react => packages/useink/src/react}/providers/api/reducer.ts (89%) rename {react => packages/useink/src/react}/providers/blockHeader/context.ts (100%) rename react/providers/blockHeader/mod.ts => packages/useink/src/react/providers/blockHeader/index.ts (100%) create mode 100644 packages/useink/src/react/providers/blockHeader/model.ts rename {react => packages/useink/src/react}/providers/blockHeader/provider.tsx (60%) rename {react => packages/useink/src/react}/providers/blockHeader/reducer.ts (90%) rename {react => packages/useink/src/react}/providers/config/context.ts (100%) rename react/providers/config/mod.ts => packages/useink/src/react/providers/config/index.ts (100%) rename {react => packages/useink/src/react}/providers/config/model.ts (93%) rename {react => packages/useink/src/react}/providers/config/provider.tsx (62%) rename {react => packages/useink/src/react}/providers/events/context.ts (100%) rename react/providers/events/mod.ts => packages/useink/src/react/providers/events/index.ts (64%) rename {react => packages/useink/src/react}/providers/events/model.ts (100%) rename {react => packages/useink/src/react}/providers/events/provider.tsx (60%) rename {react => packages/useink/src/react}/providers/events/reducer.ts (100%) rename react/providers/mod.ts => packages/useink/src/react/providers/index.ts (55%) rename {react => packages/useink/src/react}/providers/wallet/context.ts (67%) rename react/providers/wallet/mod.ts => packages/useink/src/react/providers/wallet/index.ts (64%) rename {react => packages/useink/src/react}/providers/wallet/model.ts (97%) rename {react => packages/useink/src/react}/providers/wallet/provider.tsx (54%) rename utils/contracts/mod.ts => packages/useink/src/utils/contracts/index.ts (100%) rename {utils => packages/useink/src/utils}/contracts/txUtils.ts (84%) rename {utils => packages/useink/src/utils}/helpers/getExpiredItem.ts (73%) rename utils/helpers/mod.ts => packages/useink/src/utils/helpers/index.ts (100%) rename {utils => packages/useink/src/utils}/helpers/parseUnits.ts (80%) create mode 100644 packages/useink/src/utils/helpers/pseudoRandomId.ts create mode 100644 packages/useink/src/utils/index.ts rename utils/pick/mod.ts => packages/useink/src/utils/pick/index.ts (100%) rename {utils => packages/useink/src/utils}/pick/pickCallInfo.ts (84%) rename {utils => packages/useink/src/utils}/pick/pickDecoded.ts (82%) rename {utils => packages/useink/src/utils}/pick/pickDecodedError.ts (95%) rename {utils => packages/useink/src/utils}/pick/pickError.ts (97%) rename {utils => packages/useink/src/utils}/pick/pickResultErr.ts (83%) rename {utils => packages/useink/src/utils}/pick/pickResultOk.ts (83%) rename {utils => packages/useink/src/utils}/pick/pickTxInfo.ts (75%) rename {utils => packages/useink/src/utils}/substrate/bnToBalance.ts (66%) create mode 100644 packages/useink/src/utils/substrate/index.ts rename {utils => packages/useink/src/utils}/types/common.ts (100%) rename utils/types/mod.ts => packages/useink/src/utils/types/index.ts (100%) create mode 100644 packages/useink/tsconfig.json create mode 100644 packages/useink/tsup.config.ts create mode 100644 playground/.gitignore create mode 100644 playground/contract/Cargo.lock create mode 100755 playground/contract/Cargo.toml create mode 100755 playground/contract/lib.rs create mode 100644 playground/next.config.js create mode 100644 playground/package.json create mode 100644 playground/postcss.config.js create mode 100644 playground/public/favicon.ico create mode 100644 playground/public/next.svg create mode 100644 playground/public/thirteen.svg create mode 100644 playground/public/vercel.svg create mode 100644 playground/src/components/Notifications/Notifications.tsx create mode 100644 playground/src/components/Notifications/index.ts create mode 100644 playground/src/components/Snackbar/Snackbar.tsx create mode 100644 playground/src/components/Snackbar/index.ts create mode 100644 playground/src/components/pg-home/HomePage.tsx create mode 100644 playground/src/components/pg-home/index.ts create mode 100644 playground/src/metadata/playground.json create mode 100644 playground/src/pages/_app.tsx create mode 100644 playground/src/pages/_document.tsx create mode 100644 playground/src/pages/index.tsx create mode 100644 playground/src/styles/globals.css create mode 100644 playground/tailwind.config.js create mode 100644 playground/tsconfig.json create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml delete mode 100644 react/hooks/contracts/useEventSubscription.ts delete mode 100644 react/hooks/mod.ts delete mode 100644 react/mod.ts delete mode 100644 react/providers/api/model.ts delete mode 100644 react/providers/api/provider.tsx delete mode 100644 react/providers/blockHeader/model.ts delete mode 100644 react/providers/temp.test.ts create mode 100644 rome.json delete mode 100644 utils/helpers/pseudoRandomId.ts delete mode 100644 utils/mod.ts delete mode 100644 utils/substrate/mod.ts diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index daafcff..94aee9d 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -7,7 +7,7 @@ labels: bug ## Bug Report - + ### Current Behavior @@ -32,7 +32,6 @@ Example: