@supernovaio/cli-next 2.0.3 → 2.0.4
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/bin/{run.js → run} +13 -13
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- /package/bin/{dev.js → dev} +0 -0
package/bin/{run.js → run}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {execute, handle} from
|
|
4
|
-
import * as Sentry from
|
|
5
|
-
import {nodeProfilingIntegration} from
|
|
6
|
-
import dotenv from
|
|
3
|
+
import { execute, handle } from "@oclif/core"
|
|
4
|
+
import * as Sentry from "@sentry/node"
|
|
5
|
+
import { nodeProfilingIntegration } from "@sentry/profiling-node"
|
|
6
|
+
import dotenv from "dotenv"
|
|
7
7
|
|
|
8
8
|
// Load environment variables from .env file
|
|
9
9
|
dotenv.config()
|
|
10
10
|
|
|
11
|
-
const SENSITIVE_KEYS = new Set([
|
|
11
|
+
const SENSITIVE_KEYS = new Set(["password", "secret", "token"])
|
|
12
12
|
|
|
13
|
-
const sanitizeEvent =
|
|
13
|
+
const sanitizeEvent = event => {
|
|
14
14
|
if (event.request?.data) {
|
|
15
15
|
event.request.data = maskValues(event.request.data)
|
|
16
16
|
}
|
|
@@ -18,7 +18,7 @@ const sanitizeEvent = (event) => {
|
|
|
18
18
|
return event
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const sanitizeBreadcrumb =
|
|
21
|
+
const sanitizeBreadcrumb = breadcrumb => {
|
|
22
22
|
if (breadcrumb.data) {
|
|
23
23
|
breadcrumb.data = maskValues(breadcrumb.data)
|
|
24
24
|
}
|
|
@@ -27,9 +27,9 @@ const sanitizeBreadcrumb = (breadcrumb) => {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
30
|
-
const maskValues =
|
|
30
|
+
const maskValues = obj =>
|
|
31
31
|
Object.keys(obj).reduce((acc, key) => {
|
|
32
|
-
acc[key] = SENSITIVE_KEYS.has(key) ?
|
|
32
|
+
acc[key] = SENSITIVE_KEYS.has(key) ? "[REDACTED]" : obj[key]
|
|
33
33
|
return acc
|
|
34
34
|
}, {})
|
|
35
35
|
|
|
@@ -44,14 +44,14 @@ Sentry.init({
|
|
|
44
44
|
return sanitizeEvent(transaction)
|
|
45
45
|
},
|
|
46
46
|
debug: false,
|
|
47
|
-
dsn:
|
|
48
|
-
ignoreErrors: [
|
|
47
|
+
dsn: "https://9d6591df6378a22920996bd4d12722e3@o337704.ingest.us.sentry.io/4508840260730880",
|
|
48
|
+
ignoreErrors: ["NotAuthorizedError"],
|
|
49
49
|
integrations: [nodeProfilingIntegration()],
|
|
50
50
|
profilesSampleRate: 1,
|
|
51
51
|
tracesSampleRate: 1,
|
|
52
52
|
})
|
|
53
53
|
|
|
54
|
-
await Sentry.startSpan({name:
|
|
55
|
-
execute({dir: import.meta.url}).catch(
|
|
54
|
+
await Sentry.startSpan({ name: "cli", forceTransaction: true }, () =>
|
|
55
|
+
execute({ dir: import.meta.url }).catch(err => handle(err)),
|
|
56
56
|
)
|
|
57
57
|
await Sentry.flush(1000)
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
/package/bin/{dev.js → dev}
RENAMED
|
File without changes
|