Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: GeoIP Interceptor + Test Cases #137

Open
wants to merge 92 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
e8d0359
fix: file upload sample
techsavvyash May 21, 2024
a431b51
(skip-ci) docs: update README
techsavvyash May 21, 2024
0e018d7
Create codeql.yml
Himasnhu-AT May 24, 2024
93806ed
implement geoip blocking
Himasnhu-AT May 26, 2024
680bcce
updated minor changes
RiyaRaj28 Jun 9, 2024
e268f1f
added config service for geoIp url
RiyaRaj28 Jun 11, 2024
92e65be
Delete sample/07-geopip-blocking/src/app.controller.spec.ts
RiyaRaj28 Jun 21, 2024
7b2a280
Delete sample/07-geopip-blocking/test/app.e2e-spec.ts
RiyaRaj28 Jun 21, 2024
4382416
fix: Consists of Suggested changes and even added test cases
DarrenDsouza7273 Jun 23, 2024
cbf686e
fix: Update geoip.interceptor.ts file
DarrenDsouza7273 Jun 24, 2024
0c64956
fix: Removed unnecessary files
DarrenDsouza7273 Jun 24, 2024
43afc36
fix: added e2e test cases
DarrenDsouza7273 Jun 24, 2024
30e4c52
added capp.controller.spec.ts
DarrenDsouza7273 Jun 25, 2024
2a2ea0e
Adds a dev setup and dev workflow guide to CONTRIBUTIING.md
gnaaruag Jul 8, 2024
6b1fc7f
Merge pull request #163 from gnaaruag/contribution-guide-add
techsavvyash Jul 9, 2024
d6a56e0
feat: tweaks + spec file
techsavvyash Jul 9, 2024
82507d1
added dto files
RiyaRaj28 Jul 2, 2024
ac039b3
updated in dev
RiyaRaj28 Jul 5, 2024
f7138d9
Fix : Readme temporal package setup (#116)
ShivamAher30 Jun 4, 2024
5c44725
Updated package.json (#119)
RiyaRaj28 Jun 6, 2024
e20c146
Fix-NPM scripts changed from nest to stencil [05-temporal-package] (#…
ShivamAher30 Jun 6, 2024
e9cae67
Update file-upload.service.ts (#115)
SurAyush Jun 6, 2024
9164759
Update README.md (#112)
SurAyush Jun 6, 2024
be4b892
Implemented Tests for different packages under common folder (#107)
SHARJIDH Jun 6, 2024
2f183ab
chore: add pull request template
techsavvyash Jun 6, 2024
e56c57b
updates cli and monitoring docs (#123)
RiyaRaj28 Jun 9, 2024
1e5399a
Created CONTRIBUTING.md (#133)
RiyaRaj28 Jun 19, 2024
41e3624
Created test.yml
RiyaRaj28 Jul 5, 2024
3a56e81
Update app.service.ts
RiyaRaj28 Jul 5, 2024
05836cd
chore: fix nits
techsavvyash Jul 6, 2024
8fa2fa4
fix: updated format
Savio629 Jun 28, 2024
fa639c8
fix: added test for response-format
Savio629 Jun 30, 2024
2334184
fix: made required changes
Savio629 Jul 2, 2024
5513899
fix: changed variable name
Savio629 Jul 2, 2024
d5a7b03
fix: failing tests and logic
techsavvyash Jul 6, 2024
06359ee
chore: cleanup'
techsavvyash Jul 6, 2024
feae927
chore: restructure
techsavvyash Jul 6, 2024
7e6b6e7
fix: file upload sample
techsavvyash May 21, 2024
de3c19e
fix: minio not picking up SSL var
techsavvyash May 29, 2024
63e5159
fix: minio
Jun 27, 2024
cfd74e0
Implemented Tests for different packages under common folder (#107)
SHARJIDH Jun 6, 2024
3923316
fix:updated all env vars
Jun 29, 2024
b0019d9
fix:added tests for download endpoint
Jun 29, 2024
a3a8bff
fix: added unit tests
Jul 5, 2024
ed7cf9d
fix: credentials changed
Jul 5, 2024
83e1225
Added Multiple FIles Upload Feature
SurAyush Jun 9, 2024
750f591
docs: merge #129
techsavvyash Jun 19, 2024
09c5f73
fix: resolve review comments
techsavvyash Jun 19, 2024
27fe777
fix: Updated File Upload
DarrenDsouza7273 Jun 26, 2024
e8d949a
fix: Updated Readme
DarrenDsouza7273 Jun 27, 2024
d0d2e94
Update README.md
DarrenDsouza7273 Jun 27, 2024
5e4d41f
fix: fixed conflicts
Savio629 Jul 6, 2024
fd01e55
fix: extra conflicts
Savio629 Jul 6, 2024
6eb56f5
fix: removed console.log
Savio629 Jul 6, 2024
c20fe3c
fix: enabled upload-file to have stability
Savio629 Jul 7, 2024
b1ee3e1
branch updated
Savio629 Jul 7, 2024
1d76839
fix: updated the branch
Savio629 Jul 7, 2024
472bf8b
fix: file upload service
techsavvyash Jul 9, 2024
b4d6d98
feat: tweaks + spec file
techsavvyash Jul 9, 2024
bc44c4c
Implemented Tests for different packages under common folder (#107)
SHARJIDH Jun 6, 2024
167e827
fix: added test for response-format
Savio629 Jun 30, 2024
d82b364
fix: failing tests and logic
techsavvyash Jul 6, 2024
2ec9d16
fix: minio not picking up SSL var
techsavvyash May 29, 2024
7852883
Implemented Tests for different packages under common folder (#107)
SHARJIDH Jun 6, 2024
c1ce0be
fix:updated all env vars
Jun 29, 2024
dc3da02
fix: added unit tests
Jul 5, 2024
e30e474
Added Multiple FIles Upload Feature
SurAyush Jun 9, 2024
db622dc
fix: extra conflicts
Savio629 Jul 6, 2024
1e6b2ea
fix: file upload service
techsavvyash Jul 9, 2024
7ba71a9
fix: update filename regex to allow spaces
techsavvyash Jul 9, 2024
af92616
feat: tweaks + spec file
techsavvyash Jul 9, 2024
81a0f4d
Implemented Tests for different packages under common folder (#107)
SHARJIDH Jun 6, 2024
c6127b0
fix: added test for response-format
Savio629 Jun 30, 2024
595e527
fix: minio not picking up SSL var
techsavvyash May 29, 2024
ab6e3a3
Implemented Tests for different packages under common folder (#107)
SHARJIDH Jun 6, 2024
3e87551
fix:updated all env vars
Jun 29, 2024
2c6c9f6
fix: added unit tests
Jul 5, 2024
00096d5
Added Multiple FIles Upload Feature
SurAyush Jun 9, 2024
763fea0
fix: file upload service
techsavvyash Jul 9, 2024
d456dc5
feat: tweaks + spec file
techsavvyash Jul 9, 2024
d09cf23
Merge branch 'dev' into Geoip-updated
Savio629 Jul 11, 2024
49bd406
chore: add commitlint config
techsavvyash Jul 16, 2024
034f683
fix: Deleted src/interceptors/test/response-time.interceptor.spec.ts
Savio629 Jul 18, 2024
cd1b608
Merge branch 'SamagraX-Stencil:main' into Geoip-updated
Savio629 Aug 10, 2024
37430b4
fix: fixed failing ci
Savio629 Aug 10, 2024
a5a72cf
fix: updated the test and some fixes
Savio629 Aug 17, 2024
5deae9f
feat: support for coord, geofence,cities
Savio629 Aug 21, 2024
935db66
fix: fixed failing yarn test
Savio629 Aug 21, 2024
e31ebe9
fix: updated the test
Savio629 Aug 21, 2024
a1b04ae
fix: updated the test1
Savio629 Aug 21, 2024
3fc07e3
fix: removed console.log
Savio629 Aug 21, 2024
8fd357c
fix: updated e2e tests
Savio629 Aug 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 50 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Contributing Guide
* [Ways to Contribute](#ways-to-contribute)
* [Find an Issue](#find-an-issue)
* [Pull Request Lifecycle](#pull-request-lifecycle)
* [Development Environment Setup](#development-environment-setup)
- [Contributing Guide](#contributing-guide)
- [Repository Structure](#repository-structure)
- [Development Setup](#development-setup)
- [Development workflow](#development-workflow)
- [For features/bug fixing](#for-featuresbug-fixing)
- [Writing and running tests](#writing-and-running-tests)
- [Pre-commit checklist](#pre-commit-checklist)
- [Ways to Contribute](#ways-to-contribute)
- [Community Issue Assignment Policy](#community-issue-assignment-policy)
- [Guidelines](#guidelines)
- [Resources](#resources)


## Repository Structure
Expand All @@ -25,6 +32,45 @@
- `docs` this folder contains the documentation for the framework. This is a docusaurus app which can be started for easy reference.


## Development Setup

To set up Stencil in your local development environment; follow the steps listed below

1. Fork the stencil repo
2. Clone your fork into any folder of your choice via `git clone https://github.com/<USERNAME>/stencil.git`
3. The `packages/common` folder corresponds to the npm package `@samagra-x/stencil`
4. Any features additoins or bug fixes are to be done here
5. Corresponding to every functionality in the `common` folder you can find an example application in the `sample` folder
6. Here's where you can realise changes made to the package and test your changes

## Development workflow

Once the repository is setup your workflow will look like the following.

### For features/bug fixing
1. Initially make changes to `packages/common/src`
2. Once changes have been made to the `src` folder you are supposed to build the package via `npm run build`. This is to be done inside the `packages/common` directory
3. Once changes are made run `npm link` in the `packages/common` directory (this creates a [symlink](https://docs.npmjs.com/cli/v9/commands/npm-link) of your modified package in the node globals and the published package is overriden)
4. Then navigate to the example app in `sample` which corresponds to the changes you have made run `npm install` to set up the dependencies. After setting up the dependencies run `npm link @samagra-x/stencil` (this lets the project know you want to use the modified package and not the published package)
5. Once the feature runs as expected continue to writing tests

### Writing and running tests

1. To write tests find the `/test`
2. In the `packages/common` you will find two kinds of tests
3. One is a `service-spec` test, where the service layer tests are defined
4. The other is an `app.e2e` test, here the application controllers are tested
5. To run the `service-spec` tests run `npm run test` and to run the `app.e2e` tests run `npm run test:e2e`
6. For every new feature or bug fix you are supposed to either write new tests or modify current test suites

### Pre-commit checklist

Before commiting and submitting pull request follow the given steps

1. Lint your code with `prettier` before your commit via `npm run lint`
2. Make sure all test suites are passing before you make your commit/pull request
3. Use `npm run test` and `npm run test:e2e` and make sure all tests are passing before making your commit

## Ways to Contribute

- As a first time contributor, navigating through the project, it can be quite daunting for you. Please make sure to go through the [repository structure](#repository-structure) to understand the project a bit better, if you want to understand the project better.
Expand Down
11 changes: 11 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['ci', 'chore', 'docs', 'ticket', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style'],
],
},
};

22 changes: 9 additions & 13 deletions packages/common/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/test/**/*.spec.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
transform: {
'^.+\\.(t|j)s$': [
'ts-jest',
{
tsconfig: 'tsconfig.json',
},
],
},
};
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/test/**/*.spec.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
transform: {
transform_regex: ['ts-jest', {tsconfig:'tsconfig.json'}],
},
};

Loading
Loading