Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
smaye81 committed Oct 1, 2024
1 parent 2136474 commit 1521299
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 29 deletions.
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.9.0",
"prettier": "^3.2.5",
"typescript": "^5.5.4"
"typescript": "~5.5.4"
},
"dependencies": {
"@types/jasmine": "^5.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-playwright-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/react-dom": "^18.3.0",
"esbuild": "^0.24.0",
"prettier": "^3.3.2",
"typescript": "^5.5.4"
"typescript": "~5.5.4"
},
"dependencies": {
"@connectrpc/connect-playwright": "^0.4.0",
Expand Down
12 changes: 4 additions & 8 deletions packages/connect-playwright-example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
// limitations under the License.

import { useCallback, useState, FormEvent, FC } from "react";
import {
ConnectError,
createPromiseClient,
PromiseClient,
} from "@connectrpc/connect";
import { ConnectError, createClient, Client } from "@connectrpc/connect";
import {
createGrpcWebTransport,
createConnectTransport,
Expand All @@ -30,7 +26,7 @@ interface ChatMessage {
}

const baseUrl = "https://demo.connectrpc.com";
let elizaClient: PromiseClient<typeof ElizaService>;
let elizaClient: Client<typeof ElizaService>;

// Read the transport and format parameters from the URL
// Note that users do not need to worry about this since this is just for
Expand All @@ -41,15 +37,15 @@ const transportParam = params.get("transport");
const useBinaryFormat = params.get("format") === "binary";

if (transportParam === "grpcweb") {
elizaClient = createPromiseClient(
elizaClient = createClient(
ElizaService,
createGrpcWebTransport({
baseUrl,
useBinaryFormat,
}),
);
} else {
elizaClient = createPromiseClient(
elizaClient = createClient(
ElizaService,
createConnectTransport({
baseUrl,
Expand Down
23 changes: 9 additions & 14 deletions packages/connect-playwright/src/testdata/gen/test_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,14 @@

import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
import type {
Int32ValueSchema,
StringValueSchema,
} from "@bufbuild/protobuf/wkt";
import type { Int32ValueSchema, StringValueSchema } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_wrappers } from "@bufbuild/protobuf/wkt";

/**
* Describes the file test.proto.
*/
export const file_test: GenFile =
/*@__PURE__*/
fileDesc(
"Cgp0ZXN0LnByb3RvEgR0ZXN0MusBCgtUZXN0U2VydmljZRJFCghVbmFyeU9uZRIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlGhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlEkUKCFVuYXJ5VHdvEhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUaHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUSTgoPU2VydmVyU3RyZWFtaW5nEhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUaHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUwAWIGcHJvdG8z",
[file_google_protobuf_wrappers],
);
export const file_test: GenFile = /*@__PURE__*/
fileDesc("Cgp0ZXN0LnByb3RvEgR0ZXN0MusBCgtUZXN0U2VydmljZRJFCghVbmFyeU9uZRIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlGhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlEkUKCFVuYXJ5VHdvEhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUaHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUSTgoPU2VydmVyU3RyZWFtaW5nEhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUaHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUwAWIGcHJvdG8z", [file_google_protobuf_wrappers]);

/**
* @generated from service test.TestService
Expand All @@ -45,21 +38,23 @@ export const TestService: GenService<{
methodKind: "unary";
input: typeof Int32ValueSchema;
output: typeof StringValueSchema;
};
},
/**
* @generated from rpc test.TestService.UnaryTwo
*/
unaryTwo: {
methodKind: "unary";
input: typeof Int32ValueSchema;
output: typeof StringValueSchema;
};
},
/**
* @generated from rpc test.TestService.ServerStreaming
*/
serverStreaming: {
methodKind: "server_streaming";
input: typeof Int32ValueSchema;
output: typeof StringValueSchema;
};
}> = /*@__PURE__*/ serviceDesc(file_test, 0);
},
}> = /*@__PURE__*/
serviceDesc(file_test, 0);

0 comments on commit 1521299

Please sign in to comment.