Skip to content

Commit 7a2d5aa

Browse files
authored
[add] Downloader classes (#14)
1 parent d49e8a2 commit 7a2d5aa

File tree

19 files changed

+6045
-4711
lines changed

19 files changed

+6045
-4711
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
- uses: pnpm/action-setup@v2
1313
with:
14-
version: 8
14+
version: 9
1515
- uses: actions/setup-node@v3
1616
with:
1717
node-version: 18

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
wrapper/
22
test/
33
.env
4-
.parcel-cache/
4+
.parcel*
55
docs/
66
.husky/
77
.github/

ReadMe.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Common [MobX][1] **abstract base Class & Decorator** utilities for [RESTful API]
44

55
Just define your **Data models** & **Client HTTP methods**, then leave rest of things to MobX!
66

7-
[![MobX compatibility](https://img.shields.io/badge/Compatible-1?logo=mobx&label=MobX%204%2F5%2F6)][1]
7+
[![MobX compatibility](https://img.shields.io/badge/Compatible-1?logo=mobx&label=MobX%206%2F7)][1]
88
[![NPM Dependency](https://img.shields.io/librariesio/github/idea2app/MobX-RESTful.svg)][3]
99
[![CI & CD](https://github.com/idea2app/MobX-RESTful/actions/workflows/main.yml/badge.svg)][4]
1010

@@ -19,6 +19,20 @@ Just define your **Data models** & **Client HTTP methods**, then leave rest of t
1919

2020
## Usage
2121

22+
### `tsconfig.json`
23+
24+
```json
25+
{
26+
"compilerOptions": {
27+
"target": "ES6",
28+
"moduleResolution": "Node",
29+
"useDefineForClassFields": true,
30+
"experimentalDecorators": false,
31+
"jsx": "react-jsx"
32+
}
33+
}
34+
```
35+
2236
### Simple List
2337

2438
#### `model/client.ts`
@@ -190,6 +204,13 @@ export class MultipleRepository extends Stream<Repository>(RepositoryModel) {
190204
export default new MultipleRepository();
191205
```
192206

207+
### File Downloader
208+
209+
Here is an example:
210+
211+
- [Downloader component](https://github.com/idea2app/React-MobX-Bootstrap-ts/blob/master/src/component/Downloader.tsx)
212+
- [Downloader view](https://github.com/idea2app/React-MobX-Bootstrap-ts/blob/master/src/page/Downloader.tsx)
213+
193214
## Wrapper
194215

195216
1. [Strapi v4](https://github.com/idea2app/MobX-RESTful/blob/main/wrapper/Strapi)

package.json

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobx-restful",
3-
"version": "0.7.0-rc.0",
3+
"version": "1.0.0-rc.4",
44
"license": "LGPL-3.0",
55
"author": "[email protected]",
66
"description": "MobX SDK for RESTful API",
@@ -26,35 +26,38 @@
2626
"types": "dist/index.d.ts",
2727
"main": "dist/index.js",
2828
"dependencies": {
29-
"@swc/helpers": "^0.5.3",
30-
"koajax": "^0.9.6",
29+
"@swc/helpers": "^0.5.11",
30+
"idb-keyval": "^6.2.1",
31+
"koajax": "^1.1.0",
32+
"native-file-system-adapter": "^3.0.1",
3133
"regenerator-runtime": "^0.14.1",
32-
"web-utility": "^4.1.3"
34+
"web-streams-polyfill": "^4.0.0",
35+
"web-utility": "^4.4.0"
3336
},
3437
"peerDependencies": {
3538
"mobx": ">=6.11"
3639
},
3740
"devDependencies": {
38-
"@octokit/openapi-types": "^19.1.0",
39-
"@parcel/config-default": "^2.11.0",
40-
"@parcel/packager-ts": "~2.11.0",
41-
"@parcel/transformer-typescript-tsc": "^2.11.0",
42-
"@parcel/transformer-typescript-types": "~2.11.0",
43-
"@types/jest": "^29.5.11",
44-
"@types/node": "^18.19.10",
45-
"dotenv": "^16.4.1",
46-
"husky": "^9.0.6",
41+
"@octokit/openapi-types": "^22.2.0",
42+
"@parcel/config-default": "~2.12.0",
43+
"@parcel/packager-ts": "~2.12.0",
44+
"@parcel/transformer-typescript-tsc": "~2.12.0",
45+
"@parcel/transformer-typescript-types": "~2.12.0",
46+
"@types/jest": "^29.5.12",
47+
"@types/node": "^18.19.33",
48+
"dotenv": "^16.4.5",
49+
"husky": "^9.0.11",
4750
"jest": "^29.7.0",
4851
"jest-environment-jsdom": "^29.7.0",
49-
"lint-staged": "^15.2.0",
50-
"mobx": "^6.12.0",
52+
"lint-staged": "^15.2.5",
53+
"mobx": "^6.12.3",
5154
"open-cli": "^8.0.0",
52-
"parcel": "~2.11.0",
53-
"prettier": "^3.2.4",
54-
"ts-jest": "^29.1.2",
55-
"typedoc": "^0.25.7",
56-
"typedoc-plugin-mdn-links": "^3.1.14",
57-
"typescript": "~5.3.3"
55+
"parcel": "~2.12.0",
56+
"prettier": "^3.2.5",
57+
"ts-jest": "^29.1.4",
58+
"typedoc": "^0.25.13",
59+
"typedoc-plugin-mdn-links": "^3.1.27",
60+
"typescript": "~5.5.0-beta"
5861
},
5962
"prettier": {
6063
"singleQuote": true,

0 commit comments

Comments
 (0)