@atomicservice/ascf-base 1.0.13 → 1.0.14

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.
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/Schema",
4
+ "definitions": {
5
+ "Schema": {
6
+ "$ref": "#/definitions/RequestConfigList",
7
+ "description": "预拉取功能配置列表\n\nASCF根目录下的 preload.json 文件用来对预拉取配置。",
8
+ "markdownDescription": "预拉取功能配置列表。配置说明:fetchType:请求类型,固定为pre。data/headers:支持自定义任意键值对,字段不做强制约束"
9
+ },
10
+ "RequestConfigList": {
11
+ "type": "array",
12
+ "description": "预拉取功能配置列表",
13
+ "markdownDescription": "预拉取功能配置列表,数组内每个元素为单个预拉取的完整配置",
14
+ "items": {
15
+ "$ref": "#/definitions/IRequestConfig"
16
+ },
17
+ "additionalItems": false
18
+ },
19
+ "IRequestConfig": {
20
+ "type": "object",
21
+ "description": "单个预拉取请求配置项",
22
+ "markdownDescription": "单个预拉取配置项,包含请求类型、地址、方法、请求体、请求头等核心配置",
23
+ "properties": {
24
+ "fetchType": {
25
+ "allOf": [
26
+ {
27
+ "type": "string",
28
+ "enum": ["pre"]
29
+ }
30
+ ],
31
+ "default": "pre",
32
+ "description": "请求类型,仅支持pre(预请求)",
33
+ "markdownDescription": "请求类型,仅支持 `pre`(预请求),用于标记该请求为提前触发的预请求"
34
+ },
35
+ "url": {
36
+ "type": "string",
37
+ "format": "uri",
38
+ "description": "请求接口地址,需为合法URI格式",
39
+ "markdownDescription": "请求接口地址,需为合法URI格式(如:https://www.example.com)"
40
+ },
41
+ "method": {
42
+ "allOf": [
43
+ {
44
+ "type": "string",
45
+ "enum": ["POST", "GET", "PUT", "DELETE"]
46
+ }
47
+ ],
48
+ "default": "POST",
49
+ "description": "HTTP请求方法,支持POST/GET/PUT/DELETE",
50
+ "markdownDescription": "HTTP请求方法,支持以下值:\n\n- `POST`:POST请求\n- `GET`:GET请求\n- `PUT`:PUT请求\n- `DELETE`:DELETE请求"
51
+ },
52
+ "data": {
53
+ "$ref": "#/definitions/IRequestData",
54
+ "description": "请求体数据,字段不固定,支持任意自定义键值对",
55
+ "markdownDescription": "请求体数据,字段不做强制约束,支持任意自定义键值对"
56
+ },
57
+ "headers": {
58
+ "$ref": "#/definitions/IRequestHeaders",
59
+ "description": "请求头信息,字段不固定,支持任意自定义键值对",
60
+ "markdownDescription": "请求头信息,字段不做强制约束,支持任意自定义键值对(如:{\"Mossel-Source\":\"quickapp\"})"
61
+ },
62
+ "dataType": {
63
+ "allOf": [
64
+ {
65
+ "type": "string",
66
+ "enum": ["json"]
67
+ }
68
+ ],
69
+ "default": "json",
70
+ "description": "返回类型,仅支持json",
71
+ "markdownDescription": "返回类型,仅支持json"
72
+ }
73
+ },
74
+ "required": [
75
+ "fetchType",
76
+ "url",
77
+ "method"
78
+ ],
79
+ "additionalProperties": false
80
+ },
81
+ "IRequestData": {
82
+ "type": "object",
83
+ "description": "请求体数据,支持任意自定义键值对",
84
+ "markdownDescription": "请求体数据,字段不固定,支持任意字符串/数字/布尔类型的自定义键值对",
85
+ "additionalProperties": true,
86
+ "examples": [
87
+ {
88
+ "x": ""
89
+ }
90
+ ]
91
+ },
92
+ "IRequestHeaders": {
93
+ "type": "object",
94
+ "description": "请求头信息,支持任意自定义键值对",
95
+ "markdownDescription": "请求头信息,字段不固定,支持任意字符串类型的自定义键值对",
96
+ "additionalProperties": {
97
+ "type": "string"
98
+ },
99
+ "examples": [
100
+ {
101
+ "content-type": "application/json"
102
+ }
103
+ ]
104
+ }
105
+ }
106
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomicservice/ascf-base",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "author": "atomicservice",
5
5
  "description": "ascf base",
6
6
  "files": [