mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:17:34 +00:00
remove @zitadel/node, move fcn to /client
This commit is contained in:
@@ -9,7 +9,7 @@ Login UI.
|
|||||||
|
|
||||||
The scope of functionality of this repo and packages is under active development.
|
The scope of functionality of this repo and packages is under active development.
|
||||||
|
|
||||||
The `@zitadel/client` and `@zitadel/node` packages are using [@connectrpc/connect](https://github.com/connectrpc/connect-es#readme).
|
The `@zitadel/client` package is using [@connectrpc/connect](https://github.com/connectrpc/connect-es#readme).
|
||||||
|
|
||||||
You can read the [contribution guide](/CONTRIBUTING.md) on how to contribute.
|
You can read the [contribution guide](/CONTRIBUTING.md) on how to contribute.
|
||||||
Questions can be raised in our [Discord channel](https://discord.gg/erh5Brh7jE) or as
|
Questions can be raised in our [Discord channel](https://discord.gg/erh5Brh7jE) or as
|
||||||
@@ -30,8 +30,7 @@ We think the easiest path of getting up and running, is the following:
|
|||||||
## Included Apps And Packages
|
## Included Apps And Packages
|
||||||
|
|
||||||
- `login`: The login UI used by ZITADEL Cloud, powered by Next.js
|
- `login`: The login UI used by ZITADEL Cloud, powered by Next.js
|
||||||
- `@zitadel/node`: core components for establishing node client connection
|
- `@zitadel/client`: shared client utilities for node and browser environments
|
||||||
- `@zitadel/client`: shared client utilities
|
|
||||||
- `@zitadel/proto`: shared protobuf types
|
- `@zitadel/proto`: shared protobuf types
|
||||||
- `@zitadel/tsconfig`: shared `tsconfig.json`s used throughout the monorepo
|
- `@zitadel/tsconfig`: shared `tsconfig.json`s used throughout the monorepo
|
||||||
- `eslint-config-zitadel`: ESLint preset
|
- `eslint-config-zitadel`: ESLint preset
|
||||||
|
@@ -39,7 +39,6 @@
|
|||||||
"@tailwindcss/forms": "0.5.7",
|
"@tailwindcss/forms": "0.5.7",
|
||||||
"@vercel/analytics": "^1.2.2",
|
"@vercel/analytics": "^1.2.2",
|
||||||
"@zitadel/client": "workspace:*",
|
"@zitadel/client": "workspace:*",
|
||||||
"@zitadel/node": "workspace:*",
|
|
||||||
"@zitadel/proto": "workspace:*",
|
"@zitadel/proto": "workspace:*",
|
||||||
"clsx": "1.2.1",
|
"clsx": "1.2.1",
|
||||||
"copy-to-clipboard": "^3.3.3",
|
"copy-to-clipboard": "^3.3.3",
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
"use server";
|
"use server";
|
||||||
|
|
||||||
|
import { createServerTransport } from "@zitadel/client";
|
||||||
import { createUserServiceClient } from "@zitadel/client/v2";
|
import { createUserServiceClient } from "@zitadel/client/v2";
|
||||||
import { createServerTransport } from "@zitadel/node";
|
|
||||||
import { getSessionCookieById } from "./cookies";
|
import { getSessionCookieById } from "./cookies";
|
||||||
import { getSession } from "./zitadel";
|
import { getSession } from "./zitadel";
|
||||||
|
|
||||||
|
@@ -14,9 +14,8 @@ import {
|
|||||||
setPassword,
|
setPassword,
|
||||||
setUserPassword,
|
setUserPassword,
|
||||||
} from "@/lib/zitadel";
|
} from "@/lib/zitadel";
|
||||||
import { create } from "@zitadel/client";
|
import { create, createServerTransport } from "@zitadel/client";
|
||||||
import { createUserServiceClient } from "@zitadel/client/v2";
|
import { createUserServiceClient } from "@zitadel/client/v2";
|
||||||
import { createServerTransport } from "@zitadel/node";
|
|
||||||
import {
|
import {
|
||||||
Checks,
|
Checks,
|
||||||
ChecksSchema,
|
ChecksSchema,
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import { createServerTransport } from "@zitadel/client";
|
||||||
import {
|
import {
|
||||||
createIdpServiceClient,
|
createIdpServiceClient,
|
||||||
createOIDCServiceClient,
|
createOIDCServiceClient,
|
||||||
@@ -7,7 +8,6 @@ import {
|
|||||||
createUserServiceClient,
|
createUserServiceClient,
|
||||||
makeReqCtx,
|
makeReqCtx,
|
||||||
} from "@zitadel/client/v2";
|
} from "@zitadel/client/v2";
|
||||||
import { createServerTransport } from "@zitadel/node";
|
|
||||||
import { RequestChallenges } from "@zitadel/proto/zitadel/session/v2/challenge_pb";
|
import { RequestChallenges } from "@zitadel/proto/zitadel/session/v2/challenge_pb";
|
||||||
import { Checks } from "@zitadel/proto/zitadel/session/v2/session_service_pb";
|
import { Checks } from "@zitadel/proto/zitadel/session/v2/session_service_pb";
|
||||||
import {
|
import {
|
||||||
|
@@ -6,16 +6,16 @@
|
|||||||
"dependsOn": ["^build"]
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"dependsOn": ["@zitadel/node#build", "@zitadel/client#build"]
|
"dependsOn": ["@zitadel/client#build"]
|
||||||
},
|
},
|
||||||
"test:integration": {
|
"test:integration": {
|
||||||
"dependsOn": ["@zitadel/node#build", "@zitadel/client#build"]
|
"dependsOn": ["@zitadel/client#build"]
|
||||||
},
|
},
|
||||||
"test:unit": {
|
"test:unit": {
|
||||||
"dependsOn": ["@zitadel/node#build", "@zitadel/client#build"]
|
"dependsOn": ["@zitadel/client#build"]
|
||||||
},
|
},
|
||||||
"test:watch": {
|
"test:watch": {
|
||||||
"dependsOn": ["@zitadel/node#build", "@zitadel/client#build"]
|
"dependsOn": ["@zitadel/client#build"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -46,6 +46,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bufbuild/protobuf": "^2.2.2",
|
"@bufbuild/protobuf": "^2.2.2",
|
||||||
"@connectrpc/connect": "^2.0.0",
|
"@connectrpc/connect": "^2.0.0",
|
||||||
|
"@connectrpc/connect-node": "^2.0.0",
|
||||||
|
"@connectrpc/connect-web": "^2.0.0",
|
||||||
|
"jose": "^5.3.0",
|
||||||
"@zitadel/proto": "workspace:*"
|
"@zitadel/proto": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { createGrpcTransport, GrpcTransportOptions } from "@connectrpc/connect-node";
|
import { createGrpcTransport, GrpcTransportOptions } from "@connectrpc/connect-node";
|
||||||
import { NewAuthorizationBearerInterceptor } from "@zitadel/client";
|
|
||||||
import { importPKCS8, SignJWT } from "jose";
|
import { importPKCS8, SignJWT } from "jose";
|
||||||
|
import { NewAuthorizationBearerInterceptor } from "./interceptors";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a server transport with the given token and configuration options.
|
* Create a server transport with the given token and configuration options.
|
@@ -5,3 +5,5 @@ export { NewAuthorizationBearerInterceptor } from "./interceptors";
|
|||||||
export { create, fromJson, toJson } from "@bufbuild/protobuf";
|
export { create, fromJson, toJson } from "@bufbuild/protobuf";
|
||||||
export { TimestampSchema, timestampDate, timestampFromDate, timestampFromMs, timestampMs } from "@bufbuild/protobuf/wkt";
|
export { TimestampSchema, timestampDate, timestampFromDate, timestampFromMs, timestampMs } from "@bufbuild/protobuf/wkt";
|
||||||
export type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
|
export type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
|
||||||
|
|
||||||
|
export { createServerTransport, newSystemToken } from "./grpc";
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
// TODO: React is not used in the server package
|
|
||||||
extends: ["zitadel"],
|
|
||||||
};
|
|
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@zitadel/node",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"type": "module",
|
|
||||||
"sideEffects": false,
|
|
||||||
"license": "MIT",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"import": "./dist/index.js",
|
|
||||||
"require": "./dist/index.cjs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"dist/**"
|
|
||||||
],
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build": "tsup",
|
|
||||||
"test": "pnpm test:unit",
|
|
||||||
"test:watch": "pnpm test:unit:watch",
|
|
||||||
"test:unit": "vitest",
|
|
||||||
"test:unit:watch": "vitest --watch",
|
|
||||||
"dev": "tsup --watch",
|
|
||||||
"lint": "eslint \"src/**/*.ts*\"",
|
|
||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf src/proto"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@zitadel/client": "workspace:*",
|
|
||||||
"@connectrpc/connect": "^2.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@connectrpc/connect-node": "^2.0.0",
|
|
||||||
"@connectrpc/connect-web": "^2.0.0",
|
|
||||||
"jose": "^5.3.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@connectrpc/connect": "^2.0.0",
|
|
||||||
"@types/node": "^22.9.0",
|
|
||||||
"@zitadel/client": "workspace:*",
|
|
||||||
"@zitadel/tsconfig": "workspace:*",
|
|
||||||
"eslint-config-zitadel": "workspace:*"
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "@zitadel/tsconfig/tsup.json",
|
|
||||||
"include": ["./src/**/*"],
|
|
||||||
"exclude": ["dist", "build", "node_modules"]
|
|
||||||
}
|
|
@@ -1,13 +0,0 @@
|
|||||||
import { defineConfig, Options } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig((options: Options) => ({
|
|
||||||
treeshake: false,
|
|
||||||
splitting: true,
|
|
||||||
entry: ["src/index.ts"],
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
minify: false,
|
|
||||||
clean: true,
|
|
||||||
sourcemap: true,
|
|
||||||
...options,
|
|
||||||
}));
|
|
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"//"
|
|
||||||
],
|
|
||||||
"tasks": {
|
|
||||||
"build": {
|
|
||||||
"outputs": [
|
|
||||||
"dist/**"
|
|
||||||
],
|
|
||||||
"dependsOn": [
|
|
||||||
"@zitadel/client#build"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
34
pnpm-lock.yaml
generated
34
pnpm-lock.yaml
generated
@@ -91,9 +91,6 @@ importers:
|
|||||||
'@zitadel/client':
|
'@zitadel/client':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/zitadel-client
|
version: link:../../packages/zitadel-client
|
||||||
'@zitadel/node':
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../../packages/zitadel-node
|
|
||||||
'@zitadel/proto':
|
'@zitadel/proto':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/zitadel-proto
|
version: link:../../packages/zitadel-proto
|
||||||
@@ -263,41 +260,22 @@ importers:
|
|||||||
'@connectrpc/connect':
|
'@connectrpc/connect':
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.0.0(@bufbuild/protobuf@2.2.2)
|
version: 2.0.0(@bufbuild/protobuf@2.2.2)
|
||||||
'@zitadel/proto':
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../zitadel-proto
|
|
||||||
devDependencies:
|
|
||||||
'@bufbuild/protocompile':
|
|
||||||
specifier: ^0.0.1
|
|
||||||
version: 0.0.1(@bufbuild/buf@1.47.2)
|
|
||||||
'@zitadel/tsconfig':
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../zitadel-tsconfig
|
|
||||||
eslint-config-zitadel:
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../eslint-config-zitadel
|
|
||||||
|
|
||||||
packages/zitadel-node:
|
|
||||||
dependencies:
|
|
||||||
'@connectrpc/connect-node':
|
'@connectrpc/connect-node':
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.0.0(@bufbuild/protobuf@2.2.2)(@connectrpc/connect@2.0.0(@bufbuild/protobuf@2.2.2))
|
version: 2.0.0(@bufbuild/protobuf@2.2.2)(@connectrpc/connect@2.0.0(@bufbuild/protobuf@2.2.2))
|
||||||
'@connectrpc/connect-web':
|
'@connectrpc/connect-web':
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.0.0(@bufbuild/protobuf@2.2.2)(@connectrpc/connect@2.0.0(@bufbuild/protobuf@2.2.2))
|
version: 2.0.0(@bufbuild/protobuf@2.2.2)(@connectrpc/connect@2.0.0(@bufbuild/protobuf@2.2.2))
|
||||||
|
'@zitadel/proto':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../zitadel-proto
|
||||||
jose:
|
jose:
|
||||||
specifier: ^5.3.0
|
specifier: ^5.3.0
|
||||||
version: 5.8.0
|
version: 5.8.0
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@connectrpc/connect':
|
'@bufbuild/protocompile':
|
||||||
specifier: ^2.0.0
|
specifier: ^0.0.1
|
||||||
version: 2.0.0(@bufbuild/protobuf@2.2.2)
|
version: 0.0.1(@bufbuild/buf@1.47.2)
|
||||||
'@types/node':
|
|
||||||
specifier: ^22.9.0
|
|
||||||
version: 22.9.0
|
|
||||||
'@zitadel/client':
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../zitadel-client
|
|
||||||
'@zitadel/tsconfig':
|
'@zitadel/tsconfig':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../zitadel-tsconfig
|
version: link:../zitadel-tsconfig
|
||||||
|
Reference in New Issue
Block a user