Skip to content

Commit

Permalink
feat: new package xsfetch
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Feb 5, 2025
1 parent da789f3 commit 2383d06
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '0.2'
version: "0.2"
ignorePaths: []
dictionaryDefinitions: []
dictionaries: []
Expand Down Expand Up @@ -29,6 +29,7 @@ words:
- valibot
- vitest
- xsai
- xsfetch
- xsschema
ignoreWords: []
import: []
35 changes: 35 additions & 0 deletions packages/xsfetch/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "xsfetch",
"type": "module",
"version": "0.0.31",
"description": "extra-small Fetch API with auto retry.",
"author": "Moeru AI",
"license": "MIT",
"homepage": "https://xsai.js.org",
"repository": {
"type": "git",
"url": "git+https://github.com/moeru-ai/xsai.git",
"directory": "packages/xsfetch"
},
"bugs": "https://github.com/moeru-ai/xsai/issues",
"keywords": [
"xsai",
"fetch"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "pkgroll",
"build:watch": "pkgroll --watch"
}
}
4 changes: 4 additions & 0 deletions packages/xsfetch/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface CreateFetchOptions {}

/** @experimental WIP */
export const createFetch = (_options: CreateFetchOptions) => fetch
4 changes: 4 additions & 0 deletions packages/xsfetch/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@importantimport/tsconfig/app.json",
"include": ["src"]
}
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{ "path": "./packages/tool/tsconfig.json" },
{ "path": "./packages/utils-stream/tsconfig.json" },
{ "path": "./packages/xsai/tsconfig.json" },
{ "path": "./packages/xsfetch/tsconfig.json" },
{ "path": "./packages/xsschema/tsconfig.json" },
{ "path": "./tsconfig.node.json" }
],
Expand Down

0 comments on commit 2383d06

Please sign in to comment.