Skip to content

Commit

Permalink
Merge branch: main
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokesh Jain committed Dec 8, 2023
2 parents 8cd1207 + eebc924 commit 1177576
Show file tree
Hide file tree
Showing 186 changed files with 2,934 additions and 3,813 deletions.
48 changes: 39 additions & 9 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
#!/bin/sh

echo "~~~~**** Commit hook started ****~~~~"
echo "*****~~~~~ Commit hook initiated ~~~~~~*****"

commit_msg_file=$1
commit_msg=$(cat "$commit_msg_file")


# For formatting your code
npx prettier --write .
echo
echo "*****~~~~~ Formatting - Check for unformatted files ~~~~~~*****"

# Check for unformatted JavaScript and JSON files using Prettier
unformatted_js_files=$(git ls-files | grep '\.js\|\.json' | xargs npx prettier --list-different)

# If there are unformatted JavaScript, TypeScript, or JSON files, print an error message and exit with a non-zero status code
if [ -n "$unformatted_js_files" ]; then
echo "Error: Unformatted JavaScript, YML or JSON files found. Please run 'npx prettier --write .' for formatting whole repository or 'npx prettier --write' on the following files:"
echo "$unformatted_js_files"
exit 1
fi

# Check for unformatted ReScript files
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).+"
echo
echo "*****~~~~~ All files are formatted. ~~~~~~*****"
echo

echo
echo "*****~~~~~ Commit message validation! ~~~~~*****"
echo
# 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 - <feat>: <subject> - <description>"
if git log --show-signature -n 1 | grep -q 'gpg:'; 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: <subject> - <description>'"
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'"
echo "Signing commits is crucial for verifying contributions. Consult GitHub's documentation on commit signature verification for guidance: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
exit 1
fi

# If the commit message matches the convention, the script exits successfully.
echo "~~~~**** Commit hook completed ****~~~~"
echo
echo "*****~~~~~ Commit hook completed ~~~~~~*****"
echo
exit 0
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ Or did you test this change manually (provide relevant screenshots)?
- [ ] I ran `npm run re:build`
- [ ] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
28 changes: 14 additions & 14 deletions .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Release a new hyperswitch version

# on:
# schedule:
# - cron: "30 14 * * 0-4" # Run workflow at 8 PM IST every Sunday-Thursday
on:
schedule:
- cron: "30 14 * * 0-4" # Run workflow at 8 PM IST every Sunday-Thursday

# workflow_dispatch:
workflow_dispatch:

# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request_target:
types:
- closed
# on:
# pull_request_target:
# types:
# - closed

env:
# Allow more retries for network requests in cargo (downloading crates) and
Expand All @@ -30,9 +30,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
# with:
# fetch-depth: 0
# token: ${{ secrets.AUTO_RELEASE_PAT }}
with:
fetch-depth: 0
token: ${{ secrets.AUTO_RELEASE_PAT }}

- name: Install Rust
uses: dtolnay/rust-toolchain@master
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHANGELOG.md
*euclid*
81 changes: 73 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,83 @@
# Changelog

All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.

---
- - -

## 1.3.1 (2023-12-07)

### Bug Fixes

