Skip to content

Commit 729e8d9

Browse files
committed
Merge branch 'main' of github.com:devforth/adminforth into next
2 parents ccbdf30 + 02e3986 commit 729e8d9

6 files changed

Lines changed: 77 additions & 33 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
export interface PluginOptions {
1+
import {type PluginsCommonOptions } from "adminforth";
2+
3+
export interface PluginOptions extends PluginsCommonOptions {
24

35
}

adminforth/documentation/docs/tutorial/09-Advanced/01-plugin-development.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ In plugin options we will pass field name and `OPENAI_API_KEY`.
6060

6161

6262
```ts title='./af-plugin-chatgpt/types.ts'
63+
import {type PluginsCommonOptions } from "adminforth";
6364

64-
export interface PluginOptions {
65+
export interface PluginOptions extends PluginsCommonOptions {
6566

6667
//diff-add
6768
/**
@@ -557,9 +558,9 @@ To use adapter in plugin you should define it in plugin options:
557558
558559
```ts title='./af-plugin-any-complete/types.ts'
559560

560-
import { CompletionAdapter } from "adminforth";
561+
import { CompletionAdapter, type PluginsCommonOptions } from "adminforth";
561562

562-
export interface PluginOptions {
563+
export interface PluginOptions extends PluginsCommonOptions{
563564
...
564565

565566
//diff-add

adminforth/types/Back.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,6 +2241,7 @@ export interface IWebSocketBroker {
22412241

22422242
registerWsClient: (client: IWebSocketClient) => void;
22432243
}
2244+
22442245
export interface PluginsCommonOptions {
22452246
/**
22462247
* Id of the plugin. It should be unique across all plugins.

live-demo/app/package-lock.json

Lines changed: 61 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

live-demo/app/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"author": "",
1717
"description": "",
1818
"dependencies": {
19-
"@adminforth/audit-log": "^1.8.3",
20-
"@adminforth/bulk-ai-flow": "^1.18.11",
19+
"@adminforth/audit-log": "^1.9.12",
20+
"@adminforth/bulk-ai-flow": "^1.23.14",
2121
"@adminforth/chat-gpt": "^1.0.20",
2222
"@adminforth/clone-row": "^1.2.0",
2323
"@adminforth/completion-adapter-open-ai-chat-gpt": "^1.0.2",
@@ -27,13 +27,15 @@
2727
"@adminforth/image-generation-adapter-openai": "^1.0.7",
2828
"@adminforth/image-vision-adapter-openai": "^1.0.1",
2929
"@adminforth/import-export": "^1.4.6",
30+
"@adminforth/login-captcha": "^1.1.7",
31+
"@adminforth/login-captcha-adapter-cloudflare": "^1.0.16",
3032
"@adminforth/rich-editor": "^1.6.14",
3133
"@adminforth/storage-adapter-amazon-s3": "^1.0.11",
32-
"@adminforth/text-complete": "^1.8.9",
34+
"@adminforth/text-complete": "^2.0.7",
3335
"@adminforth/two-factors-auth": "^2.9.20",
3436
"@adminforth/upload": "^2.15.3",
3537
"@prisma/client": "^6.6.0",
36-
"adminforth": "^2.27.0-next.12",
38+
"adminforth": "^2.34.0",
3739
"better-sqlite3": "^10.0.0",
3840
"express": "^4.19.2"
3941
},

live-demo/app/resources/users.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const blockDemoUsers = async ({ record, adminUser, resource }) => {
77
return { ok: false, error: "You can't do this on demo.adminforth.dev" }
88
}
99
return { ok: true };
10-
}
10+
}
1111
export default {
1212
dataSource: 'maindb',
1313
table: 'users',
@@ -25,7 +25,7 @@ export default {
2525
}),
2626
new ForeignInlineListPlugin({
2727
foreignResourceId: 'audit_logs',
28-
}),
28+
}),
2929
],
3030
columns: [
3131
{

0 commit comments

Comments
 (0)