Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ jobs:

strategy:
matrix:
node-version: [18, 20, 22]
node-version: [20, 22]

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cd apps/log-blaster && pnpm start # Node.js CLI stress-test tool

### Core Components (packages/core/src/)

- **client.ts** - `GunsoleClient<Tags>` class: main API for logging (`log()`, `info()`, `debug()`, `warn()`, `error()`), user/session tracking, log batching, global error handler, `destroy()` lifecycle method
- **client.ts** - `GunsoleClient<Tags>` class: main API for logging (`log()`, `info()`, `debug()`, `warn()`, `error()`, `fatal()`), user/session tracking, log batching, global error handler (uses `fatal` level), `destroy()` lifecycle method
- **transport.ts** - HTTP layer with retry logic (exponential backoff, max 3 retries), gzip compression via native Compression Streams API (disabled when `isDebug: true`)
- **config.ts** - Configuration validation and endpoint resolution by mode (cloud/desktop/local), supports custom `fetch` implementation
- **factory.ts** - `createGunsoleClient<Tags>()` factory function
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 push1kb
Copyright (c) 2026 push1kb

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion apps/angular-app/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "pnpm"
"packageManager": "pnpm",
"analytics": false
},
"newProjectRoot": "projects",
"projects": {
Expand Down
5 changes: 2 additions & 3 deletions apps/angular-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"watch": "ng build --watch --configuration development"
},
"prettier": {
"printWidth": 100,
Expand All @@ -31,7 +30,7 @@
"@angular/router": "^21.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"@gunsole/core": "workspace:*"
"@gunsole/web": "workspace:*"
},
"devDependencies": {
"@angular/build": "^21.0.2",
Expand Down
1 change: 1 addition & 0 deletions apps/angular-app/public/angular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions apps/angular-app/public/gunsole.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 32 additions & 1 deletion apps/angular-app/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,42 @@
import {
type ApplicationConfig,
ErrorHandler,
provideBrowserGlobalErrorListeners,
} from "@angular/core";
import { provideRouter } from "@angular/router";
import { createGunsoleClient } from "@gunsole/web";

import { routes } from "./app.routes";

const gunsole = createGunsoleClient({
projectId: "test-project-angular",
apiKey: "test-api-key",
mode: "local",
env: "development",
appName: "Angular App",
appVersion: "1.0.0",
defaultTags: { framework: "angular" },
});

class GunsoleErrorHandler implements ErrorHandler {
handleError(error: unknown): void {
const err = error instanceof Error ? error : new Error(String(error));
gunsole.fatal({
message: err.message,
bucket: "fatal",
context: {
name: err.name,
stack: err.stack,
},
});
console.error(err);
}
}

export const appConfig: ApplicationConfig = {
providers: [provideBrowserGlobalErrorListeners(), provideRouter(routes)],
providers: [
provideBrowserGlobalErrorListeners(),
provideRouter(routes),
{ provide: ErrorHandler, useClass: GunsoleErrorHandler },
],
};
Loading