- Euclid wasm minimum amount ([#78](https://github.com/juspay/hyperswitch-control-center/pull/78)) ([`2f730e0`](https://github.com/juspay/hyperswitch-control-center/commit/2f730e0602e49dd11a8e0790df91941b91e1577b))
- Update wasm file to fix minimum amount ([`ea1b8fe`](https://github.com/juspay/hyperswitch-control-center/commit/ea1b8fefdf83a583d115467e78e10c68b4a1145e))

## 1.1.0 (2023-11-29)
**Full Changelog:** [`v1.3.0...v1.3.1`](https://github.com/juspay/hyperswitch-control-center/compare/v1.3.0...v1.3.1)

- - -


## 1.3.0 (2023-12-07)

### Features

- Add-release-new-version-action ([`880a10e`](https://github.com/juspay/hyperswitch-control-center/commit/880a10e0695284bb76a6e4cf156774a8a6e0fb01))
- Add change log template ([`9475c4a`](https://github.com/juspay/hyperswitch-control-center/commit/9475c4a2863c12110a4f8bf2826fa68cdba7ab09))
- Profile id and profile name concat ([#73](https://github.com/juspay/hyperswitch-control-center/pull/73)) ([`8266a95`](https://github.com/juspay/hyperswitch-control-center/commit/8266a95ede73e2b66677d7d1046c4271c8fbd526))
- New connector Icons and Searchbar for connector ([#46](https://github.com/juspay/hyperswitch-control-center/pull/46)) ([`2717c0d`](https://github.com/juspay/hyperswitch-control-center/commit/2717c0d3f09807022f53929ddd244aed3c28034d))

### Bug Fixes

- Default card layout ([#70](https://github.com/juspay/hyperswitch-control-center/pull/70)) ([`b7690bc`](https://github.com/juspay/hyperswitch-control-center/commit/b7690bc569895ce0d92425314bcfc783f8d3365f))
- Top 5 errors fix ([#60](https://github.com/juspay/hyperswitch-control-center/pull/60)) ([`d5b19d6`](https://github.com/juspay/hyperswitch-control-center/commit/d5b19d67ea6cc7e07153b0bfb58ca4beedf1a594))
- SDK code refactoring and return URL addition ([#72](https://github.com/juspay/hyperswitch-control-center/pull/72)) ([`d77b875`](https://github.com/juspay/hyperswitch-control-center/commit/d77b875b9e1c872985678975d4651f6cc90ac364))
- SDK Go to payment fix in Success Status ([#74](https://github.com/juspay/hyperswitch-control-center/pull/74)) ([`66ea60b`](https://github.com/juspay/hyperswitch-control-center/commit/66ea60b321bdd3efd7980a99e007135f29998951))
- Payment settings added under developers ([#77](https://github.com/juspay/hyperswitch-control-center/pull/77)) ([`592ce41`](https://github.com/juspay/hyperswitch-control-center/commit/592ce413fb529847c1428197f18420e6f2a28d66))

### Miscellaneous Tasks

- Response warnings removed ([#68](https://github.com/juspay/hyperswitch-control-center/pull/68)) ([`7427f10`](https://github.com/juspay/hyperswitch-control-center/commit/7427f1051dc6e88258699a90cef3453f66fe5f98))
- User Management File Changes ([#76](https://github.com/juspay/hyperswitch-control-center/pull/76)) ([`8807933`](https://github.com/juspay/hyperswitch-control-center/commit/8807933a676f8041eab5cbc5b833ed06e17a76eb))

**Full Changelog:** [`v1.2.0...v1.3.0`](https://github.com/juspay/hyperswitch-control-center/compare/v1.2.0...v1.3.0)

- - -


## 1.2.0 (2023-12-06)

### Features

- Bankofamerica addition in prod ([#69](https://github.com/juspay/hyperswitch-control-center/pull/69)) ([`bf6bde8`](https://github.com/juspay/hyperswitch-control-center/commit/bf6bde89eaaf3c443e07c191b42d2a9293377130))
- Support oss auth flow ([#64](https://github.com/juspay/hyperswitch-control-center/pull/64)) ([`59601ec`](https://github.com/juspay/hyperswitch-control-center/commit/59601ec4449505ff4fcd1e048d6ced78997062a9))

### Bug Fixes

- 3ds code refactor and bugfixes ([#61](https://github.com/juspay/hyperswitch-control-center/pull/61)) ([`9d4f503`](https://github.com/juspay/hyperswitch-control-center/commit/9d4f5036b458b671f4f1899619d891f74e936b8f))
- Commit-msg file changes & README.md file updated. ([#65](https://github.com/juspay/hyperswitch-control-center/pull/65)) ([`96a81e0`](https://github.com/juspay/hyperswitch-control-center/commit/96a81e0363ade432fb288cc59a5dfb64ad029e48))
- Update README.md ([#66](https://github.com/juspay/hyperswitch-control-center/pull/66)) ([`1930bd2`](https://github.com/juspay/hyperswitch-control-center/commit/1930bd294de22a962304c4389426b741429fd1dc))
- Live Mode SDK Fixes. ([#67](https://github.com/juspay/hyperswitch-control-center/pull/67)) ([`844920b`](https://github.com/juspay/hyperswitch-control-center/commit/844920b6fd09aa07edbf33ba83ff2aaa394c7a78))

**Full Changelog:** [`v1.1.0...v1.2.0`](https://github.com/juspay/hyperswitch-control-center/compare/v1.1.0...v1.2.0)

- - -


## 1.1.0 (2023-12-05)

### Features

- Business profile UI changes ([#51](https://github.com/juspay/hyperswitch-control-center/pull/51)) ([`7d2a443`](https://github.com/juspay/hyperswitch-control-center/commit/7d2a4430980539977a8e8ddfd9d959547549258a))

### Bug Fixes

- Warning icon added ([#59](https://github.com/juspay/hyperswitch-control-center/pull/59)) ([`4fbaee4`](https://github.com/juspay/hyperswitch-control-center/commit/4fbaee4bf0b1b65b08513bd9208e49f154911ae0))
- Optional test live mode removal & typo fix ([#63](https://github.com/juspay/hyperswitch-control-center/pull/63)) ([`9466057`](https://github.com/juspay/hyperswitch-control-center/commit/94660575566729f1b6a8013e9d09e1a4bc8cff20))

### Miscellaneous Tasks

- Signed commit added. ([#62](https://github.com/juspay/hyperswitch-control-center/pull/62)) ([`4f69afe`](https://github.com/juspay/hyperswitch-control-center/commit/4f69afe1946bd431fb6e8a31ee621358ff28ad12))
- Cleanup Configs ([#48](https://github.com/juspay/hyperswitch-control-center/pull/48)) ([`5bfae97`](https://github.com/juspay/hyperswitch-control-center/commit/5bfae972ac4cd2f367d26317c203b2c9d425535d))
- Dead code removal ([#55](https://github.com/juspay/hyperswitch-control-center/pull/55)) ([`b220415`](https://github.com/juspay/hyperswitch-control-center/commit/b220415bc390a5129e82e1b59dc6115a35cb6f84))

**Full Changelog:** [`v1.0.2...v1.1.0`](https://github.com/juspay/hyperswitch-control-center/compare/v1.0.2...v1.1.0)
**Full Changelog:** [`v1.0.5...v1.1.0`](https://github.com/juspay/hyperswitch-control-center/compare/v1.0.5...v1.1.0)

---
- - -

Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto).
Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto).
88 changes: 74 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ The `home_page` feature flag controls whether the dashboard home page is enabled

The `test_live_toggle` feature flag enables users to toggle between test and live modes when signing in. When enabled, users will see an option during sign-in to actively switch between test and live environments.

#### Test Live Mode
#### Is Live Mode

The `test_live_mode` feature flag enables displaying the current mode - test or live - that the user is accessing. When enabled, it will show a visual indicator within the dashboard signaling whether the user is currently in a test environment or live production environment.
The `is_live_mode` feature flag enables the live mode - that the user is accessing. When enabled, it will show a visual indicator within the dashboard signaling whether the user is currently in a test environment or live production environment.

#### Magic Link

Expand All @@ -152,18 +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.

---

## Deployment
Expand Down Expand Up @@ -275,10 +263,82 @@ curl https://raw.githubusercontent.com/juspay/hyperswitch-control-center/main/aw

---

## Versioning

For a detailed list of changes made in each version, please refer to the [CHANGELOG](./CHANGELOG.md) file.

---

## Contributing

We welcome contributions from the community! If you would like to contribute to Hyperswitch, please follow our contribution guidelines.

### Commit Conventions

We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages. Each commit message should have a structured format:

`<type>(<subject>): <description>`

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: <subject> - <description>`

### Signing Commits

All commits should be signed to verify the authenticity of contributors. Follow the steps below to sign your commits:

1. Generate a GPG key if you haven't already:

```bash
gpg --gen-key
```

2. List your GPG keys and copy the GPG key ID::

```bash
gpg --list-secret-keys --keyid-format LONG
```

#### Identify the GPG key you want to add to your GitHub account.

a. Run the following command to export your GPG public key in ASCII-armored format:

```bash
gpg --armor --export <GPG_KEY_ID>
Replace <GPG_KEY_ID> with the actual key ID.
```

b. Copy the entire output, including the lines that start with "-----BEGIN PGP PUBLIC KEY BLOCK-----" and "-----END PGP PUBLIC KEY BLOCK-----".

c. Go to your GitHub Settings.

d. Click on "SSH and GPG keys" in the left sidebar.

e. Click the "New GPG key" button.

f. Paste your GPG public key into the provided text box.

g. Click the "Add GPG key" button.

h. Now your GPG public key is associated with your GitHub account, and you can sign your commits for added security.

3. Configure Git to use your GPG key:

```bash
git config --global user.signingkey <GPG_KEY_ID>
```

4. Set Git to sign all your commits by default:

```bash
git config --global commit.gpgSign true
```

5. Commit your changes with the -S option to sign the commit:
```bash
git commit -S -m "your commit message"
```

For further assistance, please refer to the [GitHub documentation on signing commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).

---

## License
Expand Down
10 changes: 4 additions & 6 deletions config/FeatureFlag.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"test_live_toggle": false,
"test_live_mode": false,
"is_live_mode": false,
"magic_link": false,
"production_access": false,
"quick_start": false,
"stripe_plus_paypal": false,
"woocommerce": false,
"open_sdk": false,
"switch_merchant": false,
"audit_trail": false,
"system_metrics": false,
Expand All @@ -21,5 +18,6 @@
"mixpanel": false,
"business_profile": false,
"generate_report": false,
"forgot_password": false
}
"forgot_password": false,
"oss_build": true
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 7 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
{
"name": "rescript-euler-dashboard",
"version": "1.0.2",
"name": "hyperswitch-dashboard",
"version": "1.0.5",
"main": "index.js",
"author": "Shiva Nandan <[email protected]>",
"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": {
Expand Down
Loading

0 comments on commit 1177576

Please sign in to comment.