@atproto/xrpc-server 0.7.9 → 0.7.11
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 +22 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +1 -1
- package/dist/auth.js.map +1 -1
- package/dist/rate-limiter.d.ts +1 -1
- package/dist/rate-limiter.d.ts.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +29 -6
- package/dist/server.js.map +1 -1
- package/dist/stream/frames.d.ts +1 -1
- package/dist/stream/frames.d.ts.map +1 -1
- package/dist/stream/server.d.ts +2 -2
- package/dist/stream/server.d.ts.map +1 -1
- package/dist/stream/server.js +3 -6
- package/dist/stream/server.js.map +1 -1
- package/dist/stream/stream.d.ts +1 -1
- package/dist/stream/stream.d.ts.map +1 -1
- package/dist/stream/stream.js +1 -1
- package/dist/stream/stream.js.map +1 -1
- package/dist/stream/subscription.js +1 -1
- package/dist/stream/subscription.js.map +1 -1
- package/dist/stream/websocket-keepalive.d.ts +1 -1
- package/dist/stream/websocket-keepalive.d.ts.map +1 -1
- package/dist/stream/websocket-keepalive.js +1 -1
- package/dist/stream/websocket-keepalive.js.map +1 -1
- package/dist/types.d.ts +50 -50
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +24 -27
- package/dist/types.js.map +1 -1
- package/dist/util.d.ts +2 -2
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +1 -1
- package/dist/util.js.map +1 -1
- package/jest.config.js +1 -0
- package/package.json +9 -6
- package/src/auth.ts +1 -1
- package/src/rate-limiter.ts +1 -1
- package/src/server.ts +21 -20
- package/src/stream/frames.ts +4 -4
- package/src/stream/server.ts +3 -3
- package/src/stream/stream.ts +3 -3
- package/src/stream/subscription.ts +1 -1
- package/src/stream/websocket-keepalive.ts +1 -1
- package/src/types.ts +33 -37
- package/src/util.ts +9 -10
- package/tests/_util.ts +1 -1
- package/tests/auth.test.ts +4 -4
- package/tests/bodies.test.ts +4 -4
- package/tests/errors.test.ts +1 -1
- package/tests/frames.test.ts +1 -1
- package/tests/ipld.test.ts +2 -2
- package/tests/parameters.test.ts +1 -1
- package/tests/procedures.test.ts +2 -2
- package/tests/queries.test.ts +1 -1
- package/tests/responses.test.ts +2 -2
- package/tests/stream.test.ts +3 -3
- package/tests/subscriptions.test.ts +5 -5
package/tests/errors.test.ts
CHANGED
|
@@ -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
|
{
|
package/tests/frames.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as cborx from 'cbor-x'
|
|
2
2
|
import * as uint8arrays from 'uint8arrays'
|
|
3
|
-
import {
|
|
3
|
+
import { ErrorFrame, Frame, FrameType, MessageFrame } from '../src'
|
|
4
4
|
|
|
5
5
|
describe('Frames', () => {
|
|
6
6
|
it('creates and parses message frame.', async () => {
|
package/tests/ipld.test.ts
CHANGED
|
@@ -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
|
{
|
package/tests/parameters.test.ts
CHANGED
|
@@ -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
|
{
|
package/tests/procedures.test.ts
CHANGED
|
@@ -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 {
|
|
7
|
+
import { closeServer, createServer } from './_util'
|
|
8
8
|
|
|
9
9
|
const LEXICONS: LexiconDoc[] = [
|
|
10
10
|
{
|
package/tests/queries.test.ts
CHANGED
|
@@ -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
|
{
|
package/tests/responses.test.ts
CHANGED
|
@@ -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
|
{
|
package/tests/stream.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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 {
|
|
7
|
+
import { ErrorFrame, Frame, MessageFrame, Subscription, byFrame } from '../src'
|
|
8
|
+
import * as xrpcServer from '../src'
|
|
8
9
|
import {
|
|
9
|
-
|
|
10
|
+
basicAuthHeaders,
|
|
10
11
|
closeServer,
|
|
11
12
|
createBasicAuth,
|
|
12
|
-
|
|
13
|
+
createServer,
|
|
13
14
|
} from './_util'
|
|
14
|
-
import * as xrpcServer from '../src'
|
|
15
15
|
|
|
16
16
|
const LEXICONS: LexiconDoc[] = [
|
|
17
17
|
{
|