Skip to content

Commit

Permalink
[add] Downloader classes (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery authored May 28, 2024
1 parent d49e8a2 commit 7a2d5aa
Show file tree
Hide file tree
Showing 19 changed files with 6,045 additions and 4,711 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
wrapper/
test/
.env
.parcel-cache/
.parcel*
docs/
.husky/
.github/
Expand Down
23 changes: 22 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Common [MobX][1] **abstract base Class & Decorator** utilities for [RESTful API]

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

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

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

## Usage

### `tsconfig.json`

```json
{
"compilerOptions": {
"target": "ES6",
"moduleResolution": "Node",
"useDefineForClassFields": true,
"experimentalDecorators": false,
"jsx": "react-jsx"
}
}
```

### Simple List

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

### File Downloader

Here is an example:

- [Downloader component](https://github.com/idea2app/React-MobX-Bootstrap-ts/blob/master/src/component/Downloader.tsx)
- [Downloader view](https://github.com/idea2app/React-MobX-Bootstrap-ts/blob/master/src/page/Downloader.tsx)

## Wrapper

1. [Strapi v4](https://github.com/idea2app/MobX-RESTful/blob/main/wrapper/Strapi)
Expand Down
45 changes: 24 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobx-restful",
"version": "0.7.0-rc.0",
"version": "1.0.0-rc.4",
"license": "LGPL-3.0",
"author": "shiy2008@gmail.com",
"description": "MobX SDK for RESTful API",
Expand All @@ -26,35 +26,38 @@
"types": "dist/index.d.ts",
"main": "dist/index.js",
"dependencies": {
"@swc/helpers": "^0.5.3",
"koajax": "^0.9.6",
"@swc/helpers": "^0.5.11",
"idb-keyval": "^6.2.1",
"koajax": "^1.1.0",
"native-file-system-adapter": "^3.0.1",
"regenerator-runtime": "^0.14.1",
"web-utility": "^4.1.3"
"web-streams-polyfill": "^4.0.0",
"web-utility": "^4.4.0"
},
"peerDependencies": {
"mobx": ">=6.11"
},
"devDependencies": {
"@octokit/openapi-types": "^19.1.0",
"@parcel/config-default": "^2.11.0",
"@parcel/packager-ts": "~2.11.0",
"@parcel/transformer-typescript-tsc": "^2.11.0",
"@parcel/transformer-typescript-types": "~2.11.0",
"@types/jest": "^29.5.11",
"@types/node": "^18.19.10",
"dotenv": "^16.4.1",
"husky": "^9.0.6",
"@octokit/openapi-types": "^22.2.0",
"@parcel/config-default": "~2.12.0",
"@parcel/packager-ts": "~2.12.0",
"@parcel/transformer-typescript-tsc": "~2.12.0",
"@parcel/transformer-typescript-types": "~2.12.0",
"@types/jest": "^29.5.12",
"@types/node": "^18.19.33",
"dotenv": "^16.4.5",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.0",
"mobx": "^6.12.0",
"lint-staged": "^15.2.5",
"mobx": "^6.12.3",
"open-cli": "^8.0.0",
"parcel": "~2.11.0",
"prettier": "^3.2.4",
"ts-jest": "^29.1.2",
"typedoc": "^0.25.7",
"typedoc-plugin-mdn-links": "^3.1.14",
"typescript": "~5.3.3"
"parcel": "~2.12.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.4",
"typedoc": "^0.25.13",
"typedoc-plugin-mdn-links": "^3.1.27",
"typescript": "~5.5.0-beta"
},
"prettier": {
"singleQuote": true,
Expand Down
Loading

0 comments on commit 7a2d5aa

Please sign in to comment.