@strav/kernel 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/kernel",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Foundation of the Strav framework — application lifecycle, IoC container, configuration, events, and core utilities",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@ function prefixed(key: string): string {
10
10
  * All methods delegate to `CacheManager.store` with the configured prefix.
11
11
  *
12
12
  * @example
13
- * import { cache } from '@stravigor/kernel/cache'
13
+ * import { cache } from '@strav/kernel/cache'
14
14
  *
15
15
  * const user = await cache.remember(`user:${id}`, 300, () => User.find(id))
16
16
  * await cache.forget(`user:${id}`)
@@ -1,2 +1,2 @@
1
- export { default as Configuration } from './configuration'
1
+ export { default as Configuration } from './configuration.ts'
2
2
  export type { ConfigData, ConfigurationLoader } from './types'
@@ -13,8 +13,8 @@ const SHUTDOWN_TIMEOUT = 30_000
13
13
  * graceful shutdown on SIGINT / SIGTERM.
14
14
  *
15
15
  * @example
16
- * import { app } from '@stravigor/kernel/core'
17
- * import { ConfigProvider, DatabaseProvider, AuthProvider } from '@stravigor/kernel/providers'
16
+ * import { app } from '@strav/kernel/core'
17
+ * import { ConfigProvider, DatabaseProvider, AuthProvider } from '@strav/kernel/providers'
18
18
  *
19
19
  * app
20
20
  * .useProviders([
@@ -7,7 +7,7 @@ import EncryptionManager from './encryption_manager.ts'
7
7
  * Password hashing uses argon2id via Bun.password (no key needed).
8
8
  *
9
9
  * @example
10
- * import { encrypt } from '@stravigor/kernel/encryption'
10
+ * import { encrypt } from '@strav/kernel/encryption'
11
11
  *
12
12
  * // Encrypt & decrypt strings
13
13
  * const encrypted = encrypt.encrypt('sensitive data')
@@ -23,7 +23,7 @@ export type ReportFn = (error: Error, ctx?: RequestContext) => void
23
23
  * Register with the router to catch all unhandled exceptions:
24
24
  *
25
25
  * @example
26
- * import { ExceptionHandler } from '@stravigor/kernel/exceptions'
26
+ * import { ExceptionHandler } from '@strav/kernel/exceptions'
27
27
  *
28
28
  * const handler = new ExceptionHandler(config.get('app.env') === 'local')
29
29
  * handler.report((error, ctx) => logger.error(error.message, { path: ctx?.path }))
@@ -5,7 +5,7 @@ import { HttpException, ValidationError } from './http_exception.ts'
5
5
  * as a JSON error response.
6
6
  *
7
7
  * @example
8
- * import { abort } from '@stravigor/kernel/exceptions'
8
+ * import { abort } from '@strav/kernel/exceptions'
9
9
  *
10
10
  * const project = await Project.find(id)
11
11
  * if (!project) abort(404, 'Project not found')
@@ -29,9 +29,9 @@ interface MixinFunction<In, Out> {
29
29
  * for up to 8 mixins.
30
30
  *
31
31
  * @example
32
- * import { compose } from '@stravigor/kernel/helpers'
33
- * import { BaseModel } from '@stravigor/database/orm'
34
- * import { billable } from '@stravigor/stripe'
32
+ * import { compose } from '@strav/kernel/helpers'
33
+ * import { BaseModel } from '@strav/database/orm'
34
+ * import { billable } from '@strav/stripe'
35
35
  *
36
36
  * // Without compose (nested):
37
37
  * class User extends billable(softDeletes(BaseModel)) { }