@rainte/js 0.0.51 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7514 -5669
- package/dist/index.umd.cjs +19 -8
- package/dist/types/array/index.d.ts +2 -0
- package/dist/types/database/index.d.ts +14 -0
- package/dist/types/{src/hash → hash}/index.d.ts +1 -1
- package/dist/types/{src/http → http}/axios.d.ts +1 -1
- package/dist/types/http/index.d.ts +6 -0
- package/dist/types/{src/json → json}/index.d.ts +1 -1
- package/dist/types/lib.d.ts +10 -0
- package/dist/types/{src/url → url}/index.d.ts +1 -1
- package/index.d.ts +2 -2
- package/package.json +53 -50
- package/dist/types/lib/index.d.ts +0 -10
- package/dist/types/src/array/index.d.ts +0 -2
- package/dist/types/src/database/index.d.ts +0 -13
- package/dist/types/src/http/index.d.ts +0 -6
- package/dist/types/vite.config.d.ts +0 -2
- /package/dist/types/{src/blob → blob}/index.d.ts +0 -0
- /package/dist/types/{src/date → date}/index.d.ts +0 -0
- /package/dist/types/{src/main.d.ts → main.d.ts} +0 -0
- /package/dist/types/{src/storage → storage}/index.d.ts +0 -0
- /package/dist/types/{src/system → system}/index.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Dexie, { type Table } from 'dexie';
|
|
2
|
+
export interface DexieRow {
|
|
3
|
+
id?: number;
|
|
4
|
+
key: string;
|
|
5
|
+
value: any;
|
|
6
|
+
}
|
|
7
|
+
export declare class SubDexie extends Dexie {
|
|
8
|
+
rows: Table<DexieRow, number>;
|
|
9
|
+
constructor(name?: string);
|
|
10
|
+
}
|
|
11
|
+
export declare const getDB: (name?: string) => SubDexie;
|
|
12
|
+
export declare const db: SubDexie;
|
|
13
|
+
export declare const get: <T = any>(key: string, raw?: boolean) => Promise<T | undefined>;
|
|
14
|
+
export declare const set: (key: string, value: any) => import("dexie").PromiseExtended<number>;
|
|
@@ -3,5 +3,5 @@ export declare const message: <T = string>(data: any, text?: string) => T;
|
|
|
3
3
|
export declare const axios: import("axios").AxiosInstance;
|
|
4
4
|
export declare const tokenRequestInterceptor: () => number;
|
|
5
5
|
export declare const responseInterceptor: (onRejected?: ((error: any) => any) | null) => number;
|
|
6
|
-
export declare const retry: (error: any,
|
|
6
|
+
export declare const retry: (error: any, refreshRequest: () => Promise<unknown>) => Promise<unknown>;
|
|
7
7
|
export default axios;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
export * from './axios';
|
|
3
|
+
export declare const get: (url: string, params?: ObjectProps) => Promise<import("axios").AxiosResponse<any, any, {}, any>>;
|
|
4
|
+
export declare const post: (url: string, data?: ObjectProps) => Promise<import("axios").AxiosResponse<any, any, {}, any>>;
|
|
5
|
+
export declare const download: (config: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any, {}, any>>;
|
|
6
|
+
export declare const request: (config: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any, {}, any>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Options } from 'jsan';
|
|
1
|
+
import { type Options } from 'jsan';
|
|
2
2
|
export declare const stringify: (value?: unknown, replacer?: (key: string, value: unknown) => unknown | Array<number | string> | null, space?: string | number, _options?: Options | boolean) => string;
|
|
3
3
|
export declare const parse: <T = any>(text: string, reviver?: (key: string, value: unknown) => unknown) => T;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * as array from './array';
|
|
2
|
+
export * as blob from './blob';
|
|
3
|
+
export * as database from './database';
|
|
4
|
+
export * as date from './date';
|
|
5
|
+
export * as hash from './hash';
|
|
6
|
+
export * as http from './http';
|
|
7
|
+
export * as json from './json';
|
|
8
|
+
export * as storage from './storage';
|
|
9
|
+
export * as system from './system';
|
|
10
|
+
export * as url from './url';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const search: () => URLSearchParams;
|
|
2
2
|
export declare const params: () => ObjectProps;
|
|
3
|
-
export declare const open: (url?: string | URL, target?: string, features?: string) =>
|
|
3
|
+
export declare const open: (url?: string | URL, target?: string, features?: string) => Window | null;
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
type ObjectProps = Record<string, any>
|
|
2
|
-
type ProviderProps = { children:
|
|
3
|
-
type FunctionProps = (...args: any[]) =>
|
|
2
|
+
type ProviderProps<T = any> = { children: T }
|
|
3
|
+
type FunctionProps<T = any> = (...args: any[]) => T
|
package/package.json
CHANGED
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rainte/js",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
7
|
-
},
|
|
8
|
-
"files": [
|
|
9
|
-
"dist",
|
|
10
|
-
"index.d.ts"
|
|
11
|
-
],
|
|
12
|
-
"main": "./dist/index.umd.cjs",
|
|
13
|
-
"module": "./dist/index.js",
|
|
14
|
-
"types": "./dist/types/lib
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./dist/types/lib
|
|
18
|
-
"import": "./dist/index.js",
|
|
19
|
-
"require": "./dist/index.umd.cjs"
|
|
20
|
-
},
|
|
21
|
-
"./global": {
|
|
22
|
-
"types": "./index.d.ts"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"dev": "vite",
|
|
27
|
-
"build": "vite build && tsc",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"@types/
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@rainte/js",
|
|
3
|
+
"version": "0.0.55",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"index.d.ts"
|
|
11
|
+
],
|
|
12
|
+
"main": "./dist/index.umd.cjs",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/types/lib.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/types/lib.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.umd.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./global": {
|
|
22
|
+
"types": "./index.d.ts"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "vite",
|
|
27
|
+
"build": "vite build && tsc -b",
|
|
28
|
+
"lint": "oxlint",
|
|
29
|
+
"preview": "vite preview",
|
|
30
|
+
"upgrade": "pnpm up -L --registry=https://registry.npmjs.org",
|
|
31
|
+
"commit": "git add -A && git commit -m commit && git push || git push",
|
|
32
|
+
"release": "npm publish --registry=https://registry.npmjs.org",
|
|
33
|
+
"prepublishOnly": "npm run build && npm run commit && npm version patch",
|
|
34
|
+
"postpublish": "git push",
|
|
35
|
+
"test": "vitest"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"axios": "^1.21.0",
|
|
39
|
+
"dayjs": "^1.11.23",
|
|
40
|
+
"dexie": "^4.4.7",
|
|
41
|
+
"jsan": "^3.1.14"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/jsan": "^3.1.5",
|
|
45
|
+
"@types/node": "^26.6.6",
|
|
46
|
+
"fake-indexeddb": "^6.2.7",
|
|
47
|
+
"happy-dom": "^21.0.4",
|
|
48
|
+
"oxlint": "^1.90.0",
|
|
49
|
+
"typescript": "^7.0.2",
|
|
50
|
+
"vite": "^8.3.5",
|
|
51
|
+
"vitest": "^5.1.0"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * as array from '../src/array';
|
|
2
|
-
export * as blob from '../src/blob';
|
|
3
|
-
export * as database from '../src/database';
|
|
4
|
-
export * as date from '../src/date';
|
|
5
|
-
export * as hash from '../src/hash';
|
|
6
|
-
export * as http from '../src/http';
|
|
7
|
-
export * as json from '../src/json';
|
|
8
|
-
export * as storage from '../src/storage';
|
|
9
|
-
export * as system from '../src/system';
|
|
10
|
-
export * as url from '../src/url';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Dexie, { Table } from 'dexie';
|
|
2
|
-
export interface DexieRow {
|
|
3
|
-
id?: number;
|
|
4
|
-
key: string;
|
|
5
|
-
value: any;
|
|
6
|
-
}
|
|
7
|
-
export declare class SubDexie extends Dexie {
|
|
8
|
-
rows: Table<DexieRow>;
|
|
9
|
-
constructor();
|
|
10
|
-
}
|
|
11
|
-
export declare const db: SubDexie;
|
|
12
|
-
export declare const get: <T = any>(key: string, raw?: boolean) => Promise<T | undefined>;
|
|
13
|
-
export declare const set: (key: string, value: any) => Promise<any>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
|
2
|
-
export * from './axios';
|
|
3
|
-
export declare const get: (url: string, params?: ObjectProps) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
-
export declare const post: (url: string, data?: ObjectProps) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
-
export declare const download: (config: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
-
export declare const request: (config: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|