@mantiq/logging 0.1.2 → 0.2.0-rc.2

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Channel-based logging for MantiqJS — console, file, daily rotation, and stack drivers.
4
4
 
5
- Part of [MantiqJS](https://github.com/abdullahkhan/mantiq) — a batteries-included TypeScript web framework for Bun.
5
+ Part of [MantiqJS](https://github.com/mantiqjs/mantiq) — a batteries-included TypeScript web framework for Bun.
6
6
 
7
7
  ## Installation
8
8
 
@@ -12,7 +12,7 @@ bun add @mantiq/logging
12
12
 
13
13
  ## Documentation
14
14
 
15
- See the [MantiqJS repository](https://github.com/abdullahkhan/mantiq) for full documentation.
15
+ See the [MantiqJS repository](https://github.com/mantiqjs/mantiq) for full documentation.
16
16
 
17
17
  ## License
18
18
 
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@mantiq/logging",
3
- "version": "0.1.2",
3
+ "version": "0.2.0-rc.2",
4
4
  "description": "Channel-based logging",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Abdullah Khan",
8
- "homepage": "https://github.com/abdullahkhan/mantiq/tree/main/packages/logging",
8
+ "homepage": "https://github.com/mantiqjs/mantiq/tree/main/packages/logging",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/abdullahkhan/mantiq.git",
11
+ "url": "https://github.com/mantiqjs/mantiq.git",
12
12
  "directory": "packages/logging"
13
13
  },
14
14
  "bugs": {
15
- "url": "https://github.com/abdullahkhan/mantiq/issues"
15
+ "url": "https://github.com/mantiqjs/mantiq/issues"
16
16
  },
17
17
  "keywords": [
18
18
  "mantiq",
@@ -40,16 +40,20 @@
40
40
  "LICENSE"
41
41
  ],
42
42
  "scripts": {
43
- "build": "bun build ./src/index.ts --outdir ./dist --target bun",
43
+ "build": "bun build ./src/index.ts --outdir ./dist --target bun --packages=external",
44
44
  "test": "bun test",
45
45
  "typecheck": "tsc --noEmit",
46
46
  "clean": "rm -rf dist"
47
47
  },
48
48
  "devDependencies": {
49
49
  "bun-types": "latest",
50
- "typescript": "^5.7.0"
50
+ "typescript": "^5.7.0",
51
+ "@mantiq/core": "workspace:*"
51
52
  },
52
53
  "peerDependencies": {
53
54
  "@mantiq/core": "^0.1.0"
55
+ },
56
+ "mantiq": {
57
+ "provider": "LoggingServiceProvider"
54
58
  }
55
59
  }
@@ -1,4 +1,4 @@
1
- import { ServiceProvider, ConfigRepository } from '@mantiq/core'
1
+ import { ServiceProvider, ConfigRepository, Application } from '@mantiq/core'
2
2
  import type { LogConfig } from './contracts/Logger.ts'
3
3
  import { LogManager } from './LogManager.ts'
4
4
  import { LOGGING_MANAGER } from './helpers/log.ts'
@@ -37,7 +37,7 @@ export class LoggingServiceProvider extends ServiceProvider {
37
37
  const config = c.make(ConfigRepository).get<LogConfig>('logging', DEFAULT_CONFIG)
38
38
 
39
39
  // Resolve relative log paths to absolute from app base path
40
- const basePath = this.app.basePath_()
40
+ const basePath = (this.app.make(Application as any) as Application).basePath_()
41
41
  if (config.channels) {
42
42
  for (const ch of Object.values(config.channels)) {
43
43
  if (typeof ch.path === 'string' && !ch.path.startsWith('/')) {