Skip to content

Commit 073b4af

Browse files
authored
Merge pull request #166 from SilasBerger/feature/upgrade-to-betterauth
Pull upgrade to better-auth.
2 parents e702525 + fe2709f commit 073b4af

File tree

96 files changed

+4056
-1555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+4056
-1555
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.9.0
1+
v22.15

.updateTdev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CURRENT_COMMIT=5103a900773b33dca171a591128d82a758724ac5
1+
CURRENT_COMMIT=439e0c4d9568d740a8577e58774106100f0522c7

dev/demoExamFile.json

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"data": {
66
"type": "string",
77
"documentRootId": "178c93a6-fa60-4ca8-97ed-f6b9344043e9",
8-
"transformers": [
9-
"trim"
10-
],
8+
"transformers": ["trim"],
119
"solutions": [
1210
{ "value": "/Users/[^/]+/Desktop/demo.mp4", "regex": true },
1311
{ "value": "C://Users/[^/]+/Desktop/demo.mp4", "regex": true }
@@ -19,14 +17,7 @@
1917
"points": 3,
2018
"data": {
2119
"type": "true-false",
22-
"answers": [
23-
true,
24-
true,
25-
false,
26-
true,
27-
false,
28-
false
29-
],
20+
"answers": [true, true, false, true, false, false],
3021
"grading": {
3122
"correct": 0.5,
3223
"incorrect": -0.25,
@@ -47,12 +38,7 @@
4738
"points": 2,
4839
"data": {
4940
"type": "multiple-choice",
50-
"answers": [
51-
true,
52-
true,
53-
false,
54-
false
55-
],
41+
"answers": [true, true, false, false],
5642
"grading": {
5743
"error": -1,
5844
"negativePoints": false
@@ -66,4 +52,4 @@
6652
"type": "string"
6753
}
6854
}
69-
}
55+
}

docs/tdev/app-architecture/api-deploy/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ page_id: 560cfd4d-4464-42ff-a121-a3d116ea1994
55
import Steps from '@tdev-components/Steps'
66
import { Val, TemplateCode, DynamicInput } from '@tdev-components/DynamicValues';
77
import _ from 'es-toolkit/compat';
8-
import { generateRandomBase64 } from './secureToken';
8+
import { generateRandomBase64 } from '../helpers/secureToken';
99

1010
# API Aufsetzen
1111

@@ -16,7 +16,6 @@ import { generateRandomBase64 } from './secureToken';
1616
<DynamicInput name="app" default='inf-teaching-api' />
1717
<DynamicInput name="domain" default='teaching-api.gbsl.website' />
1818
<DynamicInput name="APP_NAME" derived default={(page) => _.camelCase((page.dynamicValues.get('app') || 'inf-teaching-api'))} />
19-
<DynamicInput name="API_URI" placeholder='api://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' />
2019
<DynamicInput name="ALLOWED_ORIGINS" default='gbsl.website' />
2120
<DynamicInput name="ALLOW_SUBDOMAINS" default='true' />
2221
<DynamicInput name="SESSION_SECRET" monospace default='$(openssl rand -base64 32)' onRecalculate={() => generateRandomBase64()} />

docs/tdev/app-architecture/dokku/index.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ page_id: 323ff390-40d6-4bd5-ac6c-7a05f3515526
44

55
import Steps from '@tdev-components/Steps'
66
import { Val, TemplateCode, DynamicInput } from '@tdev-components/DynamicValues';
7+
import { generateRandomBase64 } from '../helpers/secureToken';
78

89
# Dokku Deploy
910

@@ -18,8 +19,8 @@ Durch das Hosten auf einem eigenen Server kann mit bspw. `http-auth` der Zugriff
1819
1. Eine neue App __<Val name="app" />__ auf dem Server erstellen
1920
<DynamicInput name="app" default='info-teaching-website' />
2021
<DynamicInput name="domain" default='info.gbsl.website' />
21-
<DynamicInput name="API_URI" default='api://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' />
22-
<DynamicInput name="BACKEND_URL" default='https://xxx-api.gbsl.website' />
22+
<DynamicInput name="BETTER_AUTH_URL" default='https://xxx-api.gbsl.website' />
23+
<DynamicInput name="BETTER_AUTH_SECRET" monospace default='$(openssl rand -base64 32)' onRecalculate={() => generateRandomBase64()} />
2324
<DynamicInput name="CLIENT_ID" default='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' />
2425
<DynamicInput name="TENANT_ID" default='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' />
2526
<TemplateCode>
@@ -32,19 +33,17 @@ Durch das Hosten auf einem eigenen Server kann mit bspw. `http-auth` der Zugriff
3233
# remove default global domain
3334
dokku domains:remove {{app}} {{app}}.gbsl.website
3435

35-
dokku config:set --no-restart {{app}} API_URI={{API_URI}}
3636
dokku config:set --no-restart {{app}} APP_URL=https://{{domain}}
37-
dokku config:set --no-restart {{app}} BACKEND_URL={{BACKEND_URL}}
37+
dokku config:set --no-restart {{app}} BETTER_AUTH_URL={{BETTER_AUTH_URL}}
3838
dokku config:set --no-restart {{app}} CLIENT_ID={{CLIENT_ID}}
3939
dokku config:set --no-restart {{app}} TENANT_ID={{TENANT_ID}}
4040
```
4141
</TemplateCode>
4242
:::details[Alternativ: direkt über <Val as="code">`/home/dokku/{{app}}/ENV`</Val>]
4343
<TemplateCode>
4444
```bash title="/home/dokku/{{app}}/ENV"
45-
API_URI="{{API_URI}}"
4645
APP_URL="https://{{domain}}"
47-
BACKEND_URL="{{BACKEND_URL}}"
46+
BETTER_AUTH_URL="{{BETTER_AUTH_URL}}"
4847
CLIENT_ID="{{CLIENT_ID}}"
4948
TENANT_ID="{{TENANT_ID}}"
5049
NGINX_ROOT="build"
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
page_id: a923c804-819a-4683-b284-001c285626bc
3+
tags: [remark]
4+
---
5+
6+
# Code as Attribute
7+
8+
Dieses Remark-Plugin ermöglicht es, Codeblöcke als Attribute an spezifizierte MDX-Komponenten zu übergeben. Dies ist besonders nützlich, wenn Codeblöcke als MD-Codeblock formatiert werden sollen, aber der Code als Inhalt an eine Komponente übergeben werden muss.
9+
10+
Wird bspw. eingesetzt für:
11+
- [SVG-Editor](../../../gallery/persistable-documents/svg-editor/index.mdx)
12+
- [Netpbm-Editor](../../../gallery/persistable-documents/netpbm-editor/index.mdx)
13+
- [HTML-Editor](../../../gallery/persistable-documents/html-editor/index.mdx)
14+
15+
:::flex{minWidth=250px}
16+
#### Vorher
17+
````md
18+
# Remark Code as Attribute
19+
20+
<HtmlEditor>
21+
```html name="index.html"
22+
<h1>Foo Bar</h1>
23+
```
24+
</HtmlEditor>
25+
````
26+
::br
27+
#### Nachher
28+
```md
29+
<HtmlEditor code="\n<h1>Foo Bar</h1>\n" />
30+
```
31+
:::
32+
33+
## Optionen
34+
35+
### `codeAttributesName`
36+
37+
Wird `codeAttributesName` angegeben, so werden die Attribute `lang` und `meta` des Codeblocks zusätzlich als Objekt mit diesem Namen übergeben.
38+
39+
```ts title="Komponenten-Konfiguration"
40+
{
41+
name: 'HtmlIDE',
42+
// highlight-start
43+
attributeName: 'code',
44+
codeAttributesName: 'codeAttributes'
45+
// highlight-end
46+
}
47+
```
48+
49+
:::flex{minWidth=250px}
50+
#### Vorher
51+
````md
52+
# Remark Code as Attribute
53+
54+
<TemplateCode>
55+
```html name=index.html
56+
<h1>Foo Bar</h1>
57+
```
58+
</TemplateCode>
59+
````
60+
::br
61+
#### Nachher
62+
```md
63+
<TemplateCode
64+
code="\n<h1>Foo Bar</h1>\n"
65+
lang="html"
66+
meta="name=index.html"
67+
/>
68+
```
69+
:::
70+
71+
### `processMultiple`
72+
Ist `processMultiple` gesetzt, so werden alle aufeinanderfolgenden Codeblöcke als Array von Objekten an die Komponente übergeben, wobei der CodeBlock im Feld `code` zu finden ist. Jedes Objekt enthält den Code und ggf. die Attribute `lang` und `meta`.
73+
74+
```ts title="Komponenten-Konfiguration"
75+
{
76+
name: 'HtmlIDE',
77+
// highlight-start
78+
attributeName: 'files',
79+
processMultiple: true
80+
// highlight-end
81+
}
82+
```
83+
84+
:::flex{minWidth=250px}
85+
#### Vorher
86+
````md
87+
# Remark Code as Attribute
88+
89+
<HtmlIDE>
90+
```html name=foo.html
91+
<h1>Foo</h1>
92+
```
93+
```html name=bar.html
94+
<h1>Bar</h1>
95+
```
96+
</HtmlIDE>
97+
````
98+
::br
99+
#### Nachher
100+
```mdx
101+
<HtmlIDE
102+
files={[
103+
{ code: "\n<h1>Foo</h1>\n", lang: "html", meta: "name=foo.html" },
104+
{ code: "\n<h1>Bar</h1>\n", lang: "html", meta: "name=bar.html" }
105+
]}
106+
/>
107+
```
108+
:::
109+
110+
111+
## Installation
112+
113+
:::info[Code]
114+
- `src/plugins/remark-code-as-attribute`
115+
:::
116+
117+
:::info[`docusaurus.config.ts`]
118+
```ts
119+
import codeAsAttributePlugin from './src/plugins/remark-code-as-attribute/plugin';
120+
121+
const REMARK_PLUGINS = [
122+
/* ... */
123+
[
124+
[
125+
codeAsAttributePlugin,
126+
{
127+
components: [
128+
{
129+
name: 'HtmlEditor', // Name der React-Komponente
130+
attributeName: 'code' // der Code wird als Attribut `code` übergeben
131+
},
132+
{
133+
name: 'HtmlIDE',
134+
attributeName: 'files',
135+
processMultiple: true // der Code wird als Array von MultiCode-Objekten übergeben
136+
},
137+
{
138+
name: 'TemplateCode',
139+
attributeName: 'code',
140+
codeAttributesName: 'codeAttributes' // es werden zusätzlich `lang` und `meta` übergeben
141+
}
142+
/*...*/
143+
],
144+
}
145+
]
146+
]
147+
];
148+
```
149+
:::
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
page_id: 250b7597-b43c-4923-968b-f10fd099fc10
3+
---
4+
import BrowserWindow from '@tdev-components/BrowserWindow';
5+
6+
# Browser Window
7+
8+
```tsx
9+
import BrowserWindow from '@tdev-components/BrowserWindow';
10+
11+
<BrowserWindow>
12+
Inhalte...
13+
</BrowserWindow>
14+
```
15+
16+
<BrowserWindow>
17+
Inhalte...
18+
</BrowserWindow>
19+
20+
## Optionen
21+
22+
### `url`
23+
24+
```tsx
25+
<BrowserWindow url="https://example.com">
26+
Auf der Seite [example.com](https://example.com) findet man...
27+
</BrowserWindow>
28+
```
29+
30+
<BrowserWindow url="https://example.com">
31+
Auf der Seite [example.com](https://example.com) findet man...
32+
</BrowserWindow>
33+
34+
### `href`
35+
36+
Die Adresse wird als Link dargestellt.
37+
38+
```tsx
39+
<BrowserWindow href="https://example.com">
40+
Auf der Seite example.com findet man...
41+
</BrowserWindow>
42+
<BrowserWindow href="https://example.com" url="👉 https://example.com">
43+
Inhalte...
44+
</BrowserWindow>
45+
```
46+
47+
<BrowserWindow href="https://example.com">
48+
Auf der Seite example.com findet man...
49+
</BrowserWindow>
50+
<BrowserWindow href="https://example.com" url="👉 https://example.com">
51+
Inhalte...
52+
</BrowserWindow>
53+
54+
55+
### `minHeight` und `maxHeight`
56+
57+
```tsx
58+
<BrowserWindow minHeight={200} maxHeight={400}>
59+
Inhalte...
60+
</BrowserWindow>
61+
<BrowserWindow maxHeight={200}>
62+
<div style={{ height: '800px', width: '70%', border: '2px solid red', borderRadius: '5px', padding: '10px' }}>
63+
Vieeele Inhalte...
64+
</div>
65+
</BrowserWindow>
66+
```
67+
68+
<BrowserWindow minHeight={200} maxHeight={400}>
69+
Inhalte...
70+
</BrowserWindow>
71+
<BrowserWindow maxHeight={200}>
72+
<div style={{ height: '800px', width: '70%', border: '2px solid red', borderRadius: '5px', padding: '10px' }}>
73+
Vieeele Inhalte...
74+
</div>
75+
</BrowserWindow>
76+
77+
### Weitere Attribute
78+
79+
`style`
80+
: CSS-Stil für das gesamte Browser-Fenster
81+
`bodyStyle`
82+
: CSS-Stil für den Inhaltsbereich
83+
`className`
84+
: Zusätzliche CSS-Klasse für das gesamte Browser-Fenster

docs/tdev/gallery/markdown/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ page_id: 49c5bf94-f670-4aa1-bfe8-5fcfa6371a15
33
sidebar_position: 20
44
---
55

6+
67
# Markdown
78

89
Remark und seine Plugins helfen dabei, Markdown- und MDX-Dateien zu verarbeiten und anzupassen, indem sie individuelle Funktionen hinzufügen, wie etwa die Umwandlung spezieller Syntax oder die Einbindung zusätzlicher Inhalte.

0 commit comments

Comments
 (0)