@strav/devtools 0.1.0 → 0.1.5

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 CHANGED
@@ -1,20 +1,20 @@
1
- # @stravigor/devtools
1
+ # @strav/devtools
2
2
 
3
- Debug inspector and performance monitor for the [Strav](https://www.npmjs.com/package/@stravigor/core) framework. Request inspector, SQL query profiler, exception tracker, log viewer, and APM dashboard.
3
+ Debug inspector and performance monitor for the [Strav](https://www.npmjs.com/package/@strav/core) framework. Request inspector, SQL query profiler, exception tracker, log viewer, and APM dashboard.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- bun add -d @stravigor/devtools
8
+ bun add -d @strav/devtools
9
9
  bun strav install devtools
10
10
  ```
11
11
 
12
- Requires `@stravigor/core` as a peer dependency.
12
+ Requires `@strav/core` as a peer dependency.
13
13
 
14
14
  ## Setup
15
15
 
16
16
  ```ts
17
- import { DevtoolsProvider } from '@stravigor/devtools'
17
+ import { DevtoolsProvider } from '@strav/devtools'
18
18
 
19
19
  app.use(new DevtoolsProvider())
20
20
  ```
@@ -41,7 +41,7 @@ Recorders aggregate data for performance monitoring:
41
41
  ## Usage
42
42
 
43
43
  ```ts
44
- import { devtools } from '@stravigor/devtools'
44
+ import { devtools } from '@strav/devtools'
45
45
 
46
46
  // Access collector data programmatically
47
47
  const entries = await devtools.entries({ type: 'request', limit: 50 })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/devtools",
3
- "version": "0.1.0",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "Debug inspector and performance monitor for the Strav framework",
6
6
  "license": "MIT",
@@ -18,10 +18,10 @@
18
18
  "tsconfig.json"
19
19
  ],
20
20
  "peerDependencies": {
21
- "@strav/kernel": "0.1.0",
22
- "@strav/http": "0.1.0",
23
- "@strav/database": "0.1.0",
24
- "@strav/cli": "0.1.0"
21
+ "@strav/kernel": "0.1.4",
22
+ "@strav/http": "0.1.4",
23
+ "@strav/database": "0.1.4",
24
+ "@strav/cli": "0.1.4"
25
25
  },
26
26
  "scripts": {
27
27
  "test": "bun test tests/",
@@ -1,5 +1,5 @@
1
- import { Emitter } from '@stravigor/kernel'
2
- import type { Listener } from '@stravigor/kernel'
1
+ import { Emitter } from '@strav/kernel'
2
+ import type { Listener } from '@strav/kernel'
3
3
  import Collector from './collector.ts'
4
4
  import type EntryStore from '../storage/entry_store.ts'
5
5
  import type { CollectorOptions } from '../types.ts'
@@ -1,5 +1,5 @@
1
- import { Emitter } from '@stravigor/kernel'
2
- import type { Listener } from '@stravigor/kernel'
1
+ import { Emitter } from '@strav/kernel'
2
+ import type { Listener } from '@strav/kernel'
3
3
  import Collector from './collector.ts'
4
4
  import type EntryStore from '../storage/entry_store.ts'
5
5
  import type { CollectorOptions } from '../types.ts'
@@ -1,5 +1,5 @@
1
- import { Emitter } from '@stravigor/kernel'
2
- import type { Listener } from '@stravigor/kernel'
1
+ import { Emitter } from '@strav/kernel'
2
+ import type { Listener } from '@strav/kernel'
3
3
  import Collector from './collector.ts'
4
4
  import type EntryStore from '../storage/entry_store.ts'
5
5
  import type { CollectorOptions } from '../types.ts'
@@ -1,4 +1,4 @@
1
- import type { Context, Middleware, Next } from '@stravigor/http'
1
+ import type { Context, Middleware, Next } from '@strav/http'
2
2
  import Collector from './collector.ts'
3
3
  import DevtoolsManager from '../devtools_manager.ts'
4
4
  import type EntryStore from '../storage/entry_store.ts'
@@ -16,7 +16,7 @@ interface RequestCollectorOptions extends CollectorOptions {
16
16
  * body, and response status.
17
17
  *
18
18
  * @example
19
- * import { devtools } from '@stravigor/devtools'
19
+ * import { devtools } from '@strav/devtools'
20
20
  * router.use(devtools.middleware())
21
21
  */
22
22
  export default class RequestCollector extends Collector {
@@ -1,6 +1,6 @@
1
1
  import type { Command } from 'commander'
2
2
  import chalk from 'chalk'
3
- import { bootstrap, shutdown } from '@stravigor/cli'
3
+ import { bootstrap, shutdown } from '@strav/cli'
4
4
  import DevtoolsManager from '../devtools_manager.ts'
5
5
 
6
6
  export function register(program: Command): void {
@@ -1,4 +1,4 @@
1
- import type { Context, Middleware, Next } from '@stravigor/http'
1
+ import type { Context, Middleware, Next } from '@strav/http'
2
2
 
3
3
  /**
4
4
  * Authorization gate for the devtools dashboard.
@@ -7,7 +7,7 @@ import type { Context, Middleware, Next } from '@stravigor/http'
7
7
  * Pass a custom guard function for production access control.
8
8
  *
9
9
  * @example
10
- * import { dashboardAuth } from '@stravigor/devtools/dashboard/middleware'
10
+ * import { dashboardAuth } from '@strav/devtools/dashboard/middleware'
11
11
  *
12
12
  * // Default: local environment only
13
13
  * router.group({ prefix: '/_devtools', middleware: [dashboardAuth()] }, ...)
@@ -1,4 +1,4 @@
1
- import type { Router, Context } from '@stravigor/http'
1
+ import type { Router, Context } from '@strav/http'
2
2
  import { dashboardAuth } from './middleware.ts'
3
3
  import DevtoolsManager from '../devtools_manager.ts'
4
4
  import type { EntryType, AggregateFunction } from '../types.ts'
@@ -10,7 +10,7 @@ import { PERIODS } from '../storage/aggregate_store.ts'
10
10
  * Mounts the API under `/_devtools` and serves the SPA dashboard.
11
11
  *
12
12
  * @example
13
- * import { registerDashboard } from '@stravigor/devtools/dashboard/routes'
13
+ * import { registerDashboard } from '@strav/devtools/dashboard/routes'
14
14
  * registerDashboard(router)
15
15
  *
16
16
  * // With custom auth guard
@@ -1,5 +1,5 @@
1
- import { inject, Configuration, Emitter, ConfigurationError } from '@stravigor/kernel'
2
- import { Database } from '@stravigor/database'
1
+ import { inject, Configuration, Emitter, ConfigurationError } from '@strav/kernel'
2
+ import { Database } from '@strav/database'
3
3
  import type { DevtoolsConfig, CollectorOptions } from './types.ts'
4
4
 
5
5
  import EntryStore from './storage/entry_store.ts'
@@ -1,7 +1,7 @@
1
- import { ServiceProvider } from '@stravigor/kernel'
2
- import type { Application } from '@stravigor/kernel'
3
- import type { Context } from '@stravigor/http'
4
- import { Router } from '@stravigor/http'
1
+ import { ServiceProvider } from '@strav/kernel'
2
+ import type { Application } from '@strav/kernel'
3
+ import type { Context } from '@strav/http'
4
+ import { Router } from '@strav/http'
5
5
  import DevtoolsManager from './devtools_manager.ts'
6
6
  import { registerDashboard } from './dashboard/routes.ts'
7
7
 
package/src/errors.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { ConfigurationError } from '@stravigor/kernel'
1
+ import { ConfigurationError } from '@strav/kernel'
2
2
 
3
3
  export class DevtoolsError extends ConfigurationError {}
package/src/helpers.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import DevtoolsManager from './devtools_manager.ts'
2
- import type { Middleware } from '@stravigor/http'
2
+ import type { Middleware } from '@strav/http'
3
3
  import type { EntryRecord, AggregateRecord, EntryType, AggregateFunction } from './types.ts'
4
4
 
5
5
  /**
6
6
  * Devtools helper — the primary convenience API.
7
7
  *
8
8
  * @example
9
- * import { devtools } from '@stravigor/devtools'
9
+ * import { devtools } from '@strav/devtools'
10
10
  *
11
11
  * // Add the middleware to capture requests
12
12
  * router.use(devtools.middleware())
@@ -1,5 +1,5 @@
1
- import { Emitter } from '@stravigor/kernel'
2
- import type { Listener } from '@stravigor/kernel'
1
+ import { Emitter } from '@strav/kernel'
2
+ import type { Listener } from '@strav/kernel'
3
3
  import Recorder from './recorder.ts'
4
4
  import type AggregateStore from '../storage/aggregate_store.ts'
5
5
  import type { RecorderOptions } from '../types.ts'
@@ -1,5 +1,5 @@
1
- import { Emitter } from '@stravigor/kernel'
2
- import type { Listener } from '@stravigor/kernel'
1
+ import { Emitter } from '@strav/kernel'
2
+ import type { Listener } from '@strav/kernel'
3
3
  import Recorder from './recorder.ts'
4
4
  import type AggregateStore from '../storage/aggregate_store.ts'
5
5
  import type { RecorderOptions } from '../types.ts'
@@ -1,4 +1,4 @@
1
- import { env } from '@stravigor/kernel/helpers'
1
+ import { env } from '@strav/kernel/helpers'
2
2
 
3
3
  export default {
4
4
  /** Enable or disable devtools entirely. */
@@ -1,4 +1,4 @@
1
- import { defineSchema, t, Archetype } from '@stravigor/database/schema'
1
+ import { defineSchema, t, Archetype } from '@strav/database/schema'
2
2
 
3
3
  export default defineSchema('_strav_devtools_aggregates', {
4
4
  archetype: Archetype.Event,
@@ -1,4 +1,4 @@
1
- import { defineSchema, t, Archetype } from '@stravigor/database/schema'
1
+ import { defineSchema, t, Archetype } from '@strav/database/schema'
2
2
 
3
3
  export default defineSchema('_strav_devtools_entries', {
4
4
  archetype: Archetype.Event,