@syntropysoft/syntropyfront 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/index.d.ts +65 -0
- package/package.json +8 -4
package/LICENSE
CHANGED
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
same page as the copyright notice for easier identification within
|
|
190
190
|
third-party archives.
|
|
191
191
|
|
|
192
|
-
Copyright
|
|
192
|
+
Copyright 2026 Syntropysoft
|
|
193
193
|
|
|
194
194
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
195
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -101,10 +101,10 @@ syntropyFront.configure({
|
|
|
101
101
|
## 📦 Installation
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
|
|
104
|
+
pnpm add @syntropysoft/syntropyfront
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
## 🚀 **Performance
|
|
107
|
+
## 🚀 **Quality & Performance (v0.4.2)**
|
|
108
108
|
|
|
109
109
|
SyntropyFront has been optimized for maximum performance and minimal bundle size:
|
|
110
110
|
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Syntropysoft
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface SyntropyFrontConfig {
|
|
18
|
+
maxEvents?: number;
|
|
19
|
+
endpoint?: string | null;
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
usePersistentBuffer?: boolean;
|
|
22
|
+
captureClicks?: boolean;
|
|
23
|
+
captureFetch?: boolean;
|
|
24
|
+
captureErrors?: boolean;
|
|
25
|
+
captureUnhandledRejections?: boolean;
|
|
26
|
+
onError?: (error: Error, context?: any) => void;
|
|
27
|
+
fetch?: {
|
|
28
|
+
url: string;
|
|
29
|
+
options?: {
|
|
30
|
+
headers?: Record<string, string>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface AgentStats {
|
|
36
|
+
isBufferActive: boolean;
|
|
37
|
+
pendingItems: number;
|
|
38
|
+
totalTransmitted: number;
|
|
39
|
+
failedTransmissions: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface SyntropyFrontStats {
|
|
43
|
+
isActive: boolean;
|
|
44
|
+
breadcrumbs: number;
|
|
45
|
+
agent: AgentStats;
|
|
46
|
+
config: SyntropyFrontConfig;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class SyntropyFront {
|
|
50
|
+
isActive: boolean;
|
|
51
|
+
config: SyntropyFrontConfig;
|
|
52
|
+
|
|
53
|
+
init(): void;
|
|
54
|
+
configure(config: SyntropyFrontConfig): void;
|
|
55
|
+
addBreadcrumb(category: string, message: string, data?: any): void;
|
|
56
|
+
getBreadcrumbs(): any[];
|
|
57
|
+
clearBreadcrumbs(): void;
|
|
58
|
+
sendError(error: Error | string, context?: any): any;
|
|
59
|
+
flush(): Promise<void>;
|
|
60
|
+
getStats(): SyntropyFrontStats;
|
|
61
|
+
destroy(): void;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare const syntropyFront: SyntropyFront;
|
|
65
|
+
export default syntropyFront;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntropysoft/syntropyfront",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "🚀 Observability library with automatic capture - Just 1 line of code! Automatically captures clicks, errors, HTTP calls, and console logs with flexible error handling.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "rollup -c",
|
|
24
24
|
"build:watch": "rollup -c -w",
|
|
25
|
-
"dev": "
|
|
25
|
+
"dev": "pnpm run build:watch",
|
|
26
26
|
"test": "jest",
|
|
27
27
|
"test:watch": "jest --watch",
|
|
28
28
|
"test:coverage": "jest --config jest.config.coverage.cjs",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"clean": "rm -rf dist",
|
|
33
33
|
"lint": "eslint src --ext .js",
|
|
34
34
|
"lint:fix": "eslint src --ext .js --fix",
|
|
35
|
-
"
|
|
35
|
+
"postbuild": "cp src/index.d.ts dist/index.d.ts",
|
|
36
|
+
"prepublishOnly": "pnpm run clean && pnpm run build && pnpm test"
|
|
36
37
|
},
|
|
37
38
|
"keywords": [
|
|
38
39
|
"frontend",
|
|
@@ -118,7 +119,10 @@
|
|
|
118
119
|
"pnpm": {
|
|
119
120
|
"overrides": {
|
|
120
121
|
"serialize-javascript": "^7.0.3"
|
|
121
|
-
}
|
|
122
|
+
},
|
|
123
|
+
"ignoredBuiltDependencies": [
|
|
124
|
+
"unrs-resolver"
|
|
125
|
+
]
|
|
122
126
|
},
|
|
123
127
|
"browserslist": [
|
|
124
128
|
"> 1%",
|