@yvhitxcel/opencode-remote 0.15.0

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.
Files changed (102) hide show
  1. package/README.md +82 -0
  2. package/bin/opencode-remote.js +70 -0
  3. package/bin/opencode-weixin.js +10 -0
  4. package/dist/AGENTS.md +20 -0
  5. package/dist/MEMORY.md +21 -0
  6. package/dist/bot-runner.js +180 -0
  7. package/dist/cli.js +256 -0
  8. package/dist/core/approval.js +95 -0
  9. package/dist/core/auth.js +119 -0
  10. package/dist/core/config.js +61 -0
  11. package/dist/core/notifications.js +134 -0
  12. package/dist/core/qiniu.js +267 -0
  13. package/dist/core/registry.js +86 -0
  14. package/dist/core/router.js +344 -0
  15. package/dist/core/session.js +403 -0
  16. package/dist/core/setup.js +418 -0
  17. package/dist/core/types.js +16 -0
  18. package/dist/feishu/adapter.js +72 -0
  19. package/dist/feishu/bot.js +168 -0
  20. package/dist/feishu/commands.js +601 -0
  21. package/dist/feishu/handler.js +380 -0
  22. package/dist/index.js +60 -0
  23. package/dist/opencode/client.js +823 -0
  24. package/dist/package-lock.json +762 -0
  25. package/dist/patch_spawn.js +28 -0
  26. package/dist/plugins/agents/acp/acp-adapter.js +42 -0
  27. package/dist/plugins/agents/claude-code/index.js +69 -0
  28. package/dist/plugins/agents/codex/index.js +44 -0
  29. package/dist/plugins/agents/copilot/index.js +44 -0
  30. package/dist/plugins/agents/opencode/index.js +66 -0
  31. package/dist/telegram/bot.js +288 -0
  32. package/dist/utils/message-split.js +38 -0
  33. package/dist/web/code-viewer.js +266 -0
  34. package/dist/weixin/adapter.js +135 -0
  35. package/dist/weixin/api.js +179 -0
  36. package/dist/weixin/bot.js +183 -0
  37. package/dist/weixin/commands.js +758 -0
  38. package/dist/weixin/handler.js +577 -0
  39. package/dist/weixin/node_modules/encodeurl/LICENSE +22 -0
  40. package/dist/weixin/node_modules/encodeurl/README.md +109 -0
  41. package/dist/weixin/node_modules/encodeurl/index.js +60 -0
  42. package/dist/weixin/node_modules/encodeurl/package.json +40 -0
  43. package/dist/weixin/node_modules/qiniu/.claude/settings.local.json +7 -0
  44. package/dist/weixin/node_modules/qiniu/.github/workflows/ci-test.yml +36 -0
  45. package/dist/weixin/node_modules/qiniu/.github/workflows/npm-publish.yml +20 -0
  46. package/dist/weixin/node_modules/qiniu/.github/workflows/version-check.yml +19 -0
  47. package/dist/weixin/node_modules/qiniu/.idea/MarsCodeWorkspaceAppSettings.xml +7 -0
  48. package/dist/weixin/node_modules/qiniu/.idea/codeStyles/Project.xml +44 -0
  49. package/dist/weixin/node_modules/qiniu/.idea/codeStyles/codeStyleConfig.xml +5 -0
  50. package/dist/weixin/node_modules/qiniu/.idea/git_toolbox_blame.xml +6 -0
  51. package/dist/weixin/node_modules/qiniu/.idea/inspectionProfiles/Project_Default.xml +6 -0
  52. package/dist/weixin/node_modules/qiniu/.idea/jsLibraryMappings.xml +6 -0
  53. package/dist/weixin/node_modules/qiniu/.idea/modules.xml +8 -0
  54. package/dist/weixin/node_modules/qiniu/.idea/nodejs-sdk.iml +12 -0
  55. package/dist/weixin/node_modules/qiniu/.idea/vcs.xml +6 -0
  56. package/dist/weixin/node_modules/qiniu/CHANGELOG.md +292 -0
  57. package/dist/weixin/node_modules/qiniu/README.md +56 -0
  58. package/dist/weixin/node_modules/qiniu/StorageResponseInterface.d.ts +239 -0
  59. package/dist/weixin/node_modules/qiniu/codecov.yml +28 -0
  60. package/dist/weixin/node_modules/qiniu/index.d.ts +1995 -0
  61. package/dist/weixin/node_modules/qiniu/index.js +32 -0
  62. package/dist/weixin/node_modules/qiniu/node_modules/encodeurl/HISTORY.md +14 -0
  63. package/dist/weixin/node_modules/qiniu/node_modules/encodeurl/LICENSE +22 -0
  64. package/dist/weixin/node_modules/qiniu/node_modules/encodeurl/README.md +128 -0
  65. package/dist/weixin/node_modules/qiniu/node_modules/encodeurl/index.js +60 -0
  66. package/dist/weixin/node_modules/qiniu/node_modules/encodeurl/package.json +40 -0
  67. package/dist/weixin/node_modules/qiniu/package.json +80 -0
  68. package/dist/weixin/node_modules/qiniu/qiniu/auth/digest.js +13 -0
  69. package/dist/weixin/node_modules/qiniu/qiniu/cdn.js +149 -0
  70. package/dist/weixin/node_modules/qiniu/qiniu/conf.js +254 -0
  71. package/dist/weixin/node_modules/qiniu/qiniu/fop.js +112 -0
  72. package/dist/weixin/node_modules/qiniu/qiniu/httpc/client.js +253 -0
  73. package/dist/weixin/node_modules/qiniu/qiniu/httpc/endpoint.js +66 -0
  74. package/dist/weixin/node_modules/qiniu/qiniu/httpc/endpointsProvider.js +27 -0
  75. package/dist/weixin/node_modules/qiniu/qiniu/httpc/endpointsRetryPolicy.js +76 -0
  76. package/dist/weixin/node_modules/qiniu/qiniu/httpc/middleware/base.js +31 -0
  77. package/dist/weixin/node_modules/qiniu/qiniu/httpc/middleware/index.js +9 -0
  78. package/dist/weixin/node_modules/qiniu/qiniu/httpc/middleware/qiniuAuth.js +53 -0
  79. package/dist/weixin/node_modules/qiniu/qiniu/httpc/middleware/retryDomains.js +101 -0
  80. package/dist/weixin/node_modules/qiniu/qiniu/httpc/middleware/ua.js +36 -0
  81. package/dist/weixin/node_modules/qiniu/qiniu/httpc/region.js +349 -0
  82. package/dist/weixin/node_modules/qiniu/qiniu/httpc/regionsProvider.js +788 -0
  83. package/dist/weixin/node_modules/qiniu/qiniu/httpc/regionsRetryPolicy.js +242 -0
  84. package/dist/weixin/node_modules/qiniu/qiniu/httpc/responseWrapper.js +40 -0
  85. package/dist/weixin/node_modules/qiniu/qiniu/retry/index.js +4 -0
  86. package/dist/weixin/node_modules/qiniu/qiniu/retry/retrier.js +99 -0
  87. package/dist/weixin/node_modules/qiniu/qiniu/retry/retryPolicy.js +55 -0
  88. package/dist/weixin/node_modules/qiniu/qiniu/rpc.js +237 -0
  89. package/dist/weixin/node_modules/qiniu/qiniu/rtc/app.js +123 -0
  90. package/dist/weixin/node_modules/qiniu/qiniu/rtc/credentials.js +57 -0
  91. package/dist/weixin/node_modules/qiniu/qiniu/rtc/room.js +118 -0
  92. package/dist/weixin/node_modules/qiniu/qiniu/rtc/util.js +16 -0
  93. package/dist/weixin/node_modules/qiniu/qiniu/sms/message.js +58 -0
  94. package/dist/weixin/node_modules/qiniu/qiniu/storage/form.js +442 -0
  95. package/dist/weixin/node_modules/qiniu/qiniu/storage/internal.js +214 -0
  96. package/dist/weixin/node_modules/qiniu/qiniu/storage/resume.js +1272 -0
  97. package/dist/weixin/node_modules/qiniu/qiniu/storage/rs.js +1764 -0
  98. package/dist/weixin/node_modules/qiniu/qiniu/util.js +382 -0
  99. package/dist/weixin/node_modules/qiniu/qiniu/zone.js +230 -0
  100. package/dist/weixin/node_modules/qiniu/tsconfig.json +112 -0
  101. package/dist/weixin/types.js +25 -0
  102. package/package.json +56 -0
