From 6d1b5d5956ffa65492d3e7809911ee6612864ead Mon Sep 17 00:00:00 2001 From: Mahdi Date: Thu, 2 Jan 2020 13:43:34 +0800 Subject: [PATCH] Rename refactor all package name prefix from `deriv-` to `@deriv/` --- .circleci/config.yml | 20 +++++------ README.md | 6 ++-- docs/Modules/README.md | 2 +- docs/README.md | 8 ++--- package.json | 28 +++++++-------- packages/bot/.eslintrc.js | 4 +-- packages/bot/package-lock.json | 14 ++++---- packages/bot/package.json | 8 ++--- packages/bot/src/assets/sass/app.scss | 2 +- packages/bot/src/components/contract-card.jsx | 6 ++-- .../components/contract-result-overlay.jsx | 4 +-- packages/bot/src/components/dialog.jsx | 4 +-- .../bot/src/components/flyout-block-group.jsx | 4 +-- packages/bot/src/components/flyout.jsx | 4 +-- .../bot/src/components/footer-extension.jsx | 2 +- .../bot/src/components/icon-trade-types.jsx | 2 +- packages/bot/src/components/journal.jsx | 4 +-- .../bot/src/components/quick-strategy.jsx | 8 ++--- packages/bot/src/components/run-panel.jsx | 6 ++-- .../bot/src/components/saveload-modal.jsx | 4 +-- packages/bot/src/components/summary.jsx | 4 +-- packages/bot/src/components/toolbar.jsx | 4 +-- packages/bot/src/components/transaction.jsx | 4 +-- packages/bot/src/components/transactions.jsx | 6 ++-- packages/bot/src/constants/contract-stage.js | 2 +- packages/bot/src/constants/index.js | 2 +- .../bot/src/scratch/backward-compatibility.js | 30 ++++++++-------- .../Functions/procedures_callnoreturn.js | 2 +- .../Functions/procedures_callreturn.js | 2 +- .../Functions/procedures_defnoreturn.js | 4 +-- .../Functions/procedures_defreturn.js | 2 +- .../Advanced/Functions/procedures_ifreturn.js | 2 +- .../blocks/Advanced/List/lists_create_with.js | 2 +- .../blocks/Advanced/List/lists_getIndex.js | 2 +- .../blocks/Advanced/List/lists_getSublist.js | 2 +- .../blocks/Advanced/List/lists_indexOf.js | 2 +- .../blocks/Advanced/List/lists_isEmpty.js | 2 +- .../blocks/Advanced/List/lists_length.js | 2 +- .../blocks/Advanced/List/lists_repeat.js | 2 +- .../blocks/Advanced/List/lists_setIndex.js | 2 +- .../blocks/Advanced/List/lists_sort.js | 2 +- .../blocks/Advanced/List/lists_split.js | 2 +- .../blocks/Advanced/List/lists_statement.js | 4 +-- .../Loops/controls_flow_statements.js | 2 +- .../blocks/Advanced/Loops/controls_for.js | 2 +- .../blocks/Advanced/Loops/controls_forEach.js | 2 +- .../blocks/Advanced/Loops/controls_repeat.js | 2 +- .../Advanced/Loops/controls_repeat_ext.js | 2 +- .../Advanced/Loops/controls_whileUntil.js | 2 +- .../blocks/Advanced/Variable/variables_get.js | 2 +- .../blocks/Advanced/Variable/variables_set.js | 2 +- .../Binary/After Purchase/after_purchase.js | 4 +-- .../Binary/After Purchase/check_result.js | 2 +- .../Binary/After Purchase/read_details.js | 2 +- .../Binary/After Purchase/trade_again.js | 2 +- .../Binary/Before Purchase/ask_price.js | 2 +- .../Binary/Before Purchase/before_purchase.js | 2 +- .../blocks/Binary/Before Purchase/payout.js | 2 +- .../blocks/Binary/Before Purchase/purchase.js | 4 +-- .../Binary/During Purchase/check_sell.js | 2 +- .../Binary/During Purchase/during_purchase.js | 2 +- .../Binary/During Purchase/sell_at_market.js | 2 +- .../Binary/During Purchase/sell_price.js | 2 +- .../Indicators/Parts/fast_ema_period.js | 2 +- .../Binary/Indicators/Parts/input_list.js | 4 +-- .../blocks/Binary/Indicators/Parts/period.js | 2 +- .../Indicators/Parts/signal_ema_period.js | 2 +- .../Indicators/Parts/slow_ema_period.js | 2 +- .../Parts/std_dev_multiplier_down.js | 2 +- .../Indicators/Parts/std_dev_multiplier_up.js | 2 +- .../blocks/Binary/Indicators/bb_statement.js | 2 +- .../blocks/Binary/Indicators/bba_statement.js | 2 +- .../blocks/Binary/Indicators/ema_statement.js | 2 +- .../Binary/Indicators/emaa_statement.js | 2 +- .../Binary/Indicators/macda_statement.js | 4 +-- .../blocks/Binary/Indicators/rsi_statement.js | 2 +- .../Binary/Indicators/rsia_statement.js | 4 +-- .../blocks/Binary/Indicators/sma_statement.js | 2 +- .../Binary/Indicators/smaa_statement.js | 4 +-- .../Binary/Tick Analysis/check_direction.js | 2 +- .../blocks/Binary/Tick Analysis/get_ohlc.js | 2 +- .../Binary/Tick Analysis/lastDigitList.js | 2 +- .../blocks/Binary/Tick Analysis/last_digit.js | 2 +- .../blocks/Binary/Tick Analysis/ohlc.js | 2 +- .../Binary/Tick Analysis/ohlc_values.js | 2 +- .../blocks/Binary/Tick Analysis/readOhlc.js | 2 +- .../blocks/Binary/Tick Analysis/tick.js | 2 +- .../Binary/Tick Analysis/tick_analysis.js | 2 +- .../blocks/Binary/Tick Analysis/ticks.js | 2 +- .../Binary/Tools/Candle/is_candle_black.js | 2 +- .../Tools/Candle/ohlc_values_in_list.js | 2 +- .../Binary/Tools/Candle/read_ohlc_obj.js | 2 +- .../blocks/Binary/Tools/Misc./balance.js | 2 +- .../Binary/Tools/Misc./barrier_offset.js | 2 +- .../blocks/Binary/Tools/Misc./block_holder.js | 2 +- .../blocks/Binary/Tools/Misc./loader.js | 2 +- .../blocks/Binary/Tools/Misc./notify.js | 2 +- .../Binary/Tools/Misc./notify_telegram.js | 2 +- .../blocks/Binary/Tools/Misc./total_profit.js | 2 +- .../blocks/Binary/Tools/Misc./total_runs.js | 2 +- .../Binary/Tools/Misc./useless_block.js | 2 +- .../scratch/blocks/Binary/Tools/Time/epoch.js | 2 +- .../blocks/Binary/Tools/Time/timeout.js | 2 +- .../blocks/Binary/Tools/Time/todatetime.js | 2 +- .../blocks/Binary/Tools/Time/totimestamp.js | 2 +- .../Trade Definition/trade_definition.js | 6 ++-- .../trade_definition_contracttype.js | 4 +-- .../trade_definition_restartbuysell.js | 2 +- .../trade_definition_restartonerror.js | 4 +-- .../trade_definition_tradeoptions.js | 12 +++---- .../trade_definition_tradetype.js | 4 +-- .../src/scratch/blocks/Logic/controls_if.js | 2 +- .../src/scratch/blocks/Logic/logic_boolean.js | 2 +- .../src/scratch/blocks/Logic/logic_compare.js | 2 +- .../src/scratch/blocks/Logic/logic_negate.js | 2 +- .../src/scratch/blocks/Logic/logic_null.js | 2 +- .../scratch/blocks/Logic/logic_operation.js | 2 +- .../src/scratch/blocks/Logic/logic_ternary.js | 2 +- .../scratch/blocks/Math/math_arithmetic.js | 2 +- .../src/scratch/blocks/Math/math_change.js | 2 +- .../src/scratch/blocks/Math/math_constant.js | 2 +- .../src/scratch/blocks/Math/math_constrain.js | 2 +- .../src/scratch/blocks/Math/math_modulo.js | 2 +- .../src/scratch/blocks/Math/math_number.js | 2 +- .../blocks/Math/math_number_positive.js | 2 +- .../blocks/Math/math_number_property.js | 2 +- .../src/scratch/blocks/Math/math_on_list.js | 2 +- .../scratch/blocks/Math/math_random_float.js | 2 +- .../scratch/blocks/Math/math_random_int.js | 2 +- .../bot/src/scratch/blocks/Math/math_round.js | 2 +- .../src/scratch/blocks/Math/math_single.js | 2 +- .../bot/src/scratch/blocks/Math/math_trig.js | 2 +- packages/bot/src/scratch/blocks/Text/text.js | 2 +- .../src/scratch/blocks/Text/text_append.js | 2 +- .../scratch/blocks/Text/text_changeCase.js | 2 +- .../src/scratch/blocks/Text/text_charAt.js | 2 +- .../scratch/blocks/Text/text_getSubstring.js | 2 +- .../src/scratch/blocks/Text/text_indexOf.js | 2 +- .../src/scratch/blocks/Text/text_isEmpty.js | 2 +- .../bot/src/scratch/blocks/Text/text_join.js | 2 +- .../src/scratch/blocks/Text/text_length.js | 2 +- .../bot/src/scratch/blocks/Text/text_print.js | 2 +- .../scratch/blocks/Text/text_prompt_ext.js | 2 +- .../src/scratch/blocks/Text/text_statement.js | 2 +- .../bot/src/scratch/blocks/Text/text_trim.js | 2 +- .../scratch/help-content/flyout-help-base.jsx | 4 +-- .../help-components/flyout-text.jsx | 2 +- .../help-strings/after_purchase.js | 2 +- .../help-content/help-strings/balance.js | 2 +- .../help-strings/before_purchase.js | 2 +- .../help-strings/check_direction.js | 2 +- .../help-strings/contract_check_result.js | 2 +- .../help-strings/controls_flow_statements.js | 2 +- .../help-content/help-strings/controls_for.js | 2 +- .../help-strings/controls_forEach.js | 2 +- .../help-content/help-strings/controls_if.js | 2 +- .../help-strings/controls_whileUntil.js | 2 +- .../help-strings/during_purchase.js | 2 +- .../help-content/help-strings/epoch.js | 2 +- .../help-content/help-strings/get_ohlc.js | 2 +- .../help-strings/is_candle_black.js | 2 +- .../help-content/help-strings/last_digit.js | 2 +- .../help-strings/logic_operation.js | 2 +- .../help-strings/math_arithmetic.js | 2 +- .../help-strings/math_constrain.js | 2 +- .../help-content/help-strings/math_single.js | 2 +- .../help-strings/notify_telegram.js | 2 +- .../scratch/help-content/help-strings/ohlc.js | 2 +- .../help-content/help-strings/ohlc_values.js | 2 +- .../help-strings/ohlc_values_in_list.js | 2 +- .../help-strings/procedures_ifreturn.js | 2 +- .../help-content/help-strings/read_details.js | 2 +- .../help-content/help-strings/read_ohlc.js | 2 +- .../help-strings/read_ohlc_obj.js | 2 +- .../help-strings/sell_at_market.js | 2 +- .../help-content/help-strings/sell_price.js | 2 +- .../help-strings/sma_statement.js | 2 +- .../help-content/help-strings/text_print.js | 2 +- .../help-strings/text_prompt_ext.js | 2 +- .../help-strings/tick_analysis.js | 2 +- .../help-content/help-strings/todatetime.js | 2 +- .../help-content/help-strings/totimestamp.js | 2 +- .../help-content/help-strings/trade_again.js | 2 +- .../help-strings/trade_definition.js | 2 +- .../trade_definition_tradeoptions.js | 2 +- .../help-strings/variables_set.js | 2 +- .../hooks/block_render_svg_vertical.js | 10 +++--- packages/bot/src/scratch/hooks/block_svg.js | 16 ++++----- packages/bot/src/scratch/hooks/connection.js | 2 +- packages/bot/src/scratch/hooks/constant.js | 2 +- packages/bot/src/scratch/hooks/contextmenu.js | 2 +- .../bot/src/scratch/hooks/data_category.js | 6 ++-- packages/bot/src/scratch/hooks/field.js | 8 ++--- packages/bot/src/scratch/hooks/field_image.js | 2 +- packages/bot/src/scratch/hooks/procedures.js | 8 ++--- packages/bot/src/scratch/hooks/toolbox.js | 36 +++++++++---------- packages/bot/src/scratch/hooks/trashcan.js | 2 +- packages/bot/src/scratch/hooks/variables.js | 2 +- .../bot/src/scratch/hooks/workspace_svg.js | 8 ++--- packages/bot/src/scratch/index.js | 2 +- packages/bot/src/scratch/utils/index.js | 14 ++++---- packages/bot/src/services/api/appId.js | 2 +- .../tradeEngine/Interface/MiscInterface.js | 2 +- .../src/services/tradeEngine/trade/Balance.js | 2 +- .../tradeEngine/trade/OpenContract.js | 2 +- .../services/tradeEngine/trade/Proposal.js | 2 +- .../services/tradeEngine/trade/Purchase.js | 2 +- .../src/services/tradeEngine/trade/Sell.js | 2 +- .../src/services/tradeEngine/trade/Ticks.js | 2 +- .../src/services/tradeEngine/trade/Total.js | 4 +-- .../src/services/tradeEngine/trade/index.js | 2 +- .../src/services/tradeEngine/utils/helpers.js | 4 +-- .../services/tradeEngine/utils/sanitize.js | 2 +- packages/bot/src/stores/google-drive-store.js | 8 ++--- packages/bot/src/stores/journal-store.js | 6 ++-- .../bot/src/stores/quick-strategy-store.js | 16 ++++----- packages/bot/src/stores/run-panel-store.js | 8 ++--- packages/bot/src/stores/toolbar-store.js | 8 ++--- packages/bot/src/stores/transactions-store.js | 2 +- packages/bot/src/utils/contract.js | 2 +- .../bot/src/utils/integrations/googleDrive.js | 8 ++--- packages/bot/src/utils/lang/i18n.js | 2 +- packages/bot/src/utils/lang/lang.js | 2 +- .../utils/notifications/bot-notifications.js | 2 +- packages/bot/src/utils/tools.js | 2 +- packages/bot/webpack.config.js | 18 +++++----- packages/components/.eslintrc.js | 2 +- .../components/.storybook/scss-loader.scss | 8 ++--- .../components/.storybook/webpack.config.js | 4 +-- packages/components/README.md | 8 ++--- packages/components/package-lock.json | 4 +-- packages/components/package.json | 4 +-- .../components/src/components/money/money.jsx | 2 +- packages/components/stories/icon/README.md | 4 +-- packages/components/webpack.config.js | 8 ++--- packages/core/.eslintrc.js | 2 +- packages/core/build/config.js | 22 ++++++------ packages/core/build/constants.js | 6 ++-- packages/core/build/loaders-config.js | 4 +-- packages/core/package-lock.json | 2 +- packages/core/package.json | 12 +++---- .../Elements/Calendar/calendar-header.jsx | 2 +- .../Calendar/panels/calendar-days.jsx | 4 +-- .../Elements/Drawer/drawer-header.jsx | 4 +-- .../Elements/Errors/error-component.jsx | 2 +- .../denial-of-service.jsx | 4 +-- .../market-unavailable.jsx | 4 +-- .../Modals/ServicesErrorModal/constants.js | 2 +- .../services-error-modal.jsx | 4 +-- .../unsupported-contract-modal.jsx | 4 +-- .../notification-status-icons.jsx | 2 +- .../NotificationMessage/notification.jsx | 4 +-- .../__tests__/empty-notification.spec.js | 2 +- .../Notifications/empty-notification.jsx | 4 +-- .../Notifications/notification-bar.jsx | 2 +- .../vertical-tab-content-container.jsx | 2 +- .../VerticalTabs/vertical-tab-header.jsx | 2 +- .../App/Components/Elements/login-prompt.jsx | 2 +- .../Footer/__tests__/network-status.spec.js | 2 +- .../__tests__/toggle-fullscreen.spec.js | 2 +- .../Footer/__tests__/toggle-positions.spec.js | 2 +- .../Footer/__tests__/toggle-settings.spec.js | 4 +-- .../Layout/Footer/network-status.jsx | 4 +-- .../Layout/Footer/toggle-fullscreen.jsx | 2 +- .../Layout/Footer/toggle-positions.jsx | 2 +- .../Layout/Footer/toggle-settings.jsx | 4 +-- .../Header/__tests__/account-info.spec.js | 2 +- .../Header/__tests__/login-button.spec.js | 2 +- .../Layout/Header/account-actions.jsx | 6 ++-- .../Components/Layout/Header/account-info.jsx | 4 +-- .../Components/Layout/Header/login-button.jsx | 4 +-- .../Layout/Header/platform-dropdown.jsx | 2 +- .../Layout/Header/platform-switcher.jsx | 4 +-- .../Layout/Header/signup-button.jsx | 4 +-- .../Layout/Header/toggle-menu-drawer.jsx | 2 +- .../Layout/Header/toggle-notifications.jsx | 2 +- .../Layout/Header/upgrade-button.jsx | 4 +-- .../Routes/route-with-sub-routes.jsx | 2 +- .../core/src/App/Constants/header-links.js | 4 +-- .../core/src/App/Constants/platform-config.js | 2 +- .../core/src/App/Constants/routes-config.js | 6 ++-- .../account-signup-modal.jsx | 4 +-- .../account-switcher-account-list.jsx | 6 ++-- .../account-switcher-account-wrapper.jsx | 2 +- .../account-switcher-add-account-button.jsx | 2 +- .../AccountSwitcher/account-switcher.jsx | 6 ++-- .../src/App/Containers/Drawer/menu-drawer.jsx | 4 +-- .../App/Containers/Layout/app-contents.jsx | 2 +- .../App/Containers/Modals/success-dialog.jsx | 4 +-- .../notifications-dialog.jsx | 6 ++-- .../RealAccountSignup/account-wizard.jsx | 2 +- .../RealAccountSignup/add-crypto-currency.jsx | 2 +- .../add-or-manage-accounts.jsx | 4 +-- .../RealAccountSignup/address-details.jsx | 4 +-- .../change-account-currency.jsx | 2 +- .../RealAccountSignup/checkbox-field.jsx | 2 +- .../RealAccountSignup/currency-selector.jsx | 4 +-- .../finished-set-currency.jsx | 4 +-- .../RealAccountSignup/form-submit-button.jsx | 2 +- .../RealAccountSignup/personal-details.jsx | 4 +-- .../RealAccountSignup/real-account-signup.jsx | 4 +-- .../RealAccountSignup/terms-of-use.jsx | 4 +-- .../RealAccountSignup/upgrade-button.jsx | 2 +- .../reset-password-modal.jsx | 4 +-- .../set-currency-modal.jsx | 4 +-- .../SetResidenceModal/set-residence-form.jsx | 4 +-- .../SetResidenceModal/set-residence-modal.jsx | 4 +-- .../SettingsModal/settings-chart.jsx | 4 +-- .../SettingsModal/settings-language.jsx | 4 +-- .../SettingsModal/settings-purchase.jsx | 6 ++-- .../SettingsModal/settings-theme.jsx | 2 +- packages/core/src/App/Containers/Wip/wip.jsx | 4 +-- packages/core/src/App/app.jsx | 2 +- packages/core/src/Constants/contract.js | 2 +- packages/core/src/Constants/date-time.js | 2 +- .../Cashier/Components/Email/email-sent.jsx | 4 +-- .../Cashier/Components/Email/send-email.jsx | 4 +-- .../Error/account-transfer-no-account.jsx | 4 +-- .../Cashier/Components/Error/error.jsx | 4 +-- .../Cashier/Components/Error/no-balance.jsx | 4 +-- .../Cashier/Components/Error/virtual.jsx | 4 +-- .../Components/Form/account-transfer-form.jsx | 6 ++-- .../Form/payment-agent-transfer-form.jsx | 6 ++-- .../Form/payment-agent-withdraw-form.jsx | 6 ++-- .../Receipt/account-transfer-receipt.jsx | 4 +-- .../Receipt/payment-agent-receipt.jsx | 4 +-- .../payment-agent-transfer-receipt.jsx | 6 ++-- .../Cashier/Components/cashier-container.jsx | 2 +- .../Components/payment-agent-details.jsx | 2 +- .../Cashier/Components/payment-agent-list.jsx | 4 +-- .../Modules/Cashier/Containers/cashier.jsx | 2 +- .../Cashier/Containers/p2p-cashier.jsx | 2 +- .../Modules/Page404/Components/Page404.jsx | 2 +- .../core/src/Modules/PageError/PageError.jsx | 2 +- .../Reports/Containers/wallet-information.jsx | 4 +-- .../core/src/Services/outdated-browser.js | 2 +- packages/core/src/Services/socket-general.js | 4 +-- .../Stores/Helpers/client-notifications.js | 4 +-- packages/core/src/Stores/Helpers/client.js | 2 +- .../Stores/Modules/Cashier/cashier-store.js | 6 ++-- .../Modules/Trading/Helpers/active-symbols.js | 2 +- .../Modules/Trading/Helpers/currency.js | 4 +-- packages/core/src/Stores/base-store.js | 2 +- packages/core/src/Stores/client-store.js | 6 ++-- packages/core/src/Stores/gtm-store.js | 4 +-- packages/core/src/Stores/segment-store.js | 2 +- packages/core/src/Stores/ui-store.js | 2 +- packages/core/src/Utils/Date/date-time.js | 2 +- packages/core/src/Utils/Language/language.js | 2 +- .../Validator/declarative-validation-rules.js | 6 ++-- .../src/_common/base/__tests__/client_base.js | 2 +- .../_common/base/__tests__/currency_base.js | 2 +- packages/core/src/_common/base/client_base.js | 6 ++-- .../core/src/_common/base/currency_base.js | 2 +- packages/core/src/_common/base/login.js | 4 +-- .../src/_common/base/network_monitor_base.js | 2 +- packages/core/src/_common/base/socket_base.js | 4 +-- .../core/src/_common/base/socket_cache.js | 2 +- packages/core/src/_common/language.js | 2 +- .../core/src/_common/lib/push_notification.js | 2 +- packages/core/src/_common/os_detect.js | 2 +- packages/core/src/_common/storage.js | 2 +- packages/core/src/_common/url.js | 2 +- packages/core/src/sass/app.scss | 8 ++--- packages/p2p/.eslintrc.js | 2 +- packages/p2p/package-lock.json | 10 +++--- packages/p2p/package.json | 6 ++-- packages/p2p/src/components/app.jsx | 2 +- packages/p2p/src/components/app.scss | 4 +-- .../components/buy-sell/buy-sell-table.jsx | 2 +- .../p2p/src/components/buy-sell/buy-sell.jsx | 2 +- .../p2p/src/components/buy-sell/buy-table.jsx | 2 +- .../p2p/src/components/buy-sell/popup.jsx | 4 +-- packages/p2p/src/components/buy-sell/row.jsx | 2 +- .../src/components/buy-sell/sell-table.jsx | 2 +- .../p2p/src/components/my-ads/form-ads.jsx | 2 +- .../src/components/my-ads/my-ads-table.jsx | 2 +- packages/p2p/src/components/my-ads/my-ads.jsx | 2 +- .../p2p/src/components/my-ads/toggle-ads.jsx | 2 +- .../order-details/order-actions-block.jsx | 2 +- .../orders/order-details/order-details.jsx | 2 +- .../order-table/order-table-buy-row.jsx | 2 +- .../order-table/order-table-sell-row.jsx | 2 +- .../orders/order-table/order-table.jsx | 2 +- packages/p2p/src/components/orders/popup.jsx | 4 +-- packages/p2p/src/utils/websocket.js | 4 +-- packages/p2p/webpack.config.js | 10 +++--- packages/shared/README.md | 10 +++--- packages/shared/package-lock.json | 2 +- packages/shared/package.json | 2 +- .../src/loaders/deriv-components-loader.js | 14 ++++---- packages/shared/webpack.config.js | 6 ++-- packages/trader/.eslintrc.js | 2 +- packages/trader/build/loaders-config.js | 4 +-- packages/trader/build/webpack.config.js | 10 +++--- packages/trader/package-lock.json | 12 +++---- packages/trader/package.json | 8 ++--- .../Elements/Calendar/calendar-footer.jsx | 4 +-- .../Elements/Calendar/calendar-header.jsx | 2 +- .../Components/Elements/Calendar/calendar.jsx | 2 +- .../Calendar/panels/calendar-days.jsx | 4 +-- .../Elements/ContractAudit/contract-audit.jsx | 4 +-- .../ContractDrawer/contract-drawer.jsx | 4 +-- .../Elements/DataTable/data-table.jsx | 2 +- .../Elements/DataTable/table-row-info.jsx | 2 +- .../Elements/Drawer/drawer-header.jsx | 4 +-- .../Elements/Errors/error-component.jsx | 2 +- .../market-unavailable.jsx | 4 +-- .../authorization-required-modal.jsx | 4 +-- .../Modals/ServicesErrorModal/constants.js | 2 +- .../insufficient-balance-modal.jsx | 4 +-- .../services-error-modal.jsx | 4 +-- .../unsupported-contract-modal.jsx | 4 +-- .../positions-progress-ticks.jsx | 2 +- .../helpers/positions-helper.js | 2 +- .../PositionsDrawer/positions-drawer-card.jsx | 6 ++-- .../PositionsDrawer/positions-drawer.jsx | 4 +-- .../PositionsDrawer/result-overlay.jsx | 4 +-- .../Elements/SideMenu/side-menu-headers.jsx | 2 +- .../__tests__/toggle-button.spec.js | 4 +-- .../Elements/ToggleButton/toggle-button.jsx | 2 +- .../vertical-tab-content-container.jsx | 2 +- .../VerticalTabs/vertical-tab-header.jsx | 2 +- .../Elements/__tests__/money.spec.js | 2 +- .../App/Components/Elements/login-prompt.jsx | 2 +- .../Elements/market-is-closed-overlay.jsx | 4 +-- .../src/App/Components/Elements/tooltip.jsx | 2 +- .../ButtonToggleMenu/button-highlight.jsx | 2 +- .../ButtonToggleMenu/button-toggle-menu.jsx | 2 +- .../CompositeCalendar/composite-calendar.jsx | 4 +-- .../Form/DateOfBirth/date-of-birth-picker.jsx | 2 +- .../Form/DatePicker/date-picker.jsx | 4 +-- .../App/Components/Form/DatePicker/helpers.js | 2 +- .../Form/InputField/increment-buttons.jsx | 2 +- .../Form/InputField/input-field.jsx | 2 +- .../Form/RangeSlider/range-slider.jsx | 2 +- .../App/Components/Form/TimePicker/dialog.jsx | 2 +- .../Form/TimePicker/time-picker.jsx | 2 +- .../Footer/__tests__/network-status.spec.js | 2 +- .../__tests__/toggle-fullscreen.spec.js | 2 +- .../Footer/__tests__/toggle-positions.spec.js | 2 +- .../Footer/__tests__/toggle-settings.spec.js | 4 +-- .../Layout/Footer/network-status.jsx | 4 +-- .../Layout/Footer/toggle-fullscreen.jsx | 2 +- .../Layout/Footer/toggle-positions.jsx | 2 +- .../Layout/Footer/toggle-settings.jsx | 4 +-- .../Routes/route-with-sub-routes.jsx | 2 +- .../src/App/Constants/platform-config.js | 2 +- .../trader/src/App/Constants/routes-config.js | 2 +- .../src/App/Containers/Layout/send-email.jsx | 4 +-- .../App/Containers/Modals/success-dialog.jsx | 4 +-- .../SettingsModal/settings-chart.jsx | 4 +-- .../SettingsModal/settings-language.jsx | 4 +-- .../SettingsModal/settings-purchase.jsx | 4 +-- .../SettingsModal/settings-theme.jsx | 2 +- .../Containers/trade-settings-extensions.jsx | 2 +- .../Categories/icon-trade-categories.jsx | 2 +- .../Trading/Categories/trade-categories.jsx | 2 +- .../Assets/Trading/Types/icon-trade-types.jsx | 2 +- packages/trader/src/Constants/contract.js | 2 +- packages/trader/src/Constants/date-time.js | 2 +- .../Account/Components/layout-components.jsx | 2 +- .../Account/Components/leave-confirm.jsx | 4 +-- .../Modules/Account/Components/multistep.jsx | 4 +-- .../Modules/Account/Containers/account.jsx | 2 +- .../DemoMessage/demo-message.jsx | 4 +-- .../form-submit-error-message.jsx | 2 +- .../LoadErrorMessage/load-error-message.jsx | 2 +- .../financial-assessment.jsx | 4 +-- .../financial-information-list.js | 2 +- .../Profile/PersonalDetails/constants.js | 2 +- .../PersonalDetails/personal-details.jsx | 4 +-- .../AccountLimits/account-limits-info.jsx | 4 +-- .../Security/AccountLimits/account-limits.jsx | 6 ++-- .../DerivPassword/change-password-form.jsx | 4 +-- .../DerivPassword/forgot-your-password.jsx | 4 +-- .../file-uploader-container.jsx | 4 +-- .../ProofOfAddress/file-uploader-utils.js | 2 +- .../ProofOfAddress/file-uploader.jsx | 4 +-- .../ProofOfAddress/proof-of-address-form.jsx | 4 +-- .../proof-of-address-messages.jsx | 4 +-- .../Verification/ProofOfIdentity/onfido.jsx | 2 +- .../proof-of-identity-container.jsx | 2 +- .../proof-of-identity-messages.jsx | 4 +-- .../Contract/Components/Digits/digits.jsx | 4 +-- .../Components/InfoBox/info-box-longcode.jsx | 2 +- .../last-digit-pointer.jsx | 2 +- .../Contract/Components/Sell/sell-button.jsx | 4 +-- .../Contract/Components/Sell/sell-info.jsx | 4 +-- .../Contract/Components/contract-error.jsx | 2 +- .../Contract/Containers/contract-replay.jsx | 6 ++-- .../Modules/Contract/Containers/contract.jsx | 2 +- .../MT5/Components/mt5-account-card.jsx | 4 +-- .../MT5/Components/mt5-account-copy.jsx | 4 +-- .../Components/mt5-demo-account-display.jsx | 4 +-- .../MT5/Components/mt5-form-submit-button.jsx | 2 +- .../Components/mt5-real-account-display.jsx | 4 +-- .../Containers/mt5-compare-accounts-modal.jsx | 4 +-- .../Modules/MT5/Containers/mt5-dashboard.jsx | 4 +-- .../Containers/mt5-password-manager-modal.jsx | 4 +-- .../MT5/Containers/mt5-password-modal.jsx | 4 +-- .../Containers/mt5-server-error-dialog.jsx | 4 +-- .../MT5/Containers/mt5-top-up-demo-modal.jsx | 4 +-- .../Modules/Page404/Components/Page404.jsx | 2 +- .../src/Modules/PageError/PageError.jsx | 2 +- .../Components/empty-portfolio-message.jsx | 4 +-- .../empty-trade-history-message.jsx | 2 +- .../Reports/Components/indicative-cell.jsx | 4 +-- .../Components/market-symbol-icon-row.jsx | 2 +- .../Components/profit-loss-card-content.jsx | 6 ++-- .../Reports/Constants/data-table-constants.js | 4 +-- .../Reports/Containers/open-positions.jsx | 2 +- .../Reports/Containers/profit-table.jsx | 2 +- .../Modules/Reports/Containers/reports.jsx | 2 +- .../Modules/Reports/Containers/statement.jsx | 2 +- .../Reports/Containers/wallet-information.jsx | 4 +-- .../Components/Markers/marker-line.jsx | 2 +- .../Components/Markers/marker-spot-label.jsx | 4 +-- .../SmartChart/Components/all-markers.jsx | 2 +- .../Components/Elements/mobile-dialog.jsx | 2 +- .../Components/Elements/purchase-button.jsx | 2 +- .../Components/Elements/purchase-fieldset.jsx | 4 +-- .../Form/ContractType/contract-type-item.jsx | 2 +- .../ContractType/contract-type-widget.jsx | 2 +- .../Purchase/PurchaseLock/purchase-lock.jsx | 4 +-- .../Form/Purchase/contract-info.jsx | 4 +-- .../Duration/advanced-duration.jsx | 2 +- .../TradeParams/Duration/duration-toggle.jsx | 2 +- .../Form/TradeParams/Duration/duration.jsx | 2 +- .../Form/TradeParams/allow-equals.jsx | 4 +-- .../Components/Form/TradeParams/amount.jsx | 4 +-- .../Components/Form/TradeParams/barrier.jsx | 4 +-- .../Form/TradeParams/last-digit.jsx | 2 +- .../Form/TradeParams/start-date.jsx | 4 +-- .../TradeTypeInfo/trade-type-info-item.jsx | 4 +-- .../Modules/Trading/Containers/purchase.jsx | 2 +- .../trader/src/Services/outdated-browser.js | 2 +- packages/trader/src/Stores/Helpers/client.js | 2 +- .../Stores/Modules/Contract/Constants/ui.js | 4 +-- .../Modules/Contract/Helpers/chart-markers.js | 2 +- .../Contract/Helpers/chart-notifications.js | 2 +- .../Stores/Modules/Contract/Helpers/logic.js | 2 +- .../Modules/Contract/contract-replay-store.js | 4 +-- .../Stores/Modules/MT5/Helpers/mt5-config.js | 2 +- .../Modules/Portfolio/Helpers/details.js | 4 +-- .../Helpers/portfolio-notifications.js | 4 +-- .../Modules/Portfolio/portfolio-store.js | 2 +- .../Modules/Profit/Helpers/format-response.js | 2 +- .../Modules/SmartChart/Constants/markers.js | 2 +- .../Modules/SmartChart/Helpers/barriers.js | 2 +- .../Statement/Helpers/format-response.js | 4 +-- .../Modules/Trading/Constants/contract.js | 2 +- .../Trading/Constants/validation-rules.js | 2 +- .../Modules/Trading/Helpers/active-symbols.js | 2 +- .../Modules/Trading/Helpers/allow-equals.js | 2 +- .../Modules/Trading/Helpers/contract-type.js | 4 +-- .../Modules/Trading/Helpers/currency.js | 4 +-- .../Modules/Trading/Helpers/duration.js | 2 +- .../Modules/Trading/Helpers/proposal.js | 4 +-- .../src/Stores/Modules/Trading/trade-store.js | 6 ++-- packages/trader/src/Stores/base-store.js | 2 +- packages/trader/src/Utils/Date/date-time.js | 2 +- .../trader/src/Utils/Language/language.js | 2 +- .../Validator/declarative-validation-rules.js | 6 ++-- .../_common/base/__tests__/currency_base.js | 2 +- packages/trader/src/_common/base/login.js | 2 +- packages/trader/src/_common/language.js | 2 +- packages/trader/src/_common/os_detect.js | 2 +- packages/trader/src/_common/storage.js | 2 +- packages/trader/src/_common/url.js | 2 +- packages/trader/src/sass/app.scss | 8 ++--- packages/translations/.eslintrc.js | 2 +- packages/translations/README.md | 8 ++--- packages/translations/package-lock.json | 2 +- packages/translations/package.json | 2 +- packages/translations/webpack.config.js | 2 +- 576 files changed, 980 insertions(+), 980 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4495966f16ac..9c7f24e75cdc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,8 @@ commands: - source-v1-{{ .Branch }}-{{ .Revision }} - source-v1-{{ .Branch }}- - source-v1- - - run: - name: Fetch git tags + - run: + name: Fetch git tags command: | mkdir -p ~/.ssh echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== ' >> ~/.ssh/known_hosts @@ -23,7 +23,7 @@ commands: fi - checkout - run: - name: Compress git objects + name: Compress git objects command: git gc - save_cache: name: Git save cache @@ -45,17 +45,17 @@ commands: command: npm run build:local - run: name: "build core" - command: node_modules/lerna/cli.js exec --scope deriv-core -- npm run build + command: node_modules/lerna/cli.js exec --scope @deriv/core -- npm run build docker: description: "Build and Push image to docker hub" steps: - setup_remote_docker - - run: + - run: name: Building docker image command: | docker build -t ${DOCKHUB_ORGANISATION}/deriv-app:${CIRCLE_TAG} . - - run: + - run: name: Pushing Image to docker hub command: | echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin @@ -64,7 +64,7 @@ commands: description: "Deploy to k8s cluster" steps: - k8s/install-kubectl - - run: + - run: name: Deploying to k8s cluster for service deriv-app command: | echo $CA_CRT | base64 --decode > ca.crt @@ -74,7 +74,7 @@ commands: description: "Deploy to k8s cluster" steps: - k8s/install-kubectl - - run: + - run: name: Deploying to k8s cluster for service deriv-app command: | echo $CA_CRT | base64 --decode > ca.crt @@ -91,7 +91,7 @@ jobs: - build - docker - k8s_deploy_staging - + release_production: docker: - image: circleci/node:11.15.0-stretch @@ -101,7 +101,7 @@ jobs: - build - docker - k8s_deploy_production - + workflows: release_staging: jobs: diff --git a/README.md b/README.md index f5ff61571dd6..c7d73df7535c 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ All packages must contain the following scripts to perform the stated actions: **Please follow the README of each package you intend to work with on how to get set up and their custom scripts.** However, the above scripts can be run from the root directory in the following manner. ### Package names -Each package is named with the `deriv-` prefix, however for the scripts above, you do not need to add the `deriv-` prefix as the scripts already prefix the 1st argument of the script with `deriv-`. **However**, if you do use the `lerna` CLI directly, then you will need to use the full package name including the `deriv-` prefix. +Each package is named with the `@deriv/` prefix, however for the scripts above, you do not need to add the `@deriv/` prefix as the scripts already prefix the 1st argument of the script with `@deriv/`. **However**, if you do use the `lerna` CLI directly, then you will need to use the full package name including the `@deriv/` prefix. You can find the names of packages by first navigating to the `packages` folder. Each subfolder is a package, and contains a `package.json` file. The value of the `name` key in `package.json` is the package name. @@ -130,11 +130,11 @@ There is a 4th type of release: releasing npm registry packages (currently `@der ## FAQ 1. How do I **install** an npm package in one of our packages? - **A.** You can simply `cd` into the package you wish to install to, then run `npm i package-name` as usual. Or simply run a `lerna exec` like `lerna exec --scope=local-package -- npm i npm-package-name`, e.g.: `lerna exec --scope=deriv-translations -- npm i i18next`. _Please note that for direct `lerna` CLI use, you need the full package name including the `deriv-` prefix._ + **A.** You can simply `cd` into the package you wish to install to, then run `npm i package-name` as usual. Or simply run a `lerna exec` like `lerna exec --scope=local-package -- npm i npm-package-name`, e.g.: `lerna exec --scope=@deriv/translations -- npm i i18next`. _Please note that for direct `lerna` CLI use, you need the full package name including the `@deriv/` prefix._ 2. How do I **uninstall** an npm package from one of our packages? - **A.** Just as installing, except the `npm` command you'd run would be `npm uninstall` (shortened to `npm un`). e.g.: `lerna exec --scope=deriv-translations -- npm un i18next`. + **A.** Just as installing, except the `npm` command you'd run would be `npm uninstall` (shortened to `npm un`). e.g.: `lerna exec --scope=@deriv/translations -- npm un i18next`. 3. How do I run `npm ci` or equivalent (to add dependencies based on `package-lock.json`? diff --git a/docs/Modules/README.md b/docs/Modules/README.md index d477898863ff..1ec2ad318db5 100644 --- a/docs/Modules/README.md +++ b/docs/Modules/README.md @@ -2,7 +2,7 @@ In order to create and add a new package to this project/repo, please follow the guideline below: -1. Make sure your new package name is prefixed with `deriv-`. +1. Make sure your new package name is prefixed with `@deriv/`. 2. Make sure the Webpack config has `IS_RELEASE` flag, as well as conditional source-maps based on "if IS_RELEASE". ...WIP diff --git a/docs/README.md b/docs/README.md index 2cba2c3721ac..9fd91c690740 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,16 +1,16 @@ # Architecture and general philosophy of the project ## Brief -This project contains different dependency libraries and different packages used by the Core package (`deriv-core`). +This project contains different dependency libraries and different packages used by the Core package (`@deriv/core`). Each package in the `packages` folder is a dependency that eventually up to Core (the main app). There are 2 types of dependencies: -1. Reusable code/libraries - These are packages that are meant to be loaded anywhere for use, and they enhance the application and/or development. At the time of writing, this includes: `deriv-components`, `deriv-shared`, `@deriv/p2p`, `deriv-translations`. -2. Platforms/Modules/Apps - These can be viewed as applications of their own. According to business logic, these are different domains/sections, and most likely have their own route. At the time of writing, this includes: `deriv-bot`, `deriv-trader`. +1. Reusable code/libraries - These are packages that are meant to be loaded anywhere for use, and they enhance the application and/or development. At the time of writing, this includes: `@deriv/components`, `@deriv/shared`, `@deriv/p2p`, `@deriv/translations`. +2. Platforms/Modules/Apps - These can be viewed as applications of their own. According to business logic, these are different domains/sections, and most likely have their own route. At the time of writing, this includes: `@deriv/bot`, `@deriv/trader`. -The `deriv-core` package is the "app instance". It contains singleton services (such as the WS, and base/common stores), as well as singleton UI components (header, footer, modals management, cashier). +The `@deriv/core` package is the "app instance". It contains singleton services (such as the WS, and base/common stores), as well as singleton UI components (header, footer, modals management, cashier). _Hint: In order to simply build (without tests) type 1 dependencies, use the command `npm run build:travis` from the root of the package. In order to build type 2 dependencies, in the same manner, use `npm run build:local`._ diff --git a/package.json b/package.json index 31e940b031f0..e1c911cd12cf 100644 --- a/package.json +++ b/package.json @@ -6,22 +6,22 @@ "lerna": "^3.15.0" }, "scripts": { - "bootstrap": "f () { npm ci && lerna link && lerna bootstrap --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} && lerna link && npm run build:travis ;}; f", - "build": "f () { lerna exec --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} -- npm run build $2 ;}; f", - "build:local": "f () { lerna exec --scope deriv-trader --scope deriv-bot --parallel -- npm run build $1 ;}; f", - "build:travis": "lerna exec --scope deriv-shared --scope deriv-components --scope deriv-translations --scope @deriv/p2p -- npm run build:travis", + "bootstrap": "f () { npm ci && lerna link && lerna bootstrap --scope=@deriv/${1:-'*'} && lerna link && npm run build:travis ;}; f", + "build": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run build $2 ;}; f", + "build:local": "f () { lerna exec --scope @deriv/trader --scope @deriv/bot --parallel -- npm run build $1 ;}; f", + "build:travis": "lerna exec --scope @deriv/shared --scope @deriv/components --scope @deriv/translations --scope @deriv/p2p -- npm run build:travis", "clean": "echo \"Remove $(git rev-parse --show-toplevel)/node_modules\" && lerna clean && rm -rf \"$(git rev-parse --show-toplevel)/node_modules\"", - "deploy": "f () { npm run build:travis && npm run build:local && lerna exec --scope deriv-core -- npm run deploy $@ ;}; f", - "deploy:clean": "f () { npm run build:travis && npm run build:local && lerna exec --scope deriv-core -- npm run deploy:clean $@ ;}; f", - "deploy:folder": "f () { npm run build:travis && npm run build:local $1 && lerna exec --scope deriv-core -- npm run deploy:folder $@ ;}; f", + "deploy": "f () { npm run build:travis && npm run build:local && lerna exec --scope @deriv/core -- npm run deploy $@ ;}; f", + "deploy:clean": "f () { npm run build:travis && npm run build:local && lerna exec --scope @deriv/core -- npm run deploy:clean $@ ;}; f", + "deploy:folder": "f () { npm run build:travis && npm run build:local $1 && lerna exec --scope @deriv/core -- npm run deploy:folder $@ ;}; f", "publish:p2p": "f () { lerna publish from-package ;}; f", - "serve": "f () { lerna exec --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} -- npm run serve ;}; f", - "start": "f () { lerna exec --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} -- npm run start ;}; f", - "test": "f () { lerna exec --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} --parallel -- npm run test ;}; f", - "test:eslint": "f () { lerna exec --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} -- npm run test:eslint ;}; f", - "test:mocha": "f () { lerna exec --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} -- npm run test:mocha ;}; f", - "test:stylelint": "f () { lerna exec --scope deriv-${1:-'*'} --scope=@deriv/${1:-'p2p'} -- npm run test:stylelint ;}; f", - "translate": "f () { lerna exec --scope deriv-translations -- npm run translate ;}; f" + "serve": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run serve ;}; f", + "start": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run start ;}; f", + "test": "f () { lerna exec --scope=@deriv/${1:-'*'} --parallel -- npm run test ;}; f", + "test:eslint": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run test:eslint ;}; f", + "test:mocha": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run test:mocha ;}; f", + "test:stylelint": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run test:stylelint ;}; f", + "translate": "f () { lerna exec --scope @deriv/translations -- npm run translate ;}; f" }, "husky": { "hooks": { diff --git a/packages/bot/.eslintrc.js b/packages/bot/.eslintrc.js index 11b3d8cd253c..eb34884f97a7 100644 --- a/packages/bot/.eslintrc.js +++ b/packages/bot/.eslintrc.js @@ -23,7 +23,7 @@ module.exports = { semi : ['error', 'always'], 'array-callback-return' : 0, 'brace-style' : ['error', '1tbs', { allowSingleLine: true }], - 'class-methods-use-this' : ["error", { 'exceptMethods': ['render', 'getInitialState', 'getDefaultProps', 'getChildContext', 'componentWillMount', 'componentDidMount', 'componentWillReceiveProps', 'shouldComponentUpdate', 'componentWillUpdate', 'componentDidUpdate', 'componentWillUnmount'] }], + 'class-methods-use-this' : ["error", { 'exceptMethods': ['render', 'getInitialState', 'getDefaultProps', 'getChildContext', 'componentWillMount', 'componentDidMount', 'componentWillReceiveProps', 'shouldComponentUpdate', 'componentWillUpdate', 'componentDidUpdate', 'componentWillUnmount'] }], 'eol-last' : ['error', 'always'], 'func-names' : ['error', 'never'], 'keyword-spacing' : ['error', { after: true , before: true }], @@ -50,7 +50,7 @@ module.exports = { 'import/order' : ['error', { groups: [['builtin', 'external'], 'internal', 'sibling', 'parent'], 'newlines-between': 'ignore' }], 'import/prefer-default-export' : 0, 'import/extensions' : ['error', 'never', { 'jsx': 'always', 'json': 'always' }], - "import/no-unresolved" : [2, { ignore: ['deriv-components' , 'deriv-shared'] }], + "import/no-unresolved" : [2, { ignore: ['@deriv/components' , '@deriv/shared'] }], // react rules 'jsx-quotes' : ['error', 'prefer-single'], diff --git a/packages/bot/package-lock.json b/packages/bot/package-lock.json index a504bb92586f..a3f23836f398 100644 --- a/packages/bot/package-lock.json +++ b/packages/bot/package-lock.json @@ -1,5 +1,5 @@ { - "name": "deriv-bot", + "name": "@deriv/bot", "version": "1.0.0", "lockfileVersion": 1, "requires": true, @@ -4448,7 +4448,7 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, - "deriv-components": { + "@deriv/components": { "version": "1.0.0", "requires": { "@babel/polyfill": "^7.4.4", @@ -4456,7 +4456,7 @@ "@storybook/addon-knobs": "^5.2.4", "@wapps/storybook-addon-state": "0.0.4", "classnames": "^2.2.6", - "deriv-shared": "^1.0.0", + "@deriv/shared": "^1.0.0", "formik": "^1.5.8", "prop-types": "^15.7.2", "react": "~16.8.6", @@ -5222,9 +5222,9 @@ "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", "optional": true }, - "deriv-shared": { + "@deriv/shared": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/deriv-shared/-/deriv-shared-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/@deriv/shared/-/@deriv/shared-1.0.0.tgz", "integrity": "sha512-nGYa0L0LOPZO1mZfkQz5HxdXHsoBfD6Ar4iXxTuSucmgQFzJCAoJULkKVSGJSiBgeK4qWMMMhXub3S813/44jw==" }, "dom-css": { @@ -6514,10 +6514,10 @@ } } }, - "deriv-shared": { + "@deriv/shared": { "version": "1.0.0" }, - "deriv-translations": { + "@deriv/translations": { "version": "1.0.0", "requires": { "@babel/polyfill": "^7.4.4", diff --git a/packages/bot/package.json b/packages/bot/package.json index 8d235459c89f..97e7100da17e 100644 --- a/packages/bot/package.json +++ b/packages/bot/package.json @@ -1,6 +1,6 @@ { "version": "1.0.0", - "name": "deriv-bot", + "name": "@deriv/bot", "description": "Visual automation for deriv.app", "main": "dist/bot.main.js", "private": true, @@ -98,9 +98,9 @@ "commander": "^2.20.0", "concat-stream": "^2.0.0", "core-js": "^2.6.5", - "deriv-components": "^1.0.0", - "deriv-shared": "^1.0.0", - "deriv-translations": "^1.0.0", + "@deriv/components": "^1.0.0", + "@deriv/shared": "^1.0.0", + "@deriv/translations": "^1.0.0", "firebase": "7.2.3", "formik": "^1.5.8", "gh-pages": "^2.0.1", diff --git a/packages/bot/src/assets/sass/app.scss b/packages/bot/src/assets/sass/app.scss index 948fc00f0aa6..d908c1f4930a 100644 --- a/packages/bot/src/assets/sass/app.scss +++ b/packages/bot/src/assets/sass/app.scss @@ -1,5 +1,5 @@ // Fonts -@import 'deriv-shared/src/styles/google-fonts.scss'; +@import '@deriv/shared/src/styles/google-fonts.scss'; .bot { --bot-content-height: calc(100vh - 140px); diff --git a/packages/bot/src/components/contract-card.jsx b/packages/bot/src/components/contract-card.jsx index 986010a0165a..ce6bd700ef0f 100644 --- a/packages/bot/src/components/contract-card.jsx +++ b/packages/bot/src/components/contract-card.jsx @@ -1,11 +1,11 @@ import classNames from 'classnames'; import { Icon, - Money } from 'deriv-components'; + Money } from '@deriv/components'; import React from 'react'; import PropTypes from 'prop-types'; -import CurrencyUtils from 'deriv-shared/utils/currency'; -import { localize } from 'deriv-translations'; +import CurrencyUtils from '@deriv/shared/utils/currency'; +import { localize } from '@deriv/translations'; import ContractCardLoader from './contract-card-loading.jsx'; import ContractResultOverlay from './contract-result-overlay.jsx'; import IconTradeType from './icon-trade-types.jsx'; diff --git a/packages/bot/src/components/contract-result-overlay.jsx b/packages/bot/src/components/contract-result-overlay.jsx index a84535a16466..3e8ea202a09d 100644 --- a/packages/bot/src/components/contract-result-overlay.jsx +++ b/packages/bot/src/components/contract-result-overlay.jsx @@ -1,8 +1,8 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; -import { Icon } from 'deriv-components'; -import { localize } from 'deriv-translations'; +import { Icon } from '@deriv/components'; +import { localize } from '@deriv/translations'; import '../assets/sass/contract-result-overlay.scss'; const ContractResultOverlay = (props) => { diff --git a/packages/bot/src/components/dialog.jsx b/packages/bot/src/components/dialog.jsx index b9583e05f267..d124de9f715a 100644 --- a/packages/bot/src/components/dialog.jsx +++ b/packages/bot/src/components/dialog.jsx @@ -1,8 +1,8 @@ -import { Button, Modal } from 'deriv-components'; +import { Button, Modal } from '@deriv/components'; import PropTypes from 'prop-types'; import React from 'react'; -import { localize } from 'deriv-translations'; +import { localize } from '@deriv/translations'; import '../assets/sass/dialog.scss'; const Dialog = ({ diff --git a/packages/bot/src/components/flyout-block-group.jsx b/packages/bot/src/components/flyout-block-group.jsx index 00fb58490529..c7f56a22733d 100644 --- a/packages/bot/src/components/flyout-block-group.jsx +++ b/packages/bot/src/components/flyout-block-group.jsx @@ -1,8 +1,8 @@ -import { Button } from 'deriv-components'; +import { Button } from '@deriv/components'; import React from 'react'; import { PropTypes } from 'prop-types'; -import { localize } from 'deriv-translations'; +import { localize } from '@deriv/translations'; import FlyoutBlock from './flyout-block.jsx'; const FlyoutBlockGroup = ({ diff --git a/packages/bot/src/components/flyout.jsx b/packages/bot/src/components/flyout.jsx index 6d1195205a0e..631ceb732381 100644 --- a/packages/bot/src/components/flyout.jsx +++ b/packages/bot/src/components/flyout.jsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; -import { localize } from 'deriv-translations'; +import { localize } from '@deriv/translations'; import FlyoutBlockGroup from './flyout-block-group.jsx'; import HelpBase from '../scratch/help-content/flyout-help-base.jsx'; import { config } from '../scratch/help-content/help-content.config'; @@ -29,7 +29,7 @@ class Flyout extends React.PureComponent { setHelpContent } = this.props; const total_result = Object.keys(flyout_content).length; const is_empty = total_result === 0; - + if (is_visible && is_search_flyout) pushDataLayer({ event: 'dbot_search_results', value: true }); return ( diff --git a/packages/bot/src/components/footer-extension.jsx b/packages/bot/src/components/footer-extension.jsx index e1cf77140e8d..417d98a1f789 100644 --- a/packages/bot/src/components/footer-extension.jsx +++ b/packages/bot/src/components/footer-extension.jsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; -import { localize } from 'deriv-translations'; +import { localize } from '@deriv/translations'; import { tabs_title } from '../constants/bot-contents'; import { connect } from '../stores/connect'; import '../assets/sass/footer-extensions.scss'; diff --git a/packages/bot/src/components/icon-trade-types.jsx b/packages/bot/src/components/icon-trade-types.jsx index 9f9616ce5b58..510c1cb42d8b 100644 --- a/packages/bot/src/components/icon-trade-types.jsx +++ b/packages/bot/src/components/icon-trade-types.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { Icon } from 'deriv-components'; +import { Icon } from '@deriv/components'; const IconTradeType = ({ type, className, ...props }) => { switch (type.toLowerCase()) { diff --git a/packages/bot/src/components/journal.jsx b/packages/bot/src/components/journal.jsx index 2f785b36d9bd..3bb5b72e334c 100644 --- a/packages/bot/src/components/journal.jsx +++ b/packages/bot/src/components/journal.jsx @@ -1,8 +1,8 @@ import classnames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; -import { ThemedScrollbars } from 'deriv-components'; -import { localize } from 'deriv-translations'; +import { ThemedScrollbars } from '@deriv/components'; +import { localize } from '@deriv/translations'; import { message_types } from '../constants/messages'; import { connect } from '../stores/connect'; import '../assets/sass/journal.scss'; diff --git a/packages/bot/src/components/quick-strategy.jsx b/packages/bot/src/components/quick-strategy.jsx index 3df67fb5fe56..7ebe739b5464 100644 --- a/packages/bot/src/components/quick-strategy.jsx +++ b/packages/bot/src/components/quick-strategy.jsx @@ -8,13 +8,13 @@ import { Modal, Popover, Tabs, -} from 'deriv-components'; +} from '@deriv/components'; import { Formik, Form, Field, } from 'formik'; -import { localize } from 'deriv-translations'; +import { localize } from '@deriv/translations'; import IconTradeType from './icon-trade-types.jsx'; import { connect } from '../stores/connect'; import config from '../constants/index'; @@ -266,7 +266,7 @@ const QuickStrategy = ({ const asset_dropdown_options = {}; Object.assign(asset_dropdown_options, market_dropdown); - + if (asset_dropdown_options) { Object.keys(asset_dropdown_options).forEach(key => { const submarket = asset_dropdown_options[key]; @@ -290,7 +290,7 @@ const QuickStrategy = ({ }); }); } - + const duration_dropdown_options = Object.keys(duration_dropdown).map(key => { const duration = duration_dropdown[key]; return { text: duration.display, value: duration.unit }; diff --git a/packages/bot/src/components/run-panel.jsx b/packages/bot/src/components/run-panel.jsx index 6e414c73156c..3ac20f2c0e9b 100644 --- a/packages/bot/src/components/run-panel.jsx +++ b/packages/bot/src/components/run-panel.jsx @@ -3,10 +3,10 @@ import { Drawer, Icon, Popover, - Tabs } from 'deriv-components'; + Tabs } from '@deriv/components'; import PropTypes from 'prop-types'; import React from 'react'; -import { localize } from 'deriv-translations'; +import { localize } from '@deriv/translations'; import Dialog from './dialog.jsx'; import Journal from './journal.jsx'; import Summary from './summary.jsx'; @@ -62,7 +62,7 @@ const drawerFooter = ({ has_effect secondary /> - + { (is_stop_button_visible) ? ); ``` - Or you can use deriv-components-loader to import components from deriv-components without having to manually import the corresponding stylesheet. The deriv-components-loader will automatically import stylesheets. + Or you can use deriv-components-loader to import components from @deriv/components without having to manually import the corresponding stylesheet. The deriv-components-loader will automatically import stylesheets. ```jsx -import { Button } from 'deriv-components'; +import { Button } from '@deriv/components'; const SomeComponent = () => (