mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 04:52:35 +00:00
chore: upgrade buf connect v2
This commit is contained in:
@@ -44,8 +44,8 @@
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "^2.0.0",
|
||||
"@connectrpc/connect": "2.0.0-alpha.1",
|
||||
"@bufbuild/protobuf": "^2.2.2",
|
||||
"@connectrpc/connect": "^2.0.0",
|
||||
"@zitadel/proto": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { DescService } from "@bufbuild/protobuf";
|
||||
import { Timestamp, timestampDate } from "@bufbuild/protobuf/wkt";
|
||||
import { createPromiseClient, Transport } from "@connectrpc/connect";
|
||||
import { createClient, Transport } from "@connectrpc/connect";
|
||||
|
||||
export function createClientFor<TService extends DescService>(service: TService) {
|
||||
return (transport: Transport) => createPromiseClient(service, transport);
|
||||
return (transport: Transport) => createClient(service, transport);
|
||||
}
|
||||
|
||||
export function toDate(timestamp: Timestamp | undefined): Date | undefined {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { create } from "@bufbuild/protobuf";
|
||||
import { FeatureService } from "@zitadel/proto/zitadel/feature/v2/feature_service_pb";
|
||||
import { IdentityProviderService } from "@zitadel/proto/zitadel/idp/v2/idp_service_pb";
|
||||
import { RequestContext } from "@zitadel/proto/zitadel/object/v2/object_pb";
|
||||
import { RequestContextSchema } from "@zitadel/proto/zitadel/object/v2/object_pb";
|
||||
import { OIDCService } from "@zitadel/proto/zitadel/oidc/v2/oidc_service_pb";
|
||||
import { OrganizationService } from "@zitadel/proto/zitadel/org/v2/org_service_pb";
|
||||
import { SessionService } from "@zitadel/proto/zitadel/session/v2/session_service_pb";
|
||||
@@ -17,8 +18,8 @@ export const createOrganizationServiceClient = createClientFor(OrganizationServi
|
||||
export const createFeatureServiceClient = createClientFor(FeatureService);
|
||||
export const createIdpServiceClient = createClientFor(IdentityProviderService);
|
||||
|
||||
export function makeReqCtx(orgId: string | undefined): Partial<RequestContext> {
|
||||
return {
|
||||
export function makeReqCtx(orgId: string | undefined) {
|
||||
return create(RequestContextSchema, {
|
||||
resourceOwner: orgId ? { case: "orgId", value: orgId } : { case: "instance", value: true },
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -29,15 +29,15 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@zitadel/client": "workspace:*",
|
||||
"@connectrpc/connect": "^2.0.0-alpha.1"
|
||||
"@connectrpc/connect": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@connectrpc/connect-node": "^2.0.0-alpha.1",
|
||||
"@connectrpc/connect-web": "^2.0.0-alpha.1",
|
||||
"@connectrpc/connect-node": "^2.0.0",
|
||||
"@connectrpc/connect-web": "^2.0.0",
|
||||
"jose": "^5.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@connectrpc/connect": "^2.0.0-alpha.1",
|
||||
"@connectrpc/connect": "^2.0.0",
|
||||
"@types/node": "^22.9.0",
|
||||
"@zitadel/client": "workspace:*",
|
||||
"@zitadel/tsconfig": "workspace:*",
|
||||
|
||||
@@ -2,7 +2,7 @@ version: v2
|
||||
managed:
|
||||
enabled: true
|
||||
plugins:
|
||||
- remote: buf.build/bufbuild/es:v2.0.0
|
||||
- remote: buf.build/bufbuild/es:v2.2.0
|
||||
out: .
|
||||
include_imports: true
|
||||
opt:
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"generate": "buf generate https://github.com/zitadel/zitadel.git --path ./proto/zitadel",
|
||||
"clean": "rm -rf zitadel && rm -rf .turbo && rm -rf node_modules"
|
||||
"clean": "rm -rf zitadel .turbo node_modules google protoc-gen-openapiv2 validate"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "^2.0.0"
|
||||
"@bufbuild/protobuf": "^2.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bufbuild/buf": "^1.46.0"
|
||||
"@bufbuild/buf": "^1.47.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user