mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-11 21:02:21 +00:00
organize dependencies
This commit is contained in:
40
.github/workflows/install.yml
vendored
Normal file
40
.github/workflows/install.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Install
|
||||
on:
|
||||
pull_request:
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
jobs:
|
||||
install:
|
||||
name: Install
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup pnpm 7
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
- name: Setup Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
- name: Install Dependencies
|
||||
id: deps
|
||||
run: pnpm install
|
||||
39
.github/workflows/test.yml
vendored
39
.github/workflows/test.yml
vendored
@@ -1,12 +1,19 @@
|
||||
name: Test
|
||||
name: Quality
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
quality:
|
||||
name: Ensure Quality
|
||||
runs-on: ubuntu-latest
|
||||
needs: dependencies
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
command:
|
||||
- lint
|
||||
- test:unit
|
||||
- test:integration
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
@@ -18,9 +25,27 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
- name: Install Dependencies
|
||||
id: deps
|
||||
run: pnpm install
|
||||
- name: Test
|
||||
id: test
|
||||
run: pnpm test
|
||||
- name: Check
|
||||
id: check
|
||||
run: pnpm ${{ matrix.command }}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { pathsToModuleNameMapper } from "ts-jest";
|
||||
import { compilerOptions } from "../tsconfig.json";
|
||||
|
||||
// We make these type imports explicit, so IDEs with their own typescript engine understand them, too.
|
||||
import type {} from '@testing-library/jest-dom'
|
||||
import type {} from "@testing-library/jest-dom";
|
||||
|
||||
export default async (): Promise<Config.InitialOptions> => {
|
||||
return {
|
||||
@@ -11,9 +11,7 @@ export default async (): Promise<Config.InitialOptions> => {
|
||||
transform: {
|
||||
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.json" }],
|
||||
},
|
||||
setupFilesAfterEnv: [
|
||||
"@testing-library/jest-dom/extend-expect",
|
||||
],
|
||||
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect"],
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
|
||||
prefix: "<rootDir>/../",
|
||||
}),
|
||||
|
||||
@@ -9,7 +9,7 @@ const nextConfig = {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: process.env.ZITADEL_API_URL.replace("https://", ""),
|
||||
hostname: process.env.ZITADEL_API_URL?.replace("https://", "") || "",
|
||||
port: "",
|
||||
pathname: "/**",
|
||||
},
|
||||
|
||||
48
apps/login/turbo.json
Normal file
48
apps/login/turbo.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"extends": [
|
||||
"//"
|
||||
],
|
||||
"pipeline": {
|
||||
"build": {
|
||||
"outputs": [
|
||||
"dist/**",
|
||||
".next/**",
|
||||
"!.next/cache/**"
|
||||
],
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": [
|
||||
"@zitadel/server#build",
|
||||
"@zitadel/react#build"
|
||||
]
|
||||
},
|
||||
"test:integration": {
|
||||
"dependsOn": [
|
||||
"@zitadel/server#build",
|
||||
"@zitadel/react#build"
|
||||
]
|
||||
},
|
||||
"test:unit": {
|
||||
"dependsOn": [
|
||||
"@zitadel/server#build"
|
||||
]
|
||||
},
|
||||
"test:watch": {
|
||||
"dependsOn": [
|
||||
"@zitadel/server#build",
|
||||
"@zitadel/react#build"
|
||||
]
|
||||
},
|
||||
"lint": {},
|
||||
"dev": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"clean": {
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,12 @@
|
||||
"generate": "turbo run generate",
|
||||
"build": "turbo run build",
|
||||
"test": "turbo run test",
|
||||
"test:unit": "turbo run test:unit",
|
||||
"test:integration": "turbo run test:integration",
|
||||
"test:watch": "turbo run test:watch",
|
||||
"dev": "turbo run dev --no-cache --continue",
|
||||
"lint": "turbo run lint",
|
||||
"lint:fix": "turbo run lint:fix",
|
||||
"clean": "turbo run clean && rm -rf node_modules",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
||||
"changeset": "changeset",
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
],
|
||||
"scripts": {
|
||||
"generate": "buf generate https://github.com/zitadel/zitadel.git --path ./proto/zitadel",
|
||||
"prebuild": "pnpm run generate",
|
||||
"build": "tsup src/index.ts --format esm,cjs --dts",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test": "pnpm test:unit",
|
||||
"test:watch": "pnpm test:unit:watch",
|
||||
"test:unit": "jest",
|
||||
"test:unit:watch": "jest --watch",
|
||||
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
||||
"lint": "eslint \"src/**/*.ts*\"",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
|
||||
18
packages/zitadel-client/turbo.json
Normal file
18
packages/zitadel-client/turbo.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": [
|
||||
"//"
|
||||
],
|
||||
"pipeline": {
|
||||
"generate": {
|
||||
"outputs": [
|
||||
"src/proto/**"
|
||||
],
|
||||
"cache": true
|
||||
},
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"generate"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,10 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup src/index.tsx --format esm,cjs --dts --external react",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test": "pnpm test:unit",
|
||||
"test:watch": "pnpm test:unit:watch",
|
||||
"test:unit": "jest",
|
||||
"test:unit:watch": "jest --watch",
|
||||
"dev": "tsup src/index.tsx --format esm,cjs --watch --dts --external react",
|
||||
"lint": "eslint \"src/**/*.ts*\"",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
|
||||
@@ -13,8 +13,10 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test": "pnpm test:unit",
|
||||
"test:watch": "pnpm test:unit:watch",
|
||||
"test:unit": "jest",
|
||||
"test:unit:watch": "jest --watch",
|
||||
"dev": "tsup --watch",
|
||||
"lint": "eslint \"src/**/*.ts*\"",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
],
|
||||
"scripts": {
|
||||
"generate": "buf generate https://github.com/zitadel/zitadel.git --path ./proto/zitadel",
|
||||
"prebuild": "pnpm run generate",
|
||||
"build": "tsup --dts",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test": "pnpm test:unit",
|
||||
"test:watch": "pnpm test:unit:watch",
|
||||
"test:unit": "jest",
|
||||
"test:unit:watch": "jest --watch",
|
||||
"dev": "tsup --dts --watch",
|
||||
"lint": "eslint \"src/**/*.ts*\"",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
|
||||
18
packages/zitadel-server/turbo.json
Normal file
18
packages/zitadel-server/turbo.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": [
|
||||
"//"
|
||||
],
|
||||
"pipeline": {
|
||||
"generate": {
|
||||
"outputs": [
|
||||
"src/proto/**"
|
||||
],
|
||||
"cache": true
|
||||
},
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"generate"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
46
turbo.json
46
turbo.json
@@ -1,44 +1,16 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"pipeline": {
|
||||
"generate": {
|
||||
"outputs": [
|
||||
"src/proto/**"
|
||||
],
|
||||
"cache": true
|
||||
},
|
||||
"build": {
|
||||
"outputs": [
|
||||
"dist/**",
|
||||
".next/**",
|
||||
"!.next/cache/**"
|
||||
],
|
||||
"dependsOn": [
|
||||
"lint",
|
||||
"generate",
|
||||
"^build"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": [
|
||||
"generate",
|
||||
"@zitadel/server#build"
|
||||
]
|
||||
},
|
||||
"test:watch": {
|
||||
"dependsOn": [
|
||||
"generate",
|
||||
"@zitadel/server#build"
|
||||
]
|
||||
},
|
||||
"generate": {},
|
||||
"build": {},
|
||||
"test": {},
|
||||
"test:unit": {},
|
||||
"test:integration": {},
|
||||
"test:watch": {},
|
||||
"lint": {},
|
||||
"dev": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"clean": {
|
||||
"cache": false
|
||||
}
|
||||
"lint:fix": {},
|
||||
"dev": {},
|
||||
"clean": {}
|
||||
},
|
||||
"globalDependencies": [
|
||||
"**/.env.*local"
|
||||
|
||||
Reference in New Issue
Block a user