Skip to content

Commit

Permalink
moduleresolution: node16 for the @zitadel/client package
Browse files Browse the repository at this point in the history
  • Loading branch information
LufyCZ committed Feb 10, 2025
1 parent cc9cc30 commit c80a9b3
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 59 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export ZITADEL_SERVICE_USER_TOKEN=<your service account personal access token he
### Setting up local environment

```sh
# Install dependencies. Developing requires Node.js v16
# Install dependencies. Developing requires Node.js v20
pnpm install

# Generate gRPC stubs
Expand Down
2 changes: 1 addition & 1 deletion apps/login/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@types/ms": "0.7.34",
"@types/node": "22.9.0",
"@types/node": "^20.17.17",
"@types/react": "19.0.2",
"@types/react-dom": "19.0.2",
"@types/tinycolor2": "1.4.3",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@faker-js/faker": "^9.2.0",
"@changesets/cli": "^2.27.9",
"@playwright/test": "^1.48.2",
"@types/node": "^22.9.0",
"@types/node": "^20.17.17",
"@vitejs/plugin-react": "^4.3.3",
"@zitadel/prettier-config": "workspace:*",
"axios": "^1.7.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/zitadel-client/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { createClientFor, toDate } from "./helpers";
export { NewAuthorizationBearerInterceptor } from "./interceptors";
export { createClientFor, toDate } from "./helpers.js";
export { NewAuthorizationBearerInterceptor } from "./interceptors.js";

// TODO: Move this to `./protobuf.ts` and export it from there
export { create, fromJson, toJson } from "@bufbuild/protobuf";
Expand Down
2 changes: 1 addition & 1 deletion packages/zitadel-client/src/interceptors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Int32Value } from "@bufbuild/protobuf/wkt";
import { compileService } from "@bufbuild/protocompile";
import { createRouterTransport, HandlerContext } from "@connectrpc/connect";
import { describe, expect, test, vitest } from "vitest";
import { NewAuthorizationBearerInterceptor } from "./interceptors";
import { NewAuthorizationBearerInterceptor } from "./interceptors.js";

const TestService = compileService(`
syntax = "proto3";
Expand Down
2 changes: 1 addition & 1 deletion packages/zitadel-client/src/node.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createGrpcTransport, GrpcTransportOptions } from "@connectrpc/connect-node";
import { createGrpcWebTransport } from "@connectrpc/connect-web";
import { importPKCS8, SignJWT } from "jose";
import { NewAuthorizationBearerInterceptor } from "./interceptors";
import { NewAuthorizationBearerInterceptor } from "./interceptors.js";

/**
* Create a server transport using grpc with the given token and configuration options.
Expand Down
10 changes: 5 additions & 5 deletions packages/zitadel-client/src/v1.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createClientFor } from "./helpers";
import { createClientFor } from "./helpers.js";

import { AdminService } from "@zitadel/proto/zitadel/admin_pb";
import { AuthService } from "@zitadel/proto/zitadel/auth_pb";
import { ManagementService } from "@zitadel/proto/zitadel/management_pb";
import { SystemService } from "@zitadel/proto/zitadel/system_pb";
import { AdminService } from "@zitadel/proto/zitadel/admin_pb.js";
import { AuthService } from "@zitadel/proto/zitadel/auth_pb.js";
import { ManagementService } from "@zitadel/proto/zitadel/management_pb.js";
import { SystemService } from "@zitadel/proto/zitadel/system_pb.js";

export const createAdminServiceClient = createClientFor(AdminService);
export const createAuthServiceClient = createClientFor(AuthService);
Expand Down
18 changes: 9 additions & 9 deletions packages/zitadel-client/src/v2.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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 { 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";
import { SettingsService } from "@zitadel/proto/zitadel/settings/v2/settings_service_pb";
import { UserService } from "@zitadel/proto/zitadel/user/v2/user_service_pb";
import { FeatureService } from "@zitadel/proto/zitadel/feature/v2/feature_service_pb.js";
import { IdentityProviderService } from "@zitadel/proto/zitadel/idp/v2/idp_service_pb.js";
import { RequestContextSchema } from "@zitadel/proto/zitadel/object/v2/object_pb.js";
import { OIDCService } from "@zitadel/proto/zitadel/oidc/v2/oidc_service_pb.js";
import { OrganizationService } from "@zitadel/proto/zitadel/org/v2/org_service_pb.js";
import { SessionService } from "@zitadel/proto/zitadel/session/v2/session_service_pb.js";
import { SettingsService } from "@zitadel/proto/zitadel/settings/v2/settings_service_pb.js";
import { UserService } from "@zitadel/proto/zitadel/user/v2/user_service_pb.js";

import { createClientFor } from "./helpers";
import { createClientFor } from "./helpers.js";

export const createUserServiceClient = createClientFor(UserService);
export const createSettingsServiceClient = createClientFor(SettingsService);
Expand Down
6 changes: 3 additions & 3 deletions packages/zitadel-client/src/v3alpha.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ZITADELUsers } from "@zitadel/proto/zitadel/resources/user/v3alpha/user_service_pb";
import { ZITADELUserSchemas } from "@zitadel/proto/zitadel/resources/userschema/v3alpha/user_schema_service_pb";
import { createClientFor } from "./helpers";
import { ZITADELUsers } from "@zitadel/proto/zitadel/resources/user/v3alpha/user_service_pb.js";
import { ZITADELUserSchemas } from "@zitadel/proto/zitadel/resources/userschema/v3alpha/user_schema_service_pb.js";
import { createClientFor } from "./helpers.js";

export const createUserSchemaServiceClient = createClientFor(ZITADELUserSchemas);
export const createUserServiceClient = createClientFor(ZITADELUsers);
1 change: 1 addition & 0 deletions packages/zitadel-proto/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ plugins:
include_imports: true
opt:
- json_types=true
- import_extension=js
6 changes: 1 addition & 5 deletions packages/zitadel-tsconfig/tsup.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "tsup",
"extends": "./node20.json",
"compilerOptions": {
"module": "preserve",
"moduleResolution": "Bundler"
}
"extends": "./node20.json"
}
60 changes: 30 additions & 30 deletions pnpm-lock.yaml

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

0 comments on commit c80a9b3

Please sign in to comment.