diff --git a/.githooks/commit-msg b/.githooks/commit-msg index 0848397bd..cfc7fde59 100755 --- a/.githooks/commit-msg +++ b/.githooks/commit-msg @@ -10,12 +10,20 @@ commit_msg=$(cat "$commit_msg_file") npx prettier --write . npm run re:format -# Define your commit message convention (e.g., starts with "feature:", "fix:", etc.) -commit_regex="^(Merge branch|feat|fix|chore|docs|style|refactor|test|enhancement):.+" +# Define your commit message convention (e.g., starts with "feat:", "fix:", etc.) +commit_regex="^(Merge branch|(feat|fix|chore|refactor|docs|test|style|enhancement):).+" -if ! echo "$commit_msg" | grep -Ei "$commit_regex" ; then - echo "Aborting commit. Your commit message does not follow the conventional format." - echo "Example - : - " + +if git log -1 --show-signature &> /dev/null; then + if ! echo "$commit_msg" | grep -Ei "$commit_regex" ; then + echo "Aborting commit. Your commit message does not follow the conventional format." + echo "The commit message should begin with one of the following keywords followed by a colon: 'feat', 'fix', 'chore', 'refactor', 'docs', 'test' or 'style'. For example, it should be formatted like this: 'feat: - '" + exit 1 + fi +else + echo "~~~~**** Error: Commit Signature Missing. ****~~~~" + echo "Please make sure to sign your commits. You can sign your commit by using the '-S' option with 'git commit'." + echo "Example: git commit -S -m 'Your commit message'" exit 1 fi diff --git a/README.md b/README.md index a01f6bafd..29d5b0d3f 100644 --- a/README.md +++ b/README.md @@ -152,14 +152,6 @@ The `production_access` feature flag enables a flow for users to request live pr The `quick_start` feature flag enables the simplified onboarding flow for new users, where he connects to processors, configure payment routing and testing a payment, all in one flow. -#### Stripe plus paypal - -The `stripe_plus_paypal` feature flag enables access to simplified multi-processor connectivity through Stripe and PayPal. When turned on, users are guided through a streamlined setup flow to connect both Stripe and PayPal accounts and experience it in a checkout page. - -#### Woocommerce - -The `woocommerce` feature flag controls the visibility of WooCommerce integration with Hyperswitch flow within the dashboard. When enabled, users will have access to the step-by-step guide to integrate the woocommerce plugin for hyperswitch. - #### Open SDK The `open_sdk` feature flag enables access to the Checkout Page web SDK from within the dashboard. When enabled, developers can preview the SDK from within the dashboard and make payments. diff --git a/config/FeatureFlag.json b/config/FeatureFlag.json index 64501c151..99a695198 100644 --- a/config/FeatureFlag.json +++ b/config/FeatureFlag.json @@ -4,8 +4,6 @@ "magic_link": false, "production_access": false, "quick_start": false, - "stripe_plus_paypal": false, - "woocommerce": false, "open_sdk": false, "switch_merchant": false, "audit_trail": false, diff --git a/package.json b/package.json index 8329a0739..4e94eab64 100644 --- a/package.json +++ b/package.json @@ -5,24 +5,18 @@ "author": "Shiva Nandan ", "license": "MIT", "scripts": { + "setup-env": "chmod +x ./replace_env.sh && ./replace_env.sh", "pre-commit": "bash .githooks/commit-msg", - "start": "chmod +x ./replace_env.sh && ./replace_env.sh && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && appName=hyperswitch webpack serve --config webpack.dev.js", - "start:server_compiler": "webpack --config webpack.server.js --watch", + "start": "npm run setup-env && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && appName=hyperswitch webpack serve --config webpack.dev.js", + "serve": "npm run setup-env && cp env-config.js ./dist/hyperswitch && node dist/server/server.js", "prod:start": "webpack serve --config webpack.dev.js", - "build:prod": "chmod +x ./replace_env.sh && ./replace_env.sh && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && webpack --config webpack.prod.js", - "ssr_sript_build": "BRANCH_NAME=ssr webpack --config webpack.prod.js", - "ssr_run_server": "node --watch dist/server/server.js", "build:netlify": "webpack --config webpack.prod.js --env netlifyHosted", + "build:test": "cd tests && npx rescript build -with-deps", + "build:prod": "npm run setup-env && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && webpack --config webpack.prod.js", "re:build": "rescript", "re:clean": "rescript clean", "re:start": "rescript build -w", "re:format": "rescript format -all", - "use-prod-ec": "mv public/_redirects_for_prod public/_redirects", - "serve": "chmod +x ./replace_env.sh && ./replace_env.sh && cp env-config.js ./dist/hyperswitch && node dist/server/server.js", - "build:test": "cd tests && npx rescript build -with-deps", - "clean:test": "cd tests && npx rescript clean -with-deps", - "unit:test": "cd tests && npx rescript build -with-deps && jest unit_test", - "revert:test": "cd tests && npx rescript clean -with-deps && cd .. && npx rescript build -with-deps", "postinstall": "git config core.hooksPath .githooks && chmod +x .githooks/commit-msg" }, "husky": { diff --git a/src/components/LoadedTable.res b/src/components/LoadedTable.res index e7380840a..06ba7fd10 100644 --- a/src/components/LoadedTable.res +++ b/src/components/LoadedTable.res @@ -774,7 +774,7 @@ let make = ( ? "" : `${isMinHeightRequired ? noScrollbar ? "" : "overflow-x-scroll" : "overflow-scroll"}` let loadedTable = -
+
{switch dataView { | Table => { let children = diff --git a/src/components/Loader.res b/src/components/Loader.res index 5ed36be52..cbf78e93b 100644 --- a/src/components/Loader.res +++ b/src/components/Loader.res @@ -25,20 +25,19 @@ let make = (
- {React.string(loadingText)} {children}
-
- - + + +
- - -
+
+ +
diff --git a/src/entryPoints/hyperswitch/FeatureFlagUtils.res b/src/entryPoints/hyperswitch/FeatureFlagUtils.res index 150c8cff9..30c58f237 100644 --- a/src/entryPoints/hyperswitch/FeatureFlagUtils.res +++ b/src/entryPoints/hyperswitch/FeatureFlagUtils.res @@ -4,8 +4,6 @@ type featureFlag = { testLiveToggle: bool, magicLink: bool, quickStart: bool, - stripePlusPayPal: bool, - wooCommerce: bool, openSDK: bool, switchMerchant: bool, testLiveMode: option, @@ -34,8 +32,6 @@ let featureFlagType = (featureFlags: Js.Json.t) => { testLiveToggle: dict->getBool("test_live_toggle", false), magicLink: dict->getBool("magic_link", false), quickStart: dict->getBool("quick_start", false), - stripePlusPayPal: dict->getBool("stripe_plus_paypal", false), - wooCommerce: dict->getBool("woocommerce", false), openSDK: dict->getBool("open_sdk", false), switchMerchant: dict->getBool("switch_merchant", false), testLiveMode: dict->getOptionBool("test_live_mode"), diff --git a/src/entryPoints/hyperswitch/HyperSwitchApp.res b/src/entryPoints/hyperswitch/HyperSwitchApp.res index 40bfc27a9..ba84d8950 100644 --- a/src/entryPoints/hyperswitch/HyperSwitchApp.res +++ b/src/entryPoints/hyperswitch/HyperSwitchApp.res @@ -229,7 +229,7 @@ let make = () => {
+ className="w-full h-screen overflow-x-scroll xl:overflow-x-hidden overflow-y-scroll">
diff --git a/src/entryPoints/hyperswitch/HyperSwitchEntry.res b/src/entryPoints/hyperswitch/HyperSwitchEntry.res index 29c8550bd..08f76fcd6 100644 --- a/src/entryPoints/hyperswitch/HyperSwitchEntry.res +++ b/src/entryPoints/hyperswitch/HyperSwitchEntry.res @@ -75,9 +75,7 @@ module HyperSwitchEntryComponent = { (await postDetails(url, Js.Dict.empty()->Js.Json.object_, Post))->Js.Json.stringify setFeatureFlag(._ => stringifiedResponse) } catch { - | Js.Exn.Error(e) => { - let _err = Js.Exn.message(e)->Belt.Option.getWithDefault("Failed to Fetch!") - } + | _ => () } } diff --git a/src/entryPoints/hyperswitch/SidebarValues.res b/src/entryPoints/hyperswitch/SidebarValues.res index 679aead89..f4783826b 100644 --- a/src/entryPoints/hyperswitch/SidebarValues.res +++ b/src/entryPoints/hyperswitch/SidebarValues.res @@ -303,7 +303,7 @@ let reconTag = (recon, isReconEnabled) => : emptyComponent let getHyperSwitchAppSidebars = ( - ~isReconEnabled=false, + ~isReconEnabled: bool, ~featureFlagDetails: FeatureFlagUtils.featureFlag, ~userRole, (), diff --git a/src/screens/HyperSwitch/Analytics/HSAnalyticsUtils.res b/src/screens/HyperSwitch/Analytics/HSAnalyticsUtils.res index 44ea205b3..516800622 100644 --- a/src/screens/HyperSwitch/Analytics/HSAnalyticsUtils.res +++ b/src/screens/HyperSwitch/Analytics/HSAnalyticsUtils.res @@ -174,10 +174,6 @@ let getStringListFromArrayDict = metrics => { metrics->Js.Array2.map(item => item->getDictFromJsonObject->getString("name", "")) } -let getCustomFormattedFloatDate = (floatDate, format) => { - floatDate->Js.Date.fromFloat->Js.Date.toISOString->Table.dateFormat(format) -} - module NoData = { @react.component let make = (~title, ~subTitle) => { @@ -209,7 +205,7 @@ let generateTablePayload = ( ~isIndustry: bool, ~mode: option, ~customFilter, - ~showDeltaMetrics=false, + ~showDeltaMetrics, ~moduleName as _: string, ~source: string="BATCH", (), diff --git a/src/screens/HyperSwitch/Developer/DeveloperUtils.res b/src/screens/HyperSwitch/Developer/DeveloperUtils.res index 9b366d562..b0701f9b3 100644 --- a/src/screens/HyperSwitch/Developer/DeveloperUtils.res +++ b/src/screens/HyperSwitch/Developer/DeveloperUtils.res @@ -1,22 +1,10 @@ open HSwitchSettingTypes -let titleClass = "md:font-bold font-semibold md:text-fs-16 text-fs-13 text-jp-gray-900 text-opacity-75 dark:text-white dark:text-opacity-75" - -let paymentsEvents = ["succeeded", "failed", "processing", "action_required"] -let refundsEvents = ["succeeded", "failed"] -let disputesEvents = ["opened", "expired", "accepted", "cancelled", "challenged", "won", "lost"] - -let webhookEventsDict = - [ - ("payment", paymentsEvents->Js.Array2.map(Js.Json.string)->Js.Json.array), - ("refund", refundsEvents->Js.Array2.map(Js.Json.string)->Js.Json.array), - ("dispute", disputesEvents->Js.Array2.map(Js.Json.string)->Js.Json.array), - ]->Js.Dict.fromArray let validateAPIKeyForm = ( values: Js.Json.t, ~setIsDisabled=_ => (), keys: array, - ~setShowCustomDate=_ => (), + ~setShowCustomDate, (), ) => { let errors = Js.Dict.empty() @@ -81,7 +69,6 @@ let getRecordTypeFromString = value => { type apiKey = { key_id: string, - merchant_id: string, name: string, description: string, prefix: string, @@ -93,7 +80,6 @@ type apiKey = { let itemToObjMapper = dict => { open LogicUtils { - merchant_id: getString(dict, "merchant_id", ""), key_id: getString(dict, "key_id", ""), name: getString(dict, "name", ""), description: getString(dict, "description", ""), diff --git a/src/screens/HyperSwitch/Developer/Webhooks.res b/src/screens/HyperSwitch/Developer/Webhooks.res index 35685e3d7..8859c8995 100644 --- a/src/screens/HyperSwitch/Developer/Webhooks.res +++ b/src/screens/HyperSwitch/Developer/Webhooks.res @@ -71,7 +71,7 @@ let make = (~webhookOnly=false, ~showFormOnly=false, ~profileId="") => { open HSwitchSettingTypes HSwitchMerchantAccountUtils.validateMerchantAccountForm( ~values, - ~setIsDisabled, + ~setIsDisabled=Some(setIsDisabled), ~fieldsToValidate={ [WebhookUrl, ReturnUrl]->Js.Array2.filter(urlField => urlField === WebhookUrl || !webhookOnly diff --git a/src/screens/HyperSwitch/HSwitchUtils.res b/src/screens/HyperSwitch/HSwitchUtils.res index 68048672a..3e704b363 100644 --- a/src/screens/HyperSwitch/HSwitchUtils.res +++ b/src/screens/HyperSwitch/HSwitchUtils.res @@ -92,95 +92,6 @@ module ConnectorCustomCell = { } } } -module HelpDeskSection = { - @react.component - let make = (~helpdeskModal, ~setHelpdeskModal) => { - let hyperswitchMixPanel = HSMixPanel.useSendEvent() - let url = RescriptReactRouter.useUrl() - let textStyle = "font-medium text-fs-14" - let {setShowFeedbackModal} = React.useContext(GlobalProvider.defaultContext) - let handleMixpanelEvents = eventName => { - [url.path->LogicUtils.getListHead, `global`]->Js.Array2.forEach(ele => - hyperswitchMixPanel(~pageName=ele, ~contextName="helpdesk", ~actionName=eventName, ()) - ) - } - let handleFeedbackClicked = _ => { - setShowFeedbackModal(_ => true) - "submitfeedback"->handleMixpanelEvents - } - - let hoverEffectStyle = "flex gap-3 cursor-pointer hover:border hover:border-blue-700 hover:rounded-md hover:!shadow-[0_0_4px_2px_rgba(0,_112,_255,_0.15)] p-3 border border-transparent" - <> - - -
handleFeedbackClicked()}> - -

{"Submit feedback"->React.string}

-
-
{ - "contactonslack"->handleMixpanelEvents - Window._open("https://hyperswitch-io.slack.com/ssb/redirect") - }}> - -

{"Connect on Slack"->React.string}

-
-
{ - "joindiscord"->handleMixpanelEvents - Window._open("https://discord.gg/an7gRdWkhw") - }}> - -

{"Join Discord"->React.string}

-
-
-
- { - open ReactEvent.Mouse - ev->stopPropagation - setHelpdeskModal(prevValue => { - let globalEventText = !prevValue ? "global_helpdesk_open" : "global_helpdesk_close" - let localEventText = !prevValue ? "helpdesk_open" : "helpdesk_close" - let currentPath = url.path->LogicUtils.getListHead - - [`${currentPath}_${localEventText}`, globalEventText]->Js.Array2.forEach(ele => - hyperswitchMixPanel(~eventName=Some(ele), ()) - ) - !prevValue - }) - }} - /> - - } -} - -let pathToVariantMapper = routeName => { - switch routeName { - | "home" => HOME - | "payments" => PAYMENTS - | "refunds" => REFUNDS - | "disputes" => DISPUTES - | "connectors" => CONNECTOR - | "routing" => ROUTING - | "analytics-payments" => ANALYTICS_PAYMENTS - | "analytics-refunds" => ANALYTICS_REFUNDS - | "settings" => SETTINGS - | "developers" => DEVELOPERS - | _ => HOME - } -} let isValidEmail = value => !Js.Re.test_( @@ -188,15 +99,6 @@ let isValidEmail = value => value, ) -let isUserJourneyAnalyticsAccessAvailable = email => email->Js.String2.includes("juspay") - -let convertJsonArrayToArrayOfString = (. val) => { - val - ->Js.Json.decodeArray - ->Belt.Option.getWithDefault([]) - ->Js.Array2.map(ele => ele->Js.Json.decodeString->Belt.Option.getWithDefault("")) -} - let useMerchantDetailsValue = () => Recoil.useRecoilValueFromAtom(merchantDetailsValueAtom)->safeParse @@ -382,49 +284,9 @@ let constructOnboardingBody = ( ("account_activation", copyOfIntegrationDetails.account_activation->returnIntegrationJson), ])->Js.Json.object_ } -module OnboardingChecklistTile = { - @react.component - let make = (~setShowOnboardingModal) => { - let hyperswitchMixPanel = HSMixPanel.useSendEvent() - let url = RescriptReactRouter.useUrl() -
{ - setShowOnboardingModal(_ => true) - - [url.path->LogicUtils.getListHead, "global"]->Js.Array2.forEach(ele => - hyperswitchMixPanel(~eventName=Some(`${ele}_onboarding_checklist`), ()) - ) - }}> -
-
{"Onboarding Checklist"->React.string}
- - - - -
- -
- } -} let isEmptyString = str => str->Js.String2.length <= 0 -let parseUrl = url => { - url - ->Js.Global.decodeURI - ->Js.String2.split("&") - ->Belt.Array.keepMap(str => { - let arr = str->Js.String2.split("=") - let key = arr->Belt.Array.get(0)->Belt.Option.getWithDefault("-") - let val = arr->Belt.Array.sliceToEnd(1)->Js.Array2.joinWith("=") - key === "" || val === "" ? None : Some((key, val)) - }) - ->Js.Dict.fromArray -} - type textVariantType = | H1 | H2 @@ -453,19 +315,6 @@ let getTextClass = (~textVariant, ~h3TextVariant=Leading_1, ~paragraphTextVarian } } -module CardLoader = { - @react.component - let make = () => { -
-
-
- -
-
-
- } -} - let checkStripePlusPayPal = (enumDetails: QuickStartTypes.responseType) => { enumDetails.stripeConnected.processorID->Js.String2.length > 0 && enumDetails.paypalConnected.processorID->Js.String2.length > 0 && diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/CodeSnippets.res b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/CodeSnippets.res index 173d9658c..aa89ea871 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/CodeSnippets.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/CodeSnippets.res @@ -733,55 +733,3 @@ app.post("/create-payment", async (req, res) => { }); app.listen(4242, () => console.log("Node server listening on port 4242!"));` - -let reactDisplayPaymentConfirmation: string = `const handleSubmit = async (e) => { - e.preventDefault(); - if (!hyper || !widgets) { - // hyper-js has not yet loaded. - // Make sure to disable form submission until hyper-js has loaded. - return; - } - setIsLoading(true); - const { error } = await hyper.confirmPayment({ - widgets, - confirmParams: { - // Make sure to change this to your payment completion page - return_url: "https://example.com/complete", - }, - }); - // This point will only be reached if there is an immediate error occurring while confirming the payment. Otherwise, your customer will be redirected to your "return_url" - // For some payment flows such as Sofort, iDEAL, your customer will be redirected to an intermediate page to complete authorization of the payment, and then redirected to the "return_url". - if (error.type === "validation_error") { - setMessage(error.message); - } else { - setMessage("An unexpected error occurred."); - } - setIsLoading(false); -};` - -let nodeDisplayPaymentConfirmation: string = `//Look for a parameter called "payment_intent_client_secret" in the url which gives a payment ID, which is then used to retrieve the status of the payment - -const paymentID = new URLSearchParams(window.location.search).get( - "payment_intent_client_secret" -); - -if (!paymentID) { - return; -} - -hyper.retrievePaymentIntent(paymentID).then(({ paymentIntent }) => { - switch (paymentIntent.status) { - case "succeeded": - setMessage("Payment succeeded!"); - break; - case "processing": - setMessage("Your payment is processing."); - break; - case "requires_payment_method": - setMessage("Your payment was not successful, please try again."); - break; - default: - setMessage("Something went wrong."); - break; - } -});` diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res index e3a384156..b1207806f 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res @@ -1,6 +1,3 @@ -let headerTextCss = "font-semibold text-grey-700 text-xl" -let subTextCss = "font-normal text-grey-700 opacity-50 text-base" - let buildHyperswitch: array = [ { headerIcon: "migrate-from-stripe", diff --git a/src/screens/HyperSwitch/Settings/BusinessDetails.res b/src/screens/HyperSwitch/Settings/BusinessDetails.res index 0d1daf80e..2db63dcb1 100644 --- a/src/screens/HyperSwitch/Settings/BusinessDetails.res +++ b/src/screens/HyperSwitch/Settings/BusinessDetails.res @@ -133,7 +133,7 @@ let make = () => { validateMerchantAccountForm( ~values, ~fieldsToValidate=[PrimaryPhone, PrimaryEmail, Website, SecondaryEmail, SecondaryPhone], - ~setIsDisabled, + ~setIsDisabled=Some(setIsDisabled), ~initialData={merchantInfo->Js.Json.object_}, ) }}> diff --git a/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessMappingEntity.res b/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessMappingEntity.res index 425b75fb8..2a585cacb 100644 --- a/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessMappingEntity.res +++ b/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessMappingEntity.res @@ -51,17 +51,6 @@ let getItems: Js.Json.t => array = json => { LogicUtils.getArrayDataFromJson(json, itemToObjMapper) } -let apiKeysTableEntity = EntityType.makeEntity( - ~uri="", - ~getObjects=getItems, - ~defaultColumns, - ~allColumns, - ~getHeading, - ~dataKey="", - ~getCell, - (), -) - let businessProfileTabelEntity = showLink => EntityType.makeEntity( ~uri="", diff --git a/src/screens/HyperSwitch/Settings/HSwitchMerchantAccountUtils.res b/src/screens/HyperSwitch/Settings/HSwitchMerchantAccountUtils.res index ac05ee285..42fceaaae 100644 --- a/src/screens/HyperSwitch/Settings/HSwitchMerchantAccountUtils.res +++ b/src/screens/HyperSwitch/Settings/HSwitchMerchantAccountUtils.res @@ -396,7 +396,7 @@ let validateCustom = (key, errors, value) => { let validateMerchantAccountForm = ( ~values: Js.Json.t, ~fieldsToValidate: array, - ~setIsDisabled=?, + ~setIsDisabled, ~initialData, ) => { let errors = Js.Dict.empty() diff --git a/src/screens/HyperSwitch/UserManagement/HSwitchUserManagementUtils.res b/src/screens/HyperSwitch/UserManagement/HSwitchUserManagementUtils.res index b4ed31ea3..c1e09ca0b 100644 --- a/src/screens/HyperSwitch/UserManagement/HSwitchUserManagementUtils.res +++ b/src/screens/HyperSwitch/UserManagement/HSwitchUserManagementUtils.res @@ -156,7 +156,6 @@ let roleListResponseMapper: Js.Dict.t< > => HSwitchUserRoleEntity.roleListResponse = dict => { open LogicUtils { - permissions: dict->getStrArray("permissions"), role_id: dict->getString("role_id", ""), role_name: dict->getString("role_name", ""), } diff --git a/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res b/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res index 23afdc956..f362e2413 100644 --- a/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res +++ b/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res @@ -7,7 +7,6 @@ type userStatus = Active | InviteSent | None type userTableTypes = { user_id: string, email: string, - last_modified_at: string, name: string, role_id: string, role_name: string, @@ -39,17 +38,10 @@ let itemToObjMapperForUser = dict => { role_id: getString(dict, "role_id", ""), role_name: getString(dict, "role_name", ""), status: getString(dict, "status", ""), - last_modified_at: getString(dict, "last_modified_at", ""), } } -type roleTableTypes = { - permissions: array, - role_id: string, -} - type roleListResponse = { - permissions: array, role_id: string, role_name: string, } @@ -63,13 +55,6 @@ let getHeadingForUser = (colType: userColTypes) => { } } -let itemToObjMapperForRole = dict => { - { - permissions: dict->getStrArray("permissions"), - role_id: dict->getString("role_id", ""), - } -} - let roleToVariantMapper = role => { switch role->Js.String2.toUpperCase { | "ADMIN" => Admin diff --git a/tests/bsconfig.json b/tests/bsconfig.json deleted file mode 100644 index a0c7873e6..000000000 --- a/tests/bsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "editor-ui", - "jsx": { - "version": 4, - "mode": "classic" - }, - "bsc-flags": ["-bs-super-errors"], - "sources": [ - { - "dir": "../src", - "subdirs": true - }, - { - "dir": "../tests", - "subdirs": true, - "type": "dev" - } - ], - "suffix": ".bs.js", - "namespace": true, - "ppx-flags": [], - "package-specs": { - "module": "commonjs", - "in-source": true - }, - "bs-dev-dependencies": ["@glennsl/rescript-jest"], - "bs-dependencies": [ - "@rescript/react", - "rescript-webapi", - "bs-fetch", - "@ryyppy/rescript-promise", - "rescript-debounce-react" - ] -} diff --git a/tests/marketplace/unit_test/InitTest.res b/tests/marketplace/unit_test/InitTest.res deleted file mode 100644 index 76f513b3d..000000000 --- a/tests/marketplace/unit_test/InitTest.res +++ /dev/null @@ -1,13 +0,0 @@ -open Jest -open Expect - -let () = { - describe("Test", () => { - let expectedValue = "test" - let actualValue = "test" - - test("Test", () => { - expect(actualValue)->toEqual(expectedValue) - }) - }) -} diff --git a/webpack.common.js b/webpack.common.js index 687b6dd56..966c1a507 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -6,23 +6,10 @@ const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin" const tailwindcss = require("tailwindcss"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); -const appEntryPoint = { - hyperswitch: "hyperswitch/HyperSwitchEntry", -}; - -function getAppEntryPoint(appName) { - const path = appEntryPoint[appName]; - if (path) { - return `./src/entryPoints/${path}.bs.js`; - } else { - return undefined; - } -} - module.exports = (appName = "hyperswitch", publicPath = "auto") => { const isDevelopment = process.env.NODE_ENV !== "production"; let entryObj = { - app: getAppEntryPoint(appName), + app: `./src/entryPoints/hyperswitch/HyperSwitchEntry.bs.js`, }; return { entry: entryObj,