@@ -0,0 +1,292 @@
1
+ ## CHANGE LOG
2
+
3
+ ## 7.15.2
4
+ - 对象存储,修复 pfop pipeline 参数无效问题
5
+
6
+ ## 7.15.1
7
+ - 对象存储,开放分片上传部分接口
8
+
9
+ ## 7.15.0
10
+ - 对象存储,分片上传默认使用分片 v2
11
+
12
+ ## 7.14.0
13
+ - 对象存储,持久化处理支持工作流模版
14
+ - 对象存储,修复持久化处理闲时任务的类型声明
15
+
16
+ ## 7.13.0
17
+ - 对象存储,新增空间级别上传加速开关
18
+ - 对象存储,优化断点续传开启方式
19
+ - 对象存储,优化回调签名验证函数,新增兼容 Qiniu 签名
20
+ - 对象存储,修复上传失败无法完成自动重试
21
+ - 在 Node.js 18 及以上触发
22
+ - 7.12.0 引入
23
+ - 对象存储,新增空间的创建、删除、按标签列举
24
+ - 对象存储,调整查询区域主备域名
25
+ - 修复内部 HttpClient 部分方法参数类型声明不正确
26
+
27
+ ## 7.12.0
28
+ - 对象存储,新增支持 Promise 风格异步
29
+ - 对象存储,修复分片上传 v1 在特定条件可能无法从断点继续上传
30
+ - 对象存储,新增支持新的区域对象 Region
31
+ - 对象存储,管理接口支持双活
32
+ - 对象存储,修复缺失的部分类型声明,新增响应的类型声明
33
+
34
+ ## 7.11.1
35
+ - 对象存储,上传策略移除严格模式,支持任意策略选项
36
+
37
+ ## 7.11.0
38
+ - 对象存储,新增支持归档直读存储
39
+ - 对象存储,批量操作、解冻操作支持自动查询 rs 服务域名
40
+
41
+ ## 7.10.1
42
+ - 对象存储,修复无法上传带有英文双引号的文件
43
+
44
+ ## 7.10.0
45
+ - 对象存储,上传支持双活
46
+ - 对象存储,上传回调支持 Promise 风格
47
+ - 对象存储,修复分片上传v2在创建 uploadId 失败后仍尝试上传
48
+
49
+ ## 7.9.0
50
+ - 对象存储,修复无法对 key 为空字符串的对象进行操作
51
+ - 对象存储,查询区域域名支持配置 UC 地址
52
+ - 对象存储,查询区域域名接口升级
53
+ - 对象存储,更新设置镜像源的域名
54
+ - 对象存储,新增请求中间件逻辑,方便拓展请求逻辑
55
+ - 对象存储,新增备用 UC 域名用于查询区域域名
56
+ - 对象存储,移除首尔区域
57
+ - 对象存储,新增 华东浙江2 区域的类型声明
58
+
59
+ ## 7.8.0
60
+ - 移除不推荐域名,并增加 亚太-首尔 和 华东-浙江2 固定区域
61
+ - RTC,优化请求失败的错误信息
62
+ - 对象存储,优化分片上传 ctx 超时检测
63
+ - 对象存储,修复事件、跨域部分 API 身份认证错误(v7.7.0 引入)
64
+ - 对象存储,新增事件、跨域 API 的类型声明(.d.ts)
65
+
66
+ ## 7.7.0
67
+ - 对象存储,管理类 API 发送请求时增加 [X-Qiniu-Date](https://developer.qiniu.com/kodo/3924/common-request-headers) (生成请求的时间) header
68
+
69
+ ## 7.6.1
70
+ - 添加sms typing
71
+
72
+ ## 7.6.0
73
+ - 对象存储,新增 setObjectLifeCycle 设置对象生命周期 API
74
+
75
+ ## 7.5.0
76
+ - 对象存储,新增支持 [深度归档存储类型](https://developer.qiniu.com/kodo/3956/kodo-category#deep_archive)
77
+ - 对象存储,修复在不制定区域信息情况下自动获取区域信息异常问题
78
+ - 修复 Qiniu 签名算法在对部分 http header 处理异常问题
79
+
80
+ ## 7.4.0
81
+ - 支持 [分片上传 V2](https://developer.qiniu.com/kodo/6364/multipartupload-interface)
82
+
83
+
84
+ ## 7.3.3
85
+ - 修复上传策略中forceSaveKey指定无效
86
+
87
+ ## 7.3.2
88
+ - 修复crc32指定值无效
89
+ - 修复checkCrc指定无效
90
+ - 统一checkCrc类型
91
+
92
+ ## 7.3.1
93
+ - 新增归档存储解冻接口
94
+ - 支持上传时key值为空字符串
95
+
96
+ ## v7.3.0
97
+ - 新增 19 个bucket及文件相关操作
98
+ - 新增文件列举 v2 接口功能
99
+ - 新增短信功能
100
+ - 更新上传加速域名策略
101
+ - 修复自动获取上传区域时的无效缓存
102
+ - 修复大文件上传异常
103
+ - 增加测试用例
104
+
105
+ ## v7.2.2
106
+ - 一些log输出问题,travis增加eslint 检查
107
+
108
+ ## v7.2.1
109
+ - 修复rtc获取回复存在的问题
110
+
111
+ ## v7.2.0
112
+ - 修复node的stream读取的chunk大小比较随意的问题
113
+
114
+ ## v7.1.9
115
+ - 修复新版node下resume up方式文件内容被缓存而导致的上传失败
116
+
117
+ ## v7.1.8
118
+ - 修复 index.d.ts 文件中zone的设置
119
+
120
+ ## v7.1.7
121
+ - 修复form上传在升级mime库后的错误
122
+
123
+ ## v7.1.6
124
+ - 修复rs和rsf的https默认域名
125
+ - 升级修复mime库的安全风险
126
+
127
+ ## v7.1.5
128
+ - 增加连麦功能
129
+
130
+ ## v7.1.3
131
+ - 增加新加坡机房
132
+
133
+ ## v7.1.2
134
+ - 增加自定义资源访问响应头部的功能
135
+ - 改进时间戳签名方法,支持复杂urlencode
136
+
137
+ ### v7.1.1
138
+ - 修复 index.d.ts 中的函数声明错误
139
+
140
+ ### v7.1.0
141
+ - 修复时间戳防盗链中存在特殊字符引发的签名错误
142
+ - 修复分片上传的时候最后一块小于2056字节引发的错误
143
+
144
+ ### v7.0.9
145
+ - 增加Qiniu方式的管理凭证生成方法以支持新的产品鉴权
146
+
147
+ ### v7.0.8
148
+ - 修复分片上传小文件的时候文件读取end的事件bug
149
+
150
+ ### v7.0.7
151
+ - 给form upload添加默认的crc32校验以避免网络层面的字节反转导致上传内容不正确
152
+ - 修复resume upload在上传小文件的时候出现的上传失败情况
153
+
154
+ ### v7.0.6
155
+ - 修复时间戳防盗链算法中对文件名的urlencode不兼容问题
156
+ - 发布index.d.ts文件
157
+
158
+ ### v7.0.5
159
+ - 修复zone获取失败时callbackFunc不存在的问题
160
+ - 增加分片上传的时候的progressCallback
161
+
162
+ ### v7.0.4
163
+ - 增加http&https代理功能
164
+
165
+ ### v7.0.2
166
+ - 修复cdn刷新文件和目录中方法引用错误
167
+
168
+ ### v7.0.1
169
+
170
+ - 重构文件表单上传和分片上传代码
171
+ - 重构CDN操作相关的代码
172
+ - 重构资源管理相关的代码
173
+ - 重构数据处理相关的代码
174
+ - 重构上传策略的相关代码
175
+
176
+ ### v6.1.14
177
+
178
+ 2017-01-16
179
+
180
+ - 增加CDN刷新、预取
181
+ - 增加获取带宽、流量数据
182
+ - 增加获取日志列表
183
+ - 增加时间戳防盗链签名
184
+
185
+ ### v6.1.13
186
+
187
+ 2016-10-13
188
+
189
+ - 修正从uptoken获取bucket
190
+
191
+ ### v6.1.12
192
+
193
+ 2016-10-10
194
+
195
+ - 增加多机房接口调用支持
196
+
197
+ ### v6.1.11
198
+
199
+ 2016-05-06
200
+
201
+ - npm 通过travis 自动发布
202
+
203
+ ### v6.1.10
204
+
205
+ 2016-04-25
206
+
207
+ - list 增加delimiter 支持
208
+ - 增加强制copy/move
209
+ - 底层使用putReadable 谢谢 @thesadabc
210
+ - 修正result 处理 谢谢 @loulin
211
+ - fix Unhandled stream error in pipe 谢谢@loulin
212
+ - putExtra 修正 paras 为 params
213
+
214
+ ### v6.1.9
215
+
216
+ 2015-12-03
217
+
218
+ - Make secure base url
219
+ - policy add fsizeMin
220
+ - 修正 getEncodedEntryUri(bucket, key)
221
+ - 文档修正
222
+
223
+ ### v6.1.8
224
+
225
+ 2015-05-13
226
+
227
+ - 上传增加putpolicy2
228
+
229
+ ### v6.1.7
230
+
231
+ 2015-05-09
232
+
233
+ - 上传putpolicy2增加 callbackHost、persistentPipeline, callbackFetchKey
234
+ - 增加fetch 函数
235
+ - imageview -> imageview2
236
+
237
+
238
+ ### v6.1.6
239
+
240
+ 2014-10-31
241
+
242
+ - 上传putpolicy2增加fsizelimit, insertonly
243
+
244
+
245
+ ### v6.1.5
246
+
247
+ 2014-7-23 issue [#111](https://github.com/qiniu/nodejs-sdk/pull/111)
248
+
249
+ - [#109] 统一user agent
250
+ - [#110] 更新put policy
251
+
252
+ ### v6.1.4
253
+
254
+ 2014-7-10 issue [#108](https://github.com/qiniu/nodejs-sdk/pull/108)
255
+
256
+ - [#107] 调整上传host
257
+
258
+
259
+ ### v6.1.3
260
+
261
+ 2014-4-03 issue [#102](https://github.com/qiniu/nodejs-sdk/pull/102)
262
+
263
+ - [#98] 增加pfop 功能
264
+ - [#99] 增加针对七牛callback的检查
265
+
266
+ ### v6.1.2
267
+
268
+ 2014-2-17 issue [#96](https://github.com/qiniu/nodejs-sdk/pull/96)
269
+
270
+ - Content-Length = 0 时的细节修复
271
+
272
+
273
+ ### v6.1.1
274
+
275
+ 2013-12-5 issue [#90](https://github.com/qiniu/nodejs-sdk/pull/90)
276
+
277
+ - 创建buffer前检测
278
+
279
+
280
+ ### v6.1.0
281
+
282
+ 2013-10-08 issues [#81](https://github.com/qiniu/nodejs-sdk/pull/81)
283
+
284
+ - 使用urllib
285
+ - 修复callbackUrl的bug
286
+ - 调整bucket的下载域名
287
+
288
+ ### v6.0.0
289
+
290
+ 2013-07-16 issue [#56](https://github.com/qiniu/nodejs-sdk/pull/56)
291
+
292
+ - 遵循 [sdkspec v6.0.4](https://github.com/qiniu/sdkspec/tree/v6.0.4)
@@ -0,0 +1,56 @@
1
+ # Qiniu Cloud SDK for Node.js
2
+
3
+ [![@qiniu on weibo](http://img.shields.io/badge/weibo-%40qiniutek-blue.svg)](http://weibo.com/qiniutek)
4
+ [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
5
+ [![NodeJS CI](https://github.com/qiniu/nodejs-sdk/actions/workflows/ci-test.yml/badge.svg?branch=master)](https://github.com/qiniu/nodejs-sdk/actions/workflows/ci-test.yml)
6
+ [![GitHub release](https://img.shields.io/github/v/tag/qiniu/nodejs-sdk.svg?label=release)](https://github.com/qiniu/nodejs-sdk/releases)
7
+ [![Code Climate](https://codeclimate.com/github/qiniu/nodejs-sdk.svg)](https://codeclimate.com/github/qiniu/nodejs-sdk)
8
+ [![Coverage Status](https://codecov.io/gh/qiniu/nodejs-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/qiniu/nodejs-sdk)
9
+ [![Latest Stable Version](https://img.shields.io/npm/v/qiniu.svg)](https://www.npmjs.com/package/qiniu)
10
+
11
+ ## 下载
12
+
13
+ ### 从 npm 安装
14
+
15
+ 这是我们建议的方式
16
+
17
+ ```bash
18
+ $ npm install qiniu
19
+ ```
20
+
21
+ ### 从 release 版本下载
22
+
23
+ 下载地址:[https://github.com/qiniu/nodejs-sdk/releases](https://github.com/qiniu/nodejs-sdk/releases)
24
+
25
+ 这里可以下载到旧版本的SDK,release 版本有版本号,有 [CHANGELOG](https://github.com/qiniu/nodejs-sdk/blob/master/CHANGELOG.md),使用规格也会比较稳定。
26
+
27
+ ### 从 git 库下载
28
+
29
+ 你可以直接用 git clone 下载源代码来使用。但是请注意非 master 分支的代码可能会变更,应谨慎使用。
30
+
31
+ ## 使用
32
+
33
+ 参考文档:[七牛云存储 Node.js SDK 使用指南](http://developer.qiniu.com/kodo/sdk/nodejs)
34
+
35
+ ## 测试
36
+ ```
37
+ $ cd ./test/
38
+ $ source test-env.sh
39
+ $ mocha --grep 'bucketinfo'
40
+ ```
41
+
42
+ ## 贡献代码
43
+
44
+ 1. Fork
45
+ 2. 创建您的特性分支 (`git checkout -b my-new-feature`)
46
+ 3. 提交您的改动 (`git commit -am 'Added some feature'`)
47
+ 4. 将您的修改记录提交到远程 `git` 仓库 (`git push origin my-new-feature`)
48
+ 5. 然后到 github 网站的该 `git` 远程仓库的 `my-new-feature` 分支下发起 Pull Request
49
+
50
+ ## 许可证
51
+
52
+ Copyright (c) 2015 qiniu.com
53
+
54
+ 基于 MIT 协议发布:
55
+
56
+ * [www.opensource.org/licenses/MIT](http://www.opensource.org/licenses/MIT)
@@ -0,0 +1,239 @@
1
+ /** 文件元信息 */
2
+ export interface StatObjectResult {
3
+ [k: string]: any;
4
+ /** 对象大小,单位为字节 */
5
+ fsize?: number;
6
+ /** 对象哈希值 */
7
+ hash: string;
8
+ /** 对象 MIME 类型 */
9
+ mimeType: string;
10
+ /** 对象存储类型,`0` 表示普通存储,`1` 表示低频存储,`2` 表示归档存储 */
11
+ type: number;
12
+ /** 文件上传时间,UNIX 时间戳格式,单位为 100 纳秒 */
13
+ putTime: number;
14
+ /** 资源内容的唯一属主标识 */
15
+ endUser?: string;
16
+ /** 归档存储文件的解冻状态,`2` 表示解冻完成,`1` 表示解冻中;归档文件冻结时,不返回该字段 */
17
+ restoreStatus?: number;
18
+ /** 文件状态。`1` 表示禁用;只有禁用状态的文件才会返回该字段 */
19
+ status?: number;
20
+ /** 对象 MD5 值,只有通过直传文件和追加文件 API 上传的文件,服务端确保有该字段返回 */
21
+ md5?: string;
22
+ /** 文件过期删除日期,UNIX 时间戳格式,文件在设置过期时间后才会返回该字段 */
23
+ expiration?: number;
24
+ /** 文件生命周期中转为低频存储的日期,UNIX 时间戳格式,文件在设置转低频后才会返回该字段 */
25
+ transitionToIA?: number;
26
+ /** 文件生命周期中转为归档存储的日期,UNIX 时间戳格式,文件在设置转归档后才会返回该字段 */
27
+ transitionToARCHIVE?: number;
28
+ /** 文件生命周期中转为深度归档存储的日期,UNIX 时间戳格式,文件在设置转归档后才会返回该字段 */
29
+ transitionToDeepArchive?: number;
30
+ /** 文件生命周期中转为归档直读存储的日期,UNIX 时间戳格式,文件在设置转归档直读后才会返回该字段 */
31
+ transitionToArchiveIR?: number;
32
+ /** 对象存储元信息 */
33
+ 'x-qn-meta'?: Record<string, string>;
34
+ /** 每个分片的大小,如没有指定 need_parts 参数则不返回 */
35
+ parts?: number[];
36
+ }
37
+
38
+ /** 对象条目,包含对象的元信息 */
39
+ interface ListedObjectEntry {
40
+ [k: string]: any;
41
+ /** 对象名称 */
42
+ key: string;
43
+ /** 文件上传时间,UNIX 时间戳格式,单位为 100 纳秒 */
44
+ putTime: number;
45
+ /** 文件的哈希值 */
46
+ hash: string;
47
+ /** 对象大小,单位为字节 */
48
+ fsize?: number;
49
+ /** 对象 MIME 类型 */
50
+ mimeType: string;
51
+ /** 对象存储类型,`0` 表示普通存储,`1` 表示低频存储,`2` 表示归档存储 */
52
+ type?: number;
53
+ /** 资源内容的唯一属主标识 */
54
+ endUser?: string;
55
+ /** 文件的存储状态,即禁用状态和启用状态间的的互相转换,`0` 表示启用,`1`表示禁用 */
56
+ status?: number;
57
+ /** 对象 MD5 值,只有通过直传文件和追加文件 API 上传的文件,服务端确保有该字段返回 */
58
+ md5?: string;
59
+ /** 每个分片的大小,如没有指定 need_parts 参数则不返回 */
60
+ parts?: number[];
61
+ }
62
+
63
+ /** 本次列举的对象条目信息 */
64
+ export interface GetObjectsResult {
65
+ [k: string]: any;
66
+ /** 有剩余条目则返回非空字符串,作为下一次列举的参数传入,如果没有剩余条目则返回空字符串 */
67
+ marker?: string;
68
+ /** 公共前缀的数组,如没有指定 delimiter 参数则不返回 */
69
+ commonPrefixes?: string[];
70
+ /** 条目的数组,不能用来判断是否还有剩余条目 */
71
+ items: ListedObjectEntry[];
72
+ }
73
+
74
+ /** 存储空间列表 */
75
+ export type GetBucketsResult = string[];
76
+
77
+ /** 空间规则 */
78
+ interface BucketRule {
79
+ [k: string]: any;
80
+ /** 空间规则名称 */
81
+ name: string;
82
+ /** 匹配的对象名称前缀 */
83
+ prefix: string;
84
+ /** 上传文件多少天后删除 */
85
+ delete_after_days?: number;
86
+ /** 文件上传多少天后转低频存储 */
87
+ to_line_after_days?: number;
88
+ /** 文件上传多少天后转归档存储 */
89
+ to_archive_after_days?: number;
90
+ /** 文件上传多少天后转深度归档存储 */
91
+ to_deep_archive_after_days?: number;
92
+ /** 文件上传多少天后转归档直读存储 */
93
+ to_archive_ir_after_days?: number;
94
+ /** 规则创建时间 */
95
+ ctime: string;
96
+ }
97
+
98
+ /** 空间规则列表 */
99
+ export type GetBucketRulesResult = BucketRule[];
100
+
101
+ /** 跨域规则 */
102
+ interface CorsRule {
103
+ [k: string]: any;
104
+ /** 允许的域名。必填;支持通配符 * ;*表示全部匹配;只有第一个 * 生效;需要设置 "Scheme";大小写敏感 */
105
+ allowed_origin: string[];
106
+ /** 允许的方法。必填;不支持通配符;大小写不敏感; */
107
+ allowed_method: string[];
108
+ allowed_header?: string[];
109
+ /** 选填;不支持通配符;X-Log, X-Reqid 是默认会暴露的两个 header;其他的 header 如果没有设置,则不会暴露;大小写不敏感; */
110
+ exposed_header?: string[];
111
+ /** 结果可以缓存的时间。选填;空则不缓存 */
112
+ max_age?: number;
113
+ }
114
+
115
+ /** 跨域规则列表 */
116
+ export type GetBucketCorsRulesResult = CorsRule[];
117
+
118
+ /** 抓取到的文件元信息 */
119
+ export interface FetchObjectResult {
120
+ [k: string]: any;
121
+ /** 抓取的对象内容的 Etag 值 */
122
+ hash: string;
123
+ /** 抓取后保存的对象名称 */
124
+ key: string;
125
+ /** 对象大小,单位为字节 */
126
+ fsize?: number;
127
+ /** 对象 MIME 类型 */
128
+ mimeType: string;
129
+ }
130
+
131
+ /** 管理指令的响应数据 */
132
+ interface OperationResponseData {
133
+ [k: string]: any;
134
+ /** 管理指令的错误信息,仅在发生错误时才返回 */
135
+ error?: string;
136
+ /** 对象大小,单位为字节,仅对 stat 指令才有效 */
137
+ fsize?: number;
138
+ /** 对象哈希值,仅对 stat 指令才有效 */
139
+ hash?: string;
140
+ /** 对象 MIME 类型,仅对 stat 指令才有效 */
141
+ mimeType?: string;
142
+ /** 对象存储类型,`0` 表示普通存储,`1` 表示低频存储,`2` 表示归档存储,仅对 stat 指令才有效 */
143
+ type?: number;
144
+ /** 文件上传时间,UNIX 时间戳格式,单位为 100 纳秒,仅对 stat 指令才有效 */
145
+ putTime?: number;
146
+ /** 资源内容的唯一属主标识 */
147
+ endUser?: string;
148
+ /** 归档存储文件的解冻状态,`2` 表示解冻完成,`1` 表示解冻中;归档文件冻结时,不返回该字段,仅对 stat 指令才有效 */
149
+ restoreStatus?: number;
150
+ /** 文件状态。`1` 表示禁用;只有禁用状态的文件才会返回该字段,仅对 stat 指令才有效 */
151
+ status?: number;
152
+ /** 对象 MD5 值,只有通过直传文件和追加文件 API 上传的文件,服务端确保有该字段返回,仅对 stat 指令才有效 */
153
+ md5?: string;
154
+ /** 文件过期删除日期,UNIX 时间戳格式,文件在设置过期时间后才会返回该字段,仅对 stat 指令才有效 */
155
+ expiration?: number;
156
+ /** 文件生命周期中转为低频存储的日期,UNIX 时间戳格式,文件在设置转低频后才会返回该字段,仅对 stat 指令才有效 */
157
+ transitionToIA?: number;
158
+ /** 文件生命周期中转为归档存储的日期,UNIX 时间戳格式,文件在设置转归档后才会返回该字段,仅对 stat 指令才有效 */
159
+ transitionToARCHIVE?: number;
160
+ /** 文件生命周期中转为深度归档存储的日期,UNIX 时间戳格式,文件在设置转归档后才会返回该字段,仅对 stat 指令才有效 */
161
+ transitionToDeepArchive?: number;
162
+ /** 文件生命周期中转为归档直读存储的日期,UNIX 时间戳格式,文件在设置转归档直读后才会返回该字段,仅对 stat 指令才有效 */
163
+ transitionToArchiveIR?: number;
164
+ }
165
+
166
+ /** 每个管理指令的响应信息 */
167
+ interface OperationResponse {
168
+ [k: string]: any;
169
+ /** 响应状态码 */
170
+ code: number;
171
+ /** 响应数据 */
172
+ data?: OperationResponseData;
173
+ }
174
+
175
+ /** 所有管理指令的响应信息 */
176
+ export type BatchOpsResult = OperationResponse[];
177
+
178
+ interface BucketEvent {
179
+ [k: string]: any;
180
+ name: string;
181
+ prefix: string;
182
+ suffix: string;
183
+ events: string[];
184
+ callback_urls: string[];
185
+ access_key?: string;
186
+ host?: string;
187
+ ctime: string;
188
+ }
189
+
190
+ export type GetBucketEventsResult = BucketEvent[];
191
+
192
+ interface AntiLeech {
193
+ [k: string]: any;
194
+ no_refer: boolean;
195
+ anti_leech_mode: number;
196
+ anti_leech_used: boolean;
197
+ source_enabled: boolean;
198
+ }
199
+
200
+ interface BucketDomainV3 {
201
+ [k: string]: any;
202
+ domain: string;
203
+ tbl: string;
204
+ owner: number;
205
+ ctime: number;
206
+ utime: number;
207
+ antileech: AntiLeech;
208
+ domainType?: number;
209
+ }
210
+
211
+ export type GetBucketDomainsV3Result = BucketDomainV3[];
212
+
213
+ export interface GetBucketInfoV2Result {
214
+ [k: string]: any;
215
+ source: string;
216
+ host: string;
217
+ protected: number;
218
+ private: number;
219
+ no_index_page: number;
220
+ max_age: number;
221
+ separator: string;
222
+ styles: Record<string, string>;
223
+ anti_leech_mode: number;
224
+ token_anti_leech: number;
225
+ refer_wl: string[];
226
+ refer_bl: string[];
227
+ source_enabled: boolean;
228
+ no_refer: boolean;
229
+ mac_key: string;
230
+ mac_key2: string;
231
+ remark: string;
232
+ ctime: string;
233
+ }
234
+
235
+ export interface GetBucketQuotaResult {
236
+ [k: string]: any;
237
+ size: number;
238
+ count: number;
239
+ }
@@ -0,0 +1,28 @@
1
+ codecov:
2
+ ci:
3
+ - prow.qiniu.io # prow 里面运行需添加,其他 CI 不要
4
+ require_ci_to_pass: no # 改为 no,否则 codecov 会等待其他 GitHub 上所有 CI 通过才会留言。
5
+
6
+ github_checks: #关闭github checks
7
+ annotations: false
8
+
9
+ comment:
10
+ layout: "reach, diff, flags, files"
11
+ behavior: new # 默认是更新旧留言,改为 new,删除旧的,增加新的。
12
+ require_changes: false # if true: only post the comment if coverage changes
13
+ require_base: no # [yes :: must have a base report to post]
14
+ require_head: yes # [yes :: must have a head report to post]
15
+ branches: # branch names that can post comment
16
+ - "master"
17
+
18
+ coverage:
19
+ status: # 评判 pr 通过的标准
20
+ patch: off
21
+ project: # project 统计所有代码x
22
+ default:
23
+ # basic
24
+ target: 80% # 总体通过标准
25
+ threshold: 3% # 允许单次下降的幅度
26
+ base: auto
27
+ if_not_found: success
28
+ if_ci_failed: error