@stacksjs/types 0.75.16 → 0.75.17

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/dist/hashing.d.ts CHANGED
@@ -13,6 +13,7 @@
13
13
  */
14
14
  export declare interface HashingOptions {
15
15
  driver: 'argon2' | 'argon2id' | 'argon2i' | 'argon2d' | 'bcrypt'
16
+ rehashOnLogin?: boolean
16
17
  bcrypt?: BcryptOptions
17
18
  argon2?: ArgonOptions
18
19
  }
package/dist/logging.d.ts CHANGED
@@ -54,6 +54,26 @@ export declare interface LogTransport {
54
54
  log: (record: LogRecord) => void
55
55
  flush?: () => Promise<void>
56
56
  }
57
+ /**
58
+ * LogHQ delivery configured alongside the ordinary console and file logger.
59
+ *
60
+ * The ingest key selects the LogHQ project. `project` is also attached to each
61
+ * entry as searchable context, which is useful when one key receives logs from
62
+ * more than one Stacks process.
63
+ */
64
+ export declare interface LogHqLoggingOptions {
65
+ key?: string
66
+ baseUrl?: string
67
+ project?: string
68
+ level?: LogLevel
69
+ enabled?: boolean
70
+ environments?: readonly string[]
71
+ batchSize?: number
72
+ flushInterval?: number
73
+ maxQueueSize?: number
74
+ timeout?: number
75
+ maxRetries?: number
76
+ }
57
77
  /**
58
78
  * **Logging Options**
59
79
  *
@@ -67,6 +87,7 @@ export declare interface LoggingOptions {
67
87
  level?: LogLevel
68
88
  format?: 'json' | 'text'
69
89
  writeToFile?: boolean
90
+ loghq?: LogHqLoggingOptions
70
91
  transports?: LogTransport[]
71
92
  }
72
93
  /**
@@ -5,8 +5,51 @@
5
5
  * error-tracking views and actions). Stays inert at boot when `enabled`
6
6
  * is `false`.
7
7
  */
8
+ export declare interface ErrorReportContext {
9
+ requestId?: string
10
+ url?: string
11
+ method?: string
12
+ userId?: string | number
13
+ ip?: string
14
+ userAgent?: string
15
+ status?: number
16
+ label?: string
17
+ [key: string]: unknown
18
+ }
19
+ export declare interface ErrorReport {
20
+ error: Error
21
+ context?: ErrorReportContext
22
+ }
23
+ /**
24
+ * A synchronous error-reporting destination.
25
+ *
26
+ * Network reporters buffer in `report()` and drain in `flush()`, so an error
27
+ * path never waits on another service or trades the original failure for a
28
+ * reporting failure.
29
+ */
30
+ export declare interface ErrorReporter {
31
+ name: string
32
+ report: (event: ErrorReport) => void
33
+ flush?: () => Promise<void>
34
+ }
35
+ /** BugHQ delivery configured through `config/monitoring.ts`. */
36
+ export declare interface BugHqMonitoringOptions {
37
+ key?: string
38
+ dsn?: string
39
+ host?: string
40
+ project?: string
41
+ release?: string
42
+ enabled?: boolean
43
+ environments?: readonly string[]
44
+ sampleRate?: number
45
+ dedupeMs?: number
46
+ maxRetries?: number
47
+ flushTimeout?: number
48
+ }
8
49
  export declare interface MonitoringOptions {
9
50
  enabled?: boolean
10
51
  env?: string[]
52
+ bughq?: BugHqMonitoringOptions
53
+ reporters?: ErrorReporter[]
11
54
  }
12
55
  export type MonitoringConfig = Partial<MonitoringOptions>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.75.16",
4
+ "version": "0.75.17",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -58,9 +58,9 @@
58
58
  "dependencies": {
59
59
  "@stacksjs/bunpress": "^0.2.8",
60
60
  "@stacksjs/clapp": "^0.2.12",
61
- "@stacksjs/events": "0.75.16",
62
- "@stacksjs/strings": "0.75.16",
63
- "@stacksjs/stx": "^0.2.323",
61
+ "@stacksjs/events": "0.75.17",
62
+ "@stacksjs/strings": "0.75.17",
63
+ "@stacksjs/stx": "^0.2.324",
64
64
  "@stacksjs/ts-validation": "^0.5.6",
65
65
  "bun-query-builder": "^0.3.0"
66
66
  },
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "devDependencies": {
76
- "@stacksjs/validation": "0.75.16",
76
+ "@stacksjs/validation": "0.75.17",
77
77
  "better-dx": "^0.2.24",
78
78
  "meilisearch": "^0.59.0"
79
79
  },