@atproto/bsync 0.1.8 → 0.1.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atproto/bsync
2
2
 
3
+ ## 0.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#5762](https://github.com/bluesky-social/atproto/pull/5762) [`7a46712`](https://github.com/bluesky-social/atproto/commit/7a467120982d9ff1559afeb3a26989dad5877d17) Thanks [@haileyok](https://github.com/haileyok)! - Redact cookie and set-cookie headers in HTTP request and response logs.
8
+ - Updated dependencies [[`7a46712`](https://github.com/bluesky-social/atproto/commit/7a467120982d9ff1559afeb3a26989dad5877d17)]:
9
+ - @atproto/common@0.8.10
10
+
3
11
  ## 0.1.8
4
12
 
5
13
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAAoB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEnE,eAAO,MAAM,QAAQ,EAAE,UAAU,CAAC,OAAO,eAAe,CAC3B,CAAA;AAC7B,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,OAAO,eAAe,CAChC,CAAA;AAE1B,eAAO,MAAM,gBAAgB,wGAgB3B,CAAA"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAGL,eAAe,EAChB,MAAM,iBAAiB,CAAA;AAExB,eAAO,MAAM,QAAQ,EAAE,UAAU,CAAC,OAAO,eAAe,CAC3B,CAAA;AAC7B,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,OAAO,eAAe,CAChC,CAAA;AAE1B,eAAO,MAAM,gBAAgB,wGAiB3B,CAAA"}
package/dist/logger.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { pinoHttp, stdSerializers } from 'pino-http';
2
- import { obfuscateHeaders, subsystemLogger } from '@atproto/common';
2
+ import { obfuscateHeaders, obfuscateResSerializer, subsystemLogger, } from '@atproto/common';
3
3
  export const dbLogger = subsystemLogger('bsync:db');
4
4
  export const httpLogger = subsystemLogger('bsync');
5
5
  export const loggerMiddleware = pinoHttp({
@@ -8,6 +8,7 @@ export const loggerMiddleware = pinoHttp({
8
8
  paths: ['req.headers.authorization'],
9
9
  },
10
10
  serializers: {
11
+ res: obfuscateResSerializer,
11
12
  err: (err) => ({
12
13
  code: err?.code,
13
14
  message: err?.message,
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEnE,MAAM,CAAC,MAAM,QAAQ,GACnB,eAAe,CAAC,UAAU,CAAC,CAAA;AAC7B,MAAM,CAAC,MAAM,UAAU,GACrB,eAAe,CAAC,OAAO,CAAC,CAAA;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACvC,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,2BAA2B,CAAC;KACrC;IACD,WAAW,EAAE;QACX,GAAG,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC;YAClB,IAAI,EAAE,GAAG,EAAE,IAAI;YACf,OAAO,EAAE,GAAG,EAAE,OAAO;SACtB,CAAC;QACF,GAAG,EAAE,CAAC,GAAoB,EAAE,EAAE;YAC5B,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAC1C,MAAM,OAAO,GAAG,gBAAgB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;YACpD,OAAO,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,CAAA;QACnC,CAAC;KACF;CACF,CAAC,CAAA","sourcesContent":["import type { IncomingMessage } from 'node:http'\nimport { pinoHttp, stdSerializers } from 'pino-http'\nimport { obfuscateHeaders, subsystemLogger } from '@atproto/common'\n\nexport const dbLogger: ReturnType<typeof subsystemLogger> =\n subsystemLogger('bsync:db')\nexport const httpLogger: ReturnType<typeof subsystemLogger> =\n subsystemLogger('bsync')\n\nexport const loggerMiddleware = pinoHttp({\n logger: httpLogger,\n redact: {\n paths: ['req.headers.authorization'],\n },\n serializers: {\n err: (err: any) => ({\n code: err?.code,\n message: err?.message,\n }),\n req: (req: IncomingMessage) => {\n const serialized = stdSerializers.req(req)\n const headers = obfuscateHeaders(serialized.headers)\n return { ...serialized, headers }\n },\n },\n})\n"]}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,GAChB,MAAM,iBAAiB,CAAA;AAExB,MAAM,CAAC,MAAM,QAAQ,GACnB,eAAe,CAAC,UAAU,CAAC,CAAA;AAC7B,MAAM,CAAC,MAAM,UAAU,GACrB,eAAe,CAAC,OAAO,CAAC,CAAA;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACvC,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,2BAA2B,CAAC;KACrC;IACD,WAAW,EAAE;QACX,GAAG,EAAE,sBAAsB;QAC3B,GAAG,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC;YAClB,IAAI,EAAE,GAAG,EAAE,IAAI;YACf,OAAO,EAAE,GAAG,EAAE,OAAO;SACtB,CAAC;QACF,GAAG,EAAE,CAAC,GAAoB,EAAE,EAAE;YAC5B,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAC1C,MAAM,OAAO,GAAG,gBAAgB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;YACpD,OAAO,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,CAAA;QACnC,CAAC;KACF;CACF,CAAC,CAAA","sourcesContent":["import type { IncomingMessage } from 'node:http'\nimport { pinoHttp, stdSerializers } from 'pino-http'\nimport {\n obfuscateHeaders,\n obfuscateResSerializer,\n subsystemLogger,\n} from '@atproto/common'\n\nexport const dbLogger: ReturnType<typeof subsystemLogger> =\n subsystemLogger('bsync:db')\nexport const httpLogger: ReturnType<typeof subsystemLogger> =\n subsystemLogger('bsync')\n\nexport const loggerMiddleware = pinoHttp({\n logger: httpLogger,\n redact: {\n paths: ['req.headers.authorization'],\n },\n serializers: {\n res: obfuscateResSerializer,\n err: (err: any) => ({\n code: err?.code,\n message: err?.message,\n }),\n req: (req: IncomingMessage) => {\n const serialized = stdSerializers.req(req)\n const headers = obfuscateHeaders(serialized.headers)\n return { ...serialized, headers }\n },\n },\n})\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/bsync",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "license": "MIT",
5
5
  "description": "Sychronizing service for app.bsky App View (Bluesky API)",
6
6
  "keywords": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@atproto-labs/opentelemetry-node": "^0.5.0",
40
- "@atproto/common": "^0.8.9",
40
+ "@atproto/common": "^0.8.10",
41
41
  "@atproto/syntax": "^0.7.7",
42
42
  "@bufbuild/protobuf": "^1.5.0",
43
43
  "@connectrpc/connect": "^1.1.4",