usetraceforge 0.1.6 → 0.1.8
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/README.md +13 -1
- package/dist/next-plugin.d.ts +1 -0
- package/dist/next-plugin.js +23 -0
- package/dist/react.js +1 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
TraceForge JavaScript SDK for sending errors to your TraceForge backend.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 🪄 The 2-Click Installation (Recommended)
|
|
6
|
+
|
|
7
|
+
The easiest way to install and configure TraceForge in a Next.js or Node.js app is to use our interactive CLI wizard. It will automatically install the SDK and write the configuration code for you!
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx usetraceforge-cli init
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
That's it! If you prefer to do it manually, read the manual instructions below.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Manual Installation
|
|
6
18
|
|
|
7
19
|
```bash
|
|
8
20
|
npm install usetraceforge
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function withTraceForgeConfig(nextConfig?: any): any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
export function withTraceForgeConfig(nextConfig = {}) {
|
|
3
|
+
return {
|
|
4
|
+
...nextConfig,
|
|
5
|
+
webpack(config, options) {
|
|
6
|
+
// Add our custom loader to the Webpack rules
|
|
7
|
+
config.module.rules.push({
|
|
8
|
+
test: /app\/api\/.*\/route\.(ts|js|tsx|jsx)$/,
|
|
9
|
+
use: [
|
|
10
|
+
{
|
|
11
|
+
// Point to our compiled CommonJS loader
|
|
12
|
+
loader: path.resolve(__dirname, 'webpack-loader.cjs'),
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
});
|
|
16
|
+
// Call the user's existing webpack config if they have one
|
|
17
|
+
if (typeof nextConfig.webpack === 'function') {
|
|
18
|
+
return nextConfig.webpack(config, options);
|
|
19
|
+
}
|
|
20
|
+
return config;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
package/dist/react.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "usetraceforge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TraceForge JavaScript SDK for sending errors to a TraceForge ingest endpoint.",
|
|
6
6
|
"type": "module",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"./next": {
|
|
41
41
|
"types": "./dist/next.d.ts",
|
|
42
42
|
"import": "./dist/next.js"
|
|
43
|
+
},
|
|
44
|
+
"./next-plugin": {
|
|
45
|
+
"import": "./dist/next-plugin.js"
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
"files": [
|