@atproto/xrpc-server 0.7.9 → 0.7.10

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/auth.d.ts.map +1 -1
  3. package/dist/auth.js +1 -1
  4. package/dist/auth.js.map +1 -1
  5. package/dist/rate-limiter.d.ts +1 -1
  6. package/dist/rate-limiter.d.ts.map +1 -1
  7. package/dist/server.d.ts +1 -1
  8. package/dist/server.d.ts.map +1 -1
  9. package/dist/server.js +29 -6
  10. package/dist/server.js.map +1 -1
  11. package/dist/stream/frames.d.ts +1 -1
  12. package/dist/stream/frames.d.ts.map +1 -1
  13. package/dist/stream/server.d.ts +2 -2
  14. package/dist/stream/server.d.ts.map +1 -1
  15. package/dist/stream/server.js +3 -6
  16. package/dist/stream/server.js.map +1 -1
  17. package/dist/stream/stream.d.ts +1 -1
  18. package/dist/stream/stream.d.ts.map +1 -1
  19. package/dist/stream/stream.js +1 -1
  20. package/dist/stream/stream.js.map +1 -1
  21. package/dist/stream/subscription.js +1 -1
  22. package/dist/stream/subscription.js.map +1 -1
  23. package/dist/stream/websocket-keepalive.d.ts +1 -1
  24. package/dist/stream/websocket-keepalive.d.ts.map +1 -1
  25. package/dist/stream/websocket-keepalive.js +1 -1
  26. package/dist/stream/websocket-keepalive.js.map +1 -1
  27. package/dist/types.d.ts +50 -50
  28. package/dist/types.d.ts.map +1 -1
  29. package/dist/types.js +24 -27
  30. package/dist/types.js.map +1 -1
  31. package/dist/util.d.ts +2 -2
  32. package/dist/util.d.ts.map +1 -1
  33. package/dist/util.js +1 -1
  34. package/dist/util.js.map +1 -1
  35. package/package.json +9 -6
  36. package/src/auth.ts +1 -1
  37. package/src/rate-limiter.ts +1 -1
  38. package/src/server.ts +21 -20
  39. package/src/stream/frames.ts +4 -4
  40. package/src/stream/server.ts +3 -3
  41. package/src/stream/stream.ts +3 -3
  42. package/src/stream/subscription.ts +1 -1
  43. package/src/stream/websocket-keepalive.ts +1 -1
  44. package/src/types.ts +33 -37
  45. package/src/util.ts +9 -10
  46. package/tests/_util.ts +1 -1
  47. package/tests/auth.test.ts +4 -4
  48. package/tests/bodies.test.ts +4 -4
  49. package/tests/errors.test.ts +1 -1
  50. package/tests/frames.test.ts +1 -1
  51. package/tests/ipld.test.ts +2 -2
  52. package/tests/parameters.test.ts +1 -1
  53. package/tests/procedures.test.ts +2 -2
  54. package/tests/queries.test.ts +1 -1
  55. package/tests/responses.test.ts +2 -2
  56. package/tests/stream.test.ts +3 -3
  57. package/tests/subscriptions.test.ts +5 -5
@@ -2,8 +2,8 @@ import * as http from 'node:http'
2
2
  import { AddressInfo } from 'node:net'
3
3
  import { LexiconDoc } from '@atproto/lexicon'
4
4
  import { XRPCError, XRPCInvalidResponseError, XrpcClient } from '@atproto/xrpc'
5
- import { createServer, closeServer } from './_util'
6
5
  import * as xrpcServer from '../src'
6
+ import { closeServer, createServer } from './_util'
7
7
 
