Skip to content

Commit

Permalink
fixes: docs, analytics (#39)
Browse files Browse the repository at this point in the history
* fix: docs v1 patch

* fix: patches for catching analytics

* fix: lint
  • Loading branch information
priyanshuverma-dev authored Nov 22, 2024
1 parent 66cadd2 commit 0a9b1f8
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 49 deletions.
45 changes: 12 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,34 @@
## [1.0.2](https://github.com/KeptCodes/StatStream/compare/v1.0.1...v1.0.2) (2024-11-20)

# [1.1.0](https://github.com/KeptCodes/StatStream/compare/v1.0.2...v1.1.0) (2024-11-20)

### Bug Fixes

* origin URL matching ([#32](https://github.com/KeptCodes/StatStream/issues/32)) ([b1ff38d](https://github.com/KeptCodes/StatStream/commit/b1ff38d5cf6ed95a8f2314ddf4a6de7144ee6dda))

# 1.0.0 (2024-11-19)


* Release v2.0.0 ([#14](https://github.com/KeptCodes/StatStream/issues/14)) ([0b8ca75](https://github.com/KeptCodes/StatStream/commit/0b8ca757017e78b63570ae857e364d90cb24dfd4)), closes [#11](https://github.com/KeptCodes/StatStream/issues/11) [#12](https://github.com/KeptCodes/StatStream/issues/12) [#13](https://github.com/KeptCodes/StatStream/issues/13) [#12](https://github.com/KeptCodes/StatStream/issues/12)


### Bug Fixes

* docker deploy flow ([bb2a933](https://github.com/KeptCodes/StatStream/commit/bb2a933d8b32ac02f20d301a940a8a60913ff29a))
* gh token ([c2dc724](https://github.com/KeptCodes/StatStream/commit/c2dc724c45bfd8f6568695abae60ebf63a9fbc9c))
* github token ([9586260](https://github.com/KeptCodes/StatStream/commit/9586260d2fb3ce717e623679bfbf126ffec9597a))
* pat token ([f64530e](https://github.com/KeptCodes/StatStream/commit/f64530e8071cc0cd4333de0a2547d5227af98423))
* permissions ([bb906b8](https://github.com/KeptCodes/StatStream/commit/bb906b8abd107b52f6efe565aac8df68cac648eb))
* release only on master ([5a462f5](https://github.com/KeptCodes/StatStream/commit/5a462f5820628bc1ecadf55d94e0b783f54bba8b))
* remove dev branch to release ([bdcf2b6](https://github.com/KeptCodes/StatStream/commit/bdcf2b60ad67a0f7c6e9fec9c24e81b08aaf97ea))
* run release workflow ([18e9b15](https://github.com/KeptCodes/StatStream/commit/18e9b1523d7816fd7c53558cc4d93b3e41135c1c))
* workflow Triggers added ([0448bca](https://github.com/KeptCodes/StatStream/commit/0448bca476ae2a91f4383d6fc262794f6abc6347))

- **ci:** release workflow bun to npm ([#37](https://github.com/KeptCodes/StatStream/issues/37)) ([548cd88](https://github.com/KeptCodes/StatStream/commit/548cd88300b65c36c9ac08508f7da24457a6e9e1))
- **ci:** release workflow npm to bun ([#36](https://github.com/KeptCodes/StatStream/issues/36)) ([2e32296](https://github.com/KeptCodes/StatStream/commit/2e32296ea94ba7e734820144dda5ec39798537cb))

### Features

* adds Readme ([c2b7d05](https://github.com/KeptCodes/StatStream/commit/c2b7d05da00b15ec6f4322e74fe155ccd26a9382))
* docker deploy setup ([#4](https://github.com/KeptCodes/StatStream/issues/4)) ([eeeef1c](https://github.com/KeptCodes/StatStream/commit/eeeef1c2f2267ae371764533d74fdb13b1c917b2))
* docker deploy setup ([#5](https://github.com/KeptCodes/StatStream/issues/5)) ([8acd142](https://github.com/KeptCodes/StatStream/commit/8acd14290f5384c19c6316ddec4961fa95cde77a))
* Docker setup ([b1a725c](https://github.com/KeptCodes/StatStream/commit/b1a725c6d8149e8319a8c45ffdb167e49a2edd19))
* semantic release docker hub push ([#10](https://github.com/KeptCodes/StatStream/issues/10)) ([9eda188](https://github.com/KeptCodes/StatStream/commit/9eda188781e6482c40f6ff1e8b7da0be4a24b6ba))
* tracking url change ([#1](https://github.com/KeptCodes/StatStream/issues/1)) ([e044901](https://github.com/KeptCodes/StatStream/commit/e04490131bbdae1605cdcf5f62368e9073f33d61))
- Docs website added ([#34](https://github.com/KeptCodes/StatStream/issues/34)) ([e721cf1](https://github.com/KeptCodes/StatStream/commit/e721cf125f60e33d0332f560911b6afbbdb354a9))
- **structure:** workplace monorepo setup with docs ([#33](https://github.com/KeptCodes/StatStream/issues/33)) ([fa2bed0](https://github.com/KeptCodes/StatStream/commit/fa2bed067050e109bec2cd4383fe545cad1277b7))

## [1.0.2](https://github.com/KeptCodes/StatStream/compare/v1.0.1...v1.0.2) (2024-11-20)

### BREAKING CHANGES
### Bug Fixes

* removing tracker cdn file replacement is pushed
- origin URL matching ([#32](https://github.com/KeptCodes/StatStream/issues/32)) ([b1ff38d](https://github.com/KeptCodes/StatStream/commit/b1ff38d5cf6ed95a8f2314ddf4a6de7144ee6dda))

* fixes: coverage tests for tracker added
# 1.0.0 (2024-11-19)

# 1.0.0 (2024-11-18)
- Release v2.0.0 ([#14](https://github.com/KeptCodes/StatStream/issues/14)) ([0b8ca75](https://github.com/KeptCodes/StatStream/commit/0b8ca757017e78b63570ae857e364d90cb24dfd4)), closes [#11](https://github.com/KeptCodes/StatStream/issues/11) [#12](https://github.com/KeptCodes/StatStream/issues/12) [#13](https://github.com/KeptCodes/StatStream/issues/13) [#12](https://github.com/KeptCodes/StatStream/issues/12)

### Bug Fixes

- docker deploy flow ([bb2a933](https://github.com/KeptCodes/StatStream/commit/bb2a933d8b32ac02f20d301a940a8a60913ff29a))
- gh token ([c2dc724](https://github.com/KeptCodes/StatStream/commit/c2dc724c45bfd8f6568695abae60ebf63a9fbc9c))
- github token ([9586260](https://github.com/KeptCodes/StatStream/commit/9586260d2fb3ce717e623679bfbf126ffec9597a))
- pat token ([f64530e](https://github.com/KeptCodes/StatStream/commit/f64530e8071cc0cd4333de0a2547d5227af98423))
- permissions ([bb906b8](https://github.com/KeptCodes/StatStream/commit/bb906b8abd107b52f6efe565aac8df68cac648eb))
- docker deploy flow ([bb2a933](https://github.com/KeptCodes/StatStream/commit/bb2a933d8b32ac02f20d301a940a8a60913ff29a))
- release only on master ([5a462f5](https://github.com/KeptCodes/StatStream/commit/5a462f5820628bc1ecadf55d94e0b783f54bba8b))
- remove dev branch to release ([bdcf2b6](https://github.com/KeptCodes/StatStream/commit/bdcf2b60ad67a0f7c6e9fec9c24e81b08aaf97ea))
- run release workflow ([18e9b15](https://github.com/KeptCodes/StatStream/commit/18e9b1523d7816fd7c53558cc4d93b3e41135c1c))
- workflow Triggers added ([0448bca](https://github.com/KeptCodes/StatStream/commit/0448bca476ae2a91f4383d6fc262794f6abc6347))

Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion docker-compose.yml → packages/app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
statstream:
build: .
Expand Down
2 changes: 2 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"express": "^4.21.1",
"terser": "^5.36.0",
"winston": "^3.17.0",
"morgan": "^1.10.0",
"zod": "^3.23.8"
},
"devDependencies": {
Expand All @@ -76,6 +77,7 @@
"jest": "^29.7.0",
"semantic-release": "^24.2.0",
"supertest": "^7.0.0",
"@types/morgan": "^1.9.9",
"ts-jest": "^29.2.5",
"ts-node-dev": "^2.0.0",
"typescript": "^5.6.3",
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/api/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const trackAction = async (
});
return;
}
console.log(req.headers["x-signature"]);
const originUrl = req.headers.origin;

const locationData = await fetchLocationData(req);
Expand Down
3 changes: 3 additions & 0 deletions packages/app/src/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ const server = express();
server.use(cors());
server.use(express.json());
server.use(router);
server.use((_, res) => {
res.send("NOT FOUND");
});

export default server;
12 changes: 1 addition & 11 deletions packages/app/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@ import { Request } from "express";
import terser from "terser";

export async function fetchLocationData(req: Request) {
let clientIP: string;

if (req.headers["x-forwarded-for"]) {
if (typeof req.headers["x-forwarded-for"] === "string") {
clientIP = req.headers["x-forwarded-for"];
} else {
clientIP = req.headers["x-forwarded-for"][0].trim();
}
} else {
clientIP = req.socket.remoteAddress ?? "";
}
const clientIP = req.socket.remoteAddress ?? "";

let locationData: LocationData;

Expand Down
4 changes: 1 addition & 3 deletions packages/docs/versions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
[
"1.0.3"
]
["v1"]

0 comments on commit 0a9b1f8

Please sign in to comment.