@powersync/lib-services-framework 0.7.14 → 0.8.0

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/LICENSE CHANGED
@@ -6,7 +6,7 @@ FSL-1.1-ALv2
6
6
 
7
7
  ## Notice
8
8
 
9
- Copyright 2023-2025 Journey Mobile, Inc.
9
+ Copyright 2023-2026 Journey Mobile, Inc.
10
10
 
11
11
  ## Terms and Conditions
12
12
 
@@ -1,4 +1,6 @@
1
1
  import winston from 'winston';
2
+ export declare const DEFAULT_LOG_LEVEL = "info";
3
+ export declare const DEFAULT_LOG_FORMAT: string;
2
4
  export declare namespace LogFormat {
3
5
  const development: winston.Logform.Format;
4
6
  const production: winston.Logform.Format;
@@ -8,15 +8,18 @@ const prefixFormat = winston.format((info) => {
8
8
  prefix: undefined
9
9
  };
10
10
  });
11
+ export const DEFAULT_LOG_LEVEL = 'info';
12
+ export const DEFAULT_LOG_FORMAT = process.env.NODE_ENV == 'production' ? 'json' : 'text';
11
13
  export var LogFormat;
12
14
  (function (LogFormat) {
13
15
  LogFormat.development = winston.format.combine(prefixFormat(), winston.format.colorize({ level: true }), winston.format.simple());
14
16
  LogFormat.production = winston.format.combine(prefixFormat(), winston.format.timestamp(), winston.format.json());
15
17
  })(LogFormat || (LogFormat = {}));
16
18
  export const logger = winston.createLogger();
17
- // Configure logging to console as the default
19
+ // Set up default logging before config is loaded
18
20
  logger.configure({
19
- format: process.env.NODE_ENV == 'production' ? LogFormat.production : LogFormat.development,
21
+ level: DEFAULT_LOG_LEVEL,
22
+ format: DEFAULT_LOG_FORMAT === 'json' ? LogFormat.production : LogFormat.development,
20
23
  transports: [new winston.transports.Console()]
21
24
  });
22
25
  //# sourceMappingURL=Logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../src/logger/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,YAAY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/C,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powersync/lib-services-framework",
3
3
  "repository": "https://github.com/powersync-ja/powersync-service",
4
- "version": "0.7.14",
4
+ "version": "0.8.0",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "types": "dist/index.d.ts",
@@ -25,16 +25,15 @@
25
25
  "winston": "^3.13.0",
26
26
  "zod": "^3.23.8",
27
27
  "@powersync/service-errors": "0.3.6",
28
- "@powersync/service-sync-rules": "0.29.10"
28
+ "@powersync/service-sync-rules": "0.30.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/lodash": "^4.17.5",
32
- "vitest": "^3.2.4"
32
+ "vitest": "^4.0.16"
33
33
  },
34
34
  "scripts": {
35
35
  "clean": "rm -r ./dist && tsc -b --clean",
36
36
  "build": "tsc -b",
37
- "build:tests": "tsc -b test/tsconfig.json",
38
37
  "test": "vitest"
39
38
  }
40
39
  }