8
8
  const LEXICONS: LexiconDoc[] = [
9
9
  {
@@ -1,6 +1,6 @@
1
1
  import * as cborx from 'cbor-x'
2
2
  import * as uint8arrays from 'uint8arrays'
3
- import { MessageFrame, ErrorFrame, Frame, FrameType } from '../src'
3
+ import { ErrorFrame, Frame, FrameType, MessageFrame } from '../src'
4
4
 
5
5
  describe('Frames', () => {
6
6
  it('creates and parses message frame.', async () => {
@@ -1,10 +1,10 @@
1
1
  import * as http from 'node:http'
2
2
  import { AddressInfo } from 'node:net'
3
+ import { CID } from 'multiformats/cid'
3
4
  import { LexiconDoc } from '@atproto/lexicon'
4
5
  import { XrpcClient } from '@atproto/xrpc'
5
- import { CID } from 'multiformats/cid'
6
- import { createServer, closeServer } from './_util'
7
6
  import * as xrpcServer from '../src'
7
+ import { closeServer, createServer } from './_util'
8
8
 
9
9
  const LEXICONS: LexiconDoc[] = [
10
10
  {
@@ -2,8 +2,8 @@ import * as http from 'node:http'
2
2
  import { AddressInfo } from 'node:net'
3
3
  import { LexiconDoc } from '@atproto/lexicon'
4
4
  import { XrpcClient } from '@atproto/xrpc'
5
- import { createServer, closeServer } from './_util'
6
5
  import * as xrpcServer from '../src'
6
+ import { closeServer, createServer } from './_util'
7
7
 
8
8
  const LEXICONS: LexiconDoc[] = [
9
9
  {
@@ -1,10 +1,10 @@
1
1
  import * as http from 'node:http'
2
+ import { AddressInfo } from 'node:net'
2
3
  import { Readable } from 'node:stream'
3
4
  import { LexiconDoc } from '@atproto/lexicon'
4
5
  import { XrpcClient } from '@atproto/xrpc'
5
- import { createServer, closeServer } from './_util'
6
6
  import * as xrpcServer from '../src'
7
- import { AddressInfo } from 'node:net'
7
+ import { closeServer, createServer } from './_util'
8
8
 
9
9
  const LEXICONS: LexiconDoc[] = [
10
10
  {
@@ -2,8 +2,8 @@ import * as http from 'node:http'
2
2
  import { AddressInfo } from 'node:net'
3
3
  import { LexiconDoc } from '@atproto/lexicon'
4
4
  import { XrpcClient } from '@atproto/xrpc'
5
- import { createServer, closeServer } from './_util'
6
5
  import * as xrpcServer from '../src'
6
+ import { closeServer, createServer } from './_util'
7
7
 
8
8
  const LEXICONS: LexiconDoc[] = [
9
9
  {
@@ -1,10 +1,10 @@
1
1
  import * as http from 'node:http'
2
2
  import { AddressInfo } from 'node:net'
3
+ import { byteIterableToStream } from '@atproto/common'
3
4
  import { LexiconDoc } from '@atproto/lexicon'
4
5
  import { XrpcClient } from '@atproto/xrpc'
5
- import { byteIterableToStream } from '@atproto/common'
6
- import { createServer, closeServer } from './_util'
7
6
  import * as xrpcServer from '../src'
7
+ import { closeServer, createServer } from './_util'
8
8
 
9
9
  const LEXICONS: LexiconDoc[] = [
10
10
  {
@@ -1,6 +1,6 @@
1
- import * as http from 'http'
2
- import { once } from 'events'
3
- import { AddressInfo } from 'net'
1
+ import { once } from 'node:events'
2
+ import * as http from 'node:http'
3
+ import { AddressInfo } from 'node:net'
4
4
  import { WebSocket } from 'ws'
5
5
  import { XRPCError } from '@atproto/xrpc'
6
6
  import {
@@ -1,17 +1,17 @@
1
1
  import * as http from 'node:http'
2
2
  import { AddressInfo } from 'node:net'
3
- import { WebSocket, WebSocketServer, createWebSocketStream } from 'ws'
4
3
  import getPort from 'get-port'
4
+ import { WebSocket, WebSocketServer, createWebSocketStream } from 'ws'
5
5
  import { wait } from '@atproto/common'
6
6
  import { LexiconDoc } from '@atproto/lexicon'
7
- import { byFrame, MessageFrame, ErrorFrame, Frame, Subscription } from '../src'
7
+ import { ErrorFrame, Frame, MessageFrame, Subscription, byFrame } from '../src'
8
+ import * as xrpcServer from '../src'
8
9
  import {
9
- createServer,
10
+ basicAuthHeaders,
10
11
  closeServer,
11
12
  createBasicAuth,
12
- basicAuthHeaders,
13
+ createServer,
13
14
  } from './_util'
14
- import * as xrpcServer from '../src'
15
15
 
16
16
  const LEXICONS: LexiconDoc[] = [
17
17
  {