@kevisual/api 0.0.40 → 0.0.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevisual/api",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "",
5
5
  "main": "mod.ts",
6
6
  "scripts": {
@@ -22,8 +22,8 @@
22
22
  "type": "module",
23
23
  "devDependencies": {
24
24
  "@kevisual/cache": "^0.0.5",
25
- "@kevisual/query": "^0.0.38",
26
- "@kevisual/router": "^0.0.63",
25
+ "@kevisual/query": "^0.0.39",
26
+ "@kevisual/router": "^0.0.66",
27
27
  "@kevisual/types": "^0.0.12",
28
28
  "@kevisual/use-config": "^1.0.28",
29
29
  "@types/bun": "^1.3.8",
@@ -54,4 +54,4 @@
54
54
  "./resources": "./query/query-resources/index.ts",
55
55
  "./query/*": "./query/*"
56
56
  }
57
- }
57
+ }
@@ -157,7 +157,7 @@ export class QueryResources {
157
157
  return { code: 200, message: '上传成功' };
158
158
  }
159
159
 
160
- async getState(filepath: string, opts?: DataOpts): Promise<Result<Stat>> {
160
+ async getStat(filepath: string, opts?: DataOpts): Promise<Result<Stat>> {
161
161
  const url = `${this.prefix}${filepath}`;
162
162
  return adapter({
163
163
  url,
@@ -168,6 +168,15 @@ export class QueryResources {
168
168
  headers: this.header(opts?.headers),
169
169
  });
170
170
  }
171
+ /**
172
+ * @deprecated use getStat instead
173
+ * @param filepath
174
+ * @param opts
175
+ * @returns
176
+ */
177
+ async getState(filepath: string, opts?: DataOpts): Promise<Result<Stat>> {
178
+ return this.getStat(filepath, opts);
179
+ }
171
180
  async createFolder(folderpath: string, opts?: DataOpts): Promise<Result<any>> {
172
181
  const filepath = folderpath.endsWith('/') ? `${folderpath}keep.txt` : `${folderpath}/keep.txt`;
173
182
  return this.uploadFile(filepath, '文件夹占位,其他文件不存在,文件夹不存在,如果有其他文件夹,删除当前文件夹占位文件即可', opts);