@mstuercke/api-utils 4.2.1 → 4.3.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/dist/ws/server/WsApi.d.ts.map +1 -1
- package/dist/ws/server/WsApi.js +20 -15
- package/dist/ws/server/WsApi.js.map +1 -1
- package/dist/ws/server/awsLambdaTrpcSubscriptionRequestHandler.d.ts +7 -0
- package/dist/ws/server/awsLambdaTrpcSubscriptionRequestHandler.d.ts.map +1 -0
- package/dist/ws/server/awsLambdaTrpcSubscriptionRequestHandler.js +71 -0
- package/dist/ws/server/awsLambdaTrpcSubscriptionRequestHandler.js.map +1 -0
- package/dist/ws/server/getConnection.d.ts +4 -0
- package/dist/ws/server/getConnection.d.ts.map +1 -0
- package/dist/ws/server/getConnection.js +9 -0
- package/dist/ws/server/getConnection.js.map +1 -0
- package/dist/ws/server/index.d.ts +2 -0
- package/dist/ws/server/index.d.ts.map +1 -1
- package/dist/ws/server/index.js +2 -0
- package/dist/ws/server/index.js.map +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WsApi.d.ts","sourceRoot":"","sources":["../../../src/ws/server/WsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAE,qBAAqB,EAAC,MAAM,YAAY,CAAC;AACvE,OAAO,EACL,WAAW,EAEX,YAAY,EAEZ,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAIlB,qBAAa,KAAK;IAEhB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAG5B;IAEF,eAAe,CACX,MAAM,SAAS,WAAW,EAC1B,OAAO,SAAS,YAAY,CAAC,MAAM,CAAC,EACpC,QAAQ,SAAS,aAAa,EAChC,YAAY,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;IAKtD,aAAa,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"WsApi.d.ts","sourceRoot":"","sources":["../../../src/ws/server/WsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAE,qBAAqB,EAAC,MAAM,YAAY,CAAC;AACvE,OAAO,EACL,WAAW,EAEX,YAAY,EAEZ,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAIlB,qBAAa,KAAK;IAEhB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAG5B;IAEF,eAAe,CACX,MAAM,SAAS,WAAW,EAC1B,OAAO,SAAS,YAAY,CAAC,MAAM,CAAC,EACpC,QAAQ,SAAS,aAAa,EAChC,YAAY,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;IAKtD,aAAa,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CA8CjF"}
|
package/dist/ws/server/WsApi.js
CHANGED
|
@@ -11,30 +11,35 @@ export class WsApi {
|
|
|
11
11
|
return this;
|
|
12
12
|
}
|
|
13
13
|
async handleRequest(event) {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
throw 'No routeKey';
|
|
14
|
+
const { connectionId, domainName, stage, eventType } = event.requestContext;
|
|
15
|
+
if (!eventType)
|
|
16
|
+
throw 'No eventType';
|
|
18
17
|
if (!connectionId)
|
|
19
18
|
throw 'No connectionId';
|
|
20
19
|
if (!domainName)
|
|
21
20
|
throw 'No domainName';
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
let request;
|
|
22
|
+
switch (eventType) {
|
|
23
|
+
case 'CONNECT':
|
|
24
|
+
request = { action: '$connect' };
|
|
25
|
+
break;
|
|
26
|
+
case 'DISCONNECT':
|
|
27
|
+
request = { action: '$disconnect' };
|
|
28
|
+
break;
|
|
29
|
+
case 'MESSAGE':
|
|
30
|
+
if (!event.body)
|
|
31
|
+
throw 'No body';
|
|
32
|
+
request = JSON.parse(event.body);
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
throw `Unknown eventType ${eventType}`;
|
|
31
36
|
}
|
|
32
37
|
const endpoint = `https://${domainName}/${stage}`;
|
|
33
38
|
const connection = { endpoint, connectionId };
|
|
34
|
-
const requestHandler = this.routeHandlers[action];
|
|
39
|
+
const requestHandler = this.routeHandlers[request.action];
|
|
35
40
|
if (!requestHandler) {
|
|
36
41
|
await closeConnection(connection);
|
|
37
|
-
throw `No requestHandler found for action ${action}`;
|
|
42
|
+
throw `No requestHandler found for action ${request.action}`;
|
|
38
43
|
}
|
|
39
44
|
await requestHandler(request, {
|
|
40
45
|
connection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WsApi.js","sourceRoot":"","sources":["../../../src/ws/server/WsApi.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,MAAM,OAAO,KAAK;IAChB,8DAA8D;IAC7C,aAAa,GAAkE;QAC9F,UAAU,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;QACnC,aAAa,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;KACvC,CAAC;IAEF,eAAe,CAIb,YAA0D;QAC1D,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC;QAC5E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAA2B;QAC7C,MAAM,EAAC,
|
|
1
|
+
{"version":3,"file":"WsApi.js","sourceRoot":"","sources":["../../../src/ws/server/WsApi.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;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QAAQ,EAAE,YAAY,EAAC,CAAC;QAE7D,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,eAAe,CAAC,UAAU,CAAC,CAAC;YAClC,MAAM,sCAAsC,OAAO,CAAC,MAAM,EAAE,CAAC;QAC/D,CAAC;QAED,MAAM,cAAc,CAAC,OAAO,EAAE;YAC5B,UAAU;YACV,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,MAAM,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC;YAC1E,eAAe,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,eAAe,CAAC,UAAU,CAAC;SAC/D,CAAC,CAAC;QAEH,OAAO;YACL,UAAU,EAAE,GAAG;YACf,IAAI,EAAE,EAAE;SACT,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnyTRPCRouter } from '@trpc/server';
|
|
2
|
+
import { APIGatewayResult } from '@trpc/server/adapters/aws-lambda';
|
|
3
|
+
import { APIGatewayProxyEvent } from 'aws-lambda';
|
|
4
|
+
export declare const awsLambdaTrpcSubscriptionRequestHandler: <Router extends AnyTRPCRouter>(opts: {
|
|
5
|
+
router: Router;
|
|
6
|
+
}) => (event: APIGatewayProxyEvent) => Promise<APIGatewayResult>;
|
|
7
|
+
//# sourceMappingURL=awsLambdaTrpcSubscriptionRequestHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"awsLambdaTrpcSubscriptionRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/ws/server/awsLambdaTrpcSubscriptionRequestHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAoB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,OAAO,EAAC,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAsBhD,eAAO,MAAM,uCAAuC,uCAAwC;IAC1F,MAAM,EAAE,MAAM,CAAA;CACf,sCAG6C,QAAQ,gBAAgB,CAwErE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { PostToConnectionCommand } from '@aws-sdk/client-apigatewaymanagementapi';
|
|
2
|
+
import { callTRPCProcedure } from '@trpc/server';
|
|
3
|
+
import { getApiGatewayManagementApiClient } from './getApiGatewayManagementApiClient';
|
|
4
|
+
import { getConnection } from './getConnection';
|
|
5
|
+
export const awsLambdaTrpcSubscriptionRequestHandler = (opts) => {
|
|
6
|
+
const { router } = opts;
|
|
7
|
+
return async (event) => {
|
|
8
|
+
try {
|
|
9
|
+
const connection = getConnection(event);
|
|
10
|
+
if (!event.body || event.body === '[]')
|
|
11
|
+
return { statusCode: 200, body: '' };
|
|
12
|
+
const request = JSON.parse(event.body);
|
|
13
|
+
const sendMessage = async (response) => {
|
|
14
|
+
await getApiGatewayManagementApiClient(connection.endpoint).send(new PostToConnectionCommand({
|
|
15
|
+
ConnectionId: connection.connectionId,
|
|
16
|
+
Data: JSON.stringify(response),
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
const stopConnection = async () => {
|
|
20
|
+
await sendMessage({
|
|
21
|
+
id: request.id,
|
|
22
|
+
result: { type: 'stopped' },
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
if (request.method === 'subscription.stop') {
|
|
26
|
+
await stopConnection();
|
|
27
|
+
}
|
|
28
|
+
if (request.method === 'subscription') {
|
|
29
|
+
await sendMessage({
|
|
30
|
+
id: request.id,
|
|
31
|
+
result: { type: 'started' },
|
|
32
|
+
});
|
|
33
|
+
const sub = (await callTRPCProcedure({
|
|
34
|
+
procedures: router._def.procedures,
|
|
35
|
+
path: request.params.path,
|
|
36
|
+
type: 'subscription',
|
|
37
|
+
ctx: {},
|
|
38
|
+
getRawInput: async () => request.params.input,
|
|
39
|
+
}));
|
|
40
|
+
await new Promise((resolve) => {
|
|
41
|
+
sub.subscribe({
|
|
42
|
+
next: async (data) => await sendMessage({
|
|
43
|
+
id: request.id,
|
|
44
|
+
result: {
|
|
45
|
+
type: 'data',
|
|
46
|
+
data: data,
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
error: async (err) => {
|
|
50
|
+
console.error(err);
|
|
51
|
+
await stopConnection();
|
|
52
|
+
resolve();
|
|
53
|
+
},
|
|
54
|
+
complete: async () => {
|
|
55
|
+
await stopConnection();
|
|
56
|
+
resolve();
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
console.error(err);
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
statusCode: 200,
|
|
67
|
+
body: '',
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=awsLambdaTrpcSubscriptionRequestHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"awsLambdaTrpcSubscriptionRequestHandler.js","sourceRoot":"","sources":["../../../src/ws/server/awsLambdaTrpcSubscriptionRequestHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAgB,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAI9D,OAAO,EAAC,gCAAgC,EAAC,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAoB9C,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAA+B,IAErF,EAAE,EAAE;IACH,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC;IAEtB,OAAO,KAAK,EAAE,KAA2B,EAA6B,EAAE;QACtE,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;YAExC,IAAI,CAA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AM,CAAC,KAAK;iBAC9C,CAAC,CAAiC,CAAC;gBAEpC,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;oBAClC,GAAG,CAAC,SAAS,CAAC;wBACZ,IAAI,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE,CAAC,MAAM,WAAW,CAAC;4BAC/C,EAAE,EAAE,OAAO,CAAC,EAAE;4BACd,MAAM,EAAE;gCACN,IAAI,EAAE,MAAM;gCACZ,IAAI,EAAE,IAAI;6BACX;yBACF,CAAC;wBACF,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;4BACnB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;4BACnB,MAAM,cAAc,EAAE,CAAC;4BACvB,OAAO,EAAE,CAAC;wBACZ,CAAC;wBACD,QAAQ,EAAE,KAAK,IAAI,EAAE;4BACnB,MAAM,cAAc,EAAE,CAAC;4BACvB,OAAO,EAAE,CAAC;wBACZ,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QAED,OAAO;YACL,UAAU,EAAE,GAAG;YACf,IAAI,EAAE,EAAE;SACT,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConnection.d.ts","sourceRoot":"","sources":["../../../src/ws/server/getConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAEzC,eAAO,MAAM,aAAa,mCAAkC,eAQ3D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const getConnection = (event) => {
|
|
2
|
+
if (!event.requestContext.connectionId)
|
|
3
|
+
throw 'no connectionId';
|
|
4
|
+
return {
|
|
5
|
+
endpoint: `https://${event.requestContext.domainName}/${event.requestContext.stage}`,
|
|
6
|
+
connectionId: event.requestContext.connectionId,
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=getConnection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConnection.js","sourceRoot":"","sources":["../../../src/ws/server/getConnection.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAA2B,EAAmB,EAAE;IAC5E,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY;QACpC,MAAM,iBAAiB,CAAC;IAE1B,OAAO;QACL,QAAQ,EAAE,WAAW,KAAK,CAAC,cAAc,CAAC,UAAU,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE;QACpF,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY;KAChD,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from './awsLambdaTrpcSubscriptionRequestHandler';
|
|
1
2
|
export * from './buildWsApiRouteHandler';
|
|
2
3
|
export * from './closeConnection';
|
|
4
|
+
export * from './getConnection';
|
|
3
5
|
export * from './sendResponse';
|
|
4
6
|
export * from './WsApi';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ws/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ws/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
package/dist/ws/server/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from './awsLambdaTrpcSubscriptionRequestHandler';
|
|
1
2
|
export * from './buildWsApiRouteHandler';
|
|
2
3
|
export * from './closeConnection';
|
|
4
|
+
export * from './getConnection';
|
|
3
5
|
export * from './sendResponse';
|
|
4
6
|
export * from './WsApi';
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ws/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ws/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mstuercke/api-utils",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**/*.js",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.438.0",
|
|
59
|
+
"@trpc/server": "next",
|
|
59
60
|
"@types/aws-lambda": "^8.10.133"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"@types/bun": "^1.0.5",
|
|
65
66
|
"@types/path-to-regexp": "^1.7.0",
|
|
66
67
|
"@types/react": "^18.2.33",
|
|
68
|
+
"@trpc/server": "next",
|
|
67
69
|
"typescript": "^5.3.3"
|
|
68
70
|
},
|
|
69
71
|
"publishConfig": {
|