Skip to content

Commit 15de350

Browse files
authored
[refactor] split Search members of Strapi List model into a Mixin (#22)
1 parent c39baf9 commit 15de350

File tree

5 files changed

+182
-154
lines changed

5 files changed

+182
-154
lines changed

wrapper/Strapi/ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ if (!['localhost', '127.0.0.1', '0.0.0.0'].includes(location.hostname))
5353
### `model/Article.ts`
5454

5555
```typescript
56-
import { Base, BaseUser, StrapiListModel } from 'mobx-strapi';
56+
import { Base, BaseUser, Searchable, StrapiListModel } from 'mobx-strapi';
5757

5858
import { session } from './Session';
5959

6060
export interface Article extends Base, Record<'title' | 'summary', string> {
6161
author: BaseUser;
6262
}
6363

64-
export class ArticleModel extends StrapiListModel<Article> {
64+
export class ArticleModel extends Searchable<Article>(StrapiListModel) {
6565
client = session.client;
6666
baseURI = 'articles';
6767
// for Strapi 5

wrapper/Strapi/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobx-strapi",
3-
"version": "0.6.7",
3+
"version": "0.7.0",
44
"license": "LGPL-3.0",
55
"author": "[email protected]",
66
"description": "MobX SDK for Strapi headless CMS",
@@ -27,7 +27,7 @@
2727
"mobx-restful": "^2.1.0",
2828
"qs": "^6.14.0",
2929
"regenerator-runtime": "^0.14.1",
30-
"web-utility": "^4.4.3"
30+
"web-utility": "^4.5.3"
3131
},
3232
"devDependencies": {
3333
"@parcel/config-default": "~2.15.4",
@@ -37,7 +37,7 @@
3737
"@types/qs": "^6.14.0",
3838
"mobx": "^6.13.7",
3939
"parcel": "~2.15.4",
40-
"typescript": "~5.8.3"
40+
"typescript": "~5.9.2"
4141
},
4242
"pnpm": {
4343
"onlyBuiltDependencies": [

0 commit comments

Comments
 (0)