@voxgig/create-sdkgen 0.4.0 → 0.5.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.
- package/bin/create-sdkgen +11 -12
- package/package.json +7 -9
- package/project/standard/.sdk/test/.model-config/model-config.json +5 -1
- package/project/standard/.sdk/test/primary/{inward.jsonic → clean.jsonic} +0 -1
- package/project/standard/.sdk/test/primary/done.jsonic +0 -1
- package/project/standard/.sdk/test/primary/{outward.jsonic → featureAdd.jsonic} +0 -1
- package/project/standard/.sdk/test/primary/featureHook.jsonic +2 -0
- package/project/standard/.sdk/test/primary/featureInit.jsonic +2 -0
- package/project/standard/.sdk/test/primary/fetcher.jsonic +2 -0
- package/project/standard/.sdk/test/primary/makeContext.jsonic +4 -0
- package/project/standard/.sdk/test/primary/makeError.jsonic +16 -0
- package/project/standard/.sdk/test/primary/makeFetchDef.jsonic +2 -0
- package/project/standard/.sdk/test/primary/{options.jsonic → makeOptions.jsonic} +5 -6
- package/project/standard/.sdk/test/primary/{request.jsonic → makeRequest.jsonic} +7 -13
- package/project/standard/.sdk/test/primary/makeResponse.jsonic +22 -0
- package/project/standard/.sdk/test/primary/makeResult.jsonic +2 -0
- package/project/standard/.sdk/test/primary/{spec.jsonic → makeSpec.jsonic} +9 -5
- package/project/standard/.sdk/test/primary/makeTarget.jsonic +2 -0
- package/project/standard/.sdk/test/primary/makeUrl.jsonic +21 -0
- package/project/standard/.sdk/test/primary/operator.jsonic +10 -53
- package/project/standard/.sdk/test/primary/{findparam.jsonic → param.jsonic} +6 -7
- package/project/standard/.sdk/test/primary/prepareAuth.jsonic +13 -0
- package/project/standard/.sdk/test/primary/prepareBody.jsonic +18 -0
- package/project/standard/.sdk/test/primary/prepareHeaders.jsonic +4 -0
- package/project/standard/.sdk/test/primary/prepareMethod.jsonic +10 -0
- package/project/standard/.sdk/test/primary/prepareParams.jsonic +9 -0
- package/project/standard/.sdk/test/primary/preparePath.jsonic +2 -0
- package/project/standard/.sdk/test/primary/prepareQuery.jsonic +8 -0
- package/project/standard/.sdk/test/primary/primary-test-index.jsonic +28 -21
- package/project/standard/.sdk/test/primary/resultBasic.jsonic +14 -0
- package/project/standard/.sdk/test/primary/resultBody.jsonic +4 -0
- package/project/standard/.sdk/test/primary/resultHeaders.jsonic +7 -0
- package/project/standard/.sdk/test/primary/transformRequest.jsonic +8 -0
- package/project/standard/.sdk/test/primary/transformResponse.jsonic +10 -0
- package/project/standard/.sdk/test/test.json +578 -682
- package/project/standard/.sdk/test/primary/auth.jsonic +0 -20
- package/project/standard/.sdk/test/primary/body.jsonic +0 -27
- package/project/standard/.sdk/test/primary/context.jsonic +0 -5
- package/project/standard/.sdk/test/primary/error.jsonic +0 -19
- package/project/standard/.sdk/test/primary/fullurl.jsonic +0 -50
- package/project/standard/.sdk/test/primary/headers.jsonic +0 -12
- package/project/standard/.sdk/test/primary/method.jsonic +0 -11
- package/project/standard/.sdk/test/primary/params.jsonic +0 -10
- package/project/standard/.sdk/test/primary/query.jsonic +0 -9
- package/project/standard/.sdk/test/primary/reqform.jsonic +0 -9
- package/project/standard/.sdk/test/primary/resbasic.jsonic +0 -15
- package/project/standard/.sdk/test/primary/resbody.jsonic +0 -5
- package/project/standard/.sdk/test/primary/resform.jsonic +0 -11
- package/project/standard/.sdk/test/primary/resheaders.jsonic +0 -9
- package/project/standard/.sdk/test/primary/response.jsonic +0 -20
package/bin/create-sdkgen
CHANGED
|
@@ -4,7 +4,7 @@ const Path = require('node:path')
|
|
|
4
4
|
const { statSync } = require('node:fs')
|
|
5
5
|
const { parseArgs } = require('node:util')
|
|
6
6
|
|
|
7
|
-
const {
|
|
7
|
+
const { Shape, Fault, One } = require('shape')
|
|
8
8
|
|
|
9
9
|
const Pkg = require('../package.json')
|
|
10
10
|
|
|
@@ -21,10 +21,6 @@ async function run() {
|
|
|
21
21
|
try {
|
|
22
22
|
let options = resolveOptions()
|
|
23
23
|
|
|
24
|
-
if(options.debug) {
|
|
25
|
-
DEBUG = true
|
|
26
|
-
}
|
|
27
|
-
|
|
28
24
|
if(options.version) {
|
|
29
25
|
version()
|
|
30
26
|
}
|
|
@@ -105,7 +101,7 @@ function resolveOptions() {
|
|
|
105
101
|
|
|
106
102
|
folder: {
|
|
107
103
|
type: 'string',
|
|
108
|
-
short: '
|
|
104
|
+
short: 'o',
|
|
109
105
|
default: ''
|
|
110
106
|
},
|
|
111
107
|
|
|
@@ -161,12 +157,12 @@ function resolveOptions() {
|
|
|
161
157
|
name = null == name ? '' : name
|
|
162
158
|
name = '' === name && (args.values.help || args.values.version) ? '__none__' : name
|
|
163
159
|
|
|
164
|
-
targets = args.values.target || []
|
|
160
|
+
let targets = args.values.target || []
|
|
165
161
|
if( 1 < args.positionals.length ) {
|
|
166
162
|
targets.push(args.positionals.slice(1))
|
|
167
163
|
}
|
|
168
164
|
|
|
169
|
-
features = args.values.feature || []
|
|
165
|
+
let features = args.values.feature || []
|
|
170
166
|
|
|
171
167
|
const options = {
|
|
172
168
|
name,
|
|
@@ -193,7 +189,7 @@ function resolveOptions() {
|
|
|
193
189
|
|
|
194
190
|
|
|
195
191
|
function validateOptions(rawOptions) {
|
|
196
|
-
const optShape =
|
|
192
|
+
const optShape = Shape({
|
|
197
193
|
name: Fault('The first argument must be the project name.', String),
|
|
198
194
|
def: '',
|
|
199
195
|
project: String,
|
|
@@ -245,13 +241,16 @@ Usage: npm create @voxgig/sdkgen@latest <name> <args>
|
|
|
245
241
|
<args> are the command arguments:
|
|
246
242
|
|
|
247
243
|
--def Path to the OpenAPI definition file (optional).
|
|
248
|
-
-d
|
|
244
|
+
-d
|
|
249
245
|
|
|
250
246
|
--project Project template (folder or package reference). Default: standard.
|
|
251
|
-
-p
|
|
247
|
+
-p
|
|
252
248
|
|
|
253
249
|
--folder Target output folder. Default: ./<name>-sdk.
|
|
254
|
-
-
|
|
250
|
+
-o
|
|
251
|
+
|
|
252
|
+
--feature Features to add. Can be specified multiple times.
|
|
253
|
+
-f
|
|
255
254
|
|
|
256
255
|
--install Run installation scripts. Default: install.
|
|
257
256
|
--no-install
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voxgig/create-sdkgen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"main": "dist/create-sdkgen.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "dist/create-sdkgen.d.ts",
|
|
@@ -41,17 +41,15 @@
|
|
|
41
41
|
"LICENSE"
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"esbuild": "^0.27.3",
|
|
47
|
-
"memfs": "^4.56.10",
|
|
44
|
+
"@types/node": "25.5.0",
|
|
45
|
+
"memfs": "^4.57.1",
|
|
48
46
|
"typescript": "^5.9.3"
|
|
49
47
|
},
|
|
50
48
|
"dependencies": {
|
|
51
|
-
"@voxgig/util": "^0.
|
|
52
|
-
"aontu": "^0.
|
|
49
|
+
"@voxgig/util": "^0.4.0",
|
|
50
|
+
"aontu": "^0.39.0",
|
|
53
51
|
"chokidar": "^5.0.0",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
52
|
+
"jostraca": "^0.28.0",
|
|
53
|
+
"shape": "^10.0.1"
|
|
56
54
|
}
|
|
57
55
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
basic: set: [
|
|
3
|
+
{ args:[{}], err:'SolardemoSDK: unknown operation: unknown error' }
|
|
4
|
+
{ args:[{},{}], err:'SolardemoSDK: unknown operation: unknown error' }
|
|
5
|
+
|
|
6
|
+
{ args:[{opname:foo}], err:'SolardemoSDK: foo: unknown error' }
|
|
7
|
+
{ args:[{opname:foo,result:{}}], err:'SolardemoSDK: foo: unknown error' }
|
|
8
|
+
|
|
9
|
+
{ args:[{opname:foo,result:{err:{message:bar}}}], err:'SolardemoSDK: foo: bar' }
|
|
10
|
+
{ args:[{opname:foo}, {message:zed}], err:'SolardemoSDK: foo: zed' }
|
|
11
|
+
|
|
12
|
+
{ args:[{opname:o0}, {message:e0}], err:'SolardemoSDK: o0: e0'
|
|
13
|
+
match: err:message:'SolardemoSDK: o0: e0'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
basic: set: [
|
|
3
3
|
{
|
|
4
|
-
in:
|
|
4
|
+
in: { config:{}, options:{} }
|
|
5
5
|
match: out: {
|
|
6
6
|
base: 'http://localhost:8000',
|
|
7
7
|
entity: {},
|
|
@@ -11,14 +11,14 @@ basic: set: [
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
{
|
|
14
|
-
in:
|
|
14
|
+
in: { options: {}, config: { options: {
|
|
15
15
|
base: 'http://cbase.example',
|
|
16
16
|
prefix: 'cpre-',
|
|
17
17
|
suffix: 'csuf-',
|
|
18
18
|
entity: {
|
|
19
19
|
foo: {}
|
|
20
20
|
}
|
|
21
|
-
}}
|
|
21
|
+
}}}
|
|
22
22
|
match: out: {
|
|
23
23
|
base: 'http://cbase.example',
|
|
24
24
|
prefix: 'cpre-',
|
|
@@ -32,7 +32,7 @@ basic: set: [
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
{
|
|
35
|
-
in:
|
|
35
|
+
in: {
|
|
36
36
|
options: {
|
|
37
37
|
base: 'http://cbase.example',
|
|
38
38
|
prefix: 'cpre-',
|
|
@@ -55,6 +55,5 @@ basic: set: [
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
]
|
|
60
58
|
|
|
59
|
+
]
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
DEF: {
|
|
4
|
-
client: a: test: options: { base: 'b0', system: fetch: '`fetch`' }
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
3
|
basic: set: [
|
|
10
4
|
{
|
|
11
5
|
ctx: {
|
|
12
|
-
op: params: [],
|
|
13
6
|
spec: {
|
|
14
7
|
base: 'http://localhost/base-',
|
|
15
8
|
prefix: 'prefix-',
|
|
@@ -17,15 +10,16 @@ basic: set: [
|
|
|
17
10
|
path: '/p0',
|
|
18
11
|
params: {},
|
|
19
12
|
query: {},
|
|
13
|
+
headers: {},
|
|
14
|
+
method: 'GET',
|
|
15
|
+
body: '__UNDEF__',
|
|
20
16
|
alias: {},
|
|
21
|
-
}
|
|
17
|
+
}
|
|
22
18
|
},
|
|
23
|
-
client: a
|
|
24
19
|
|
|
25
|
-
match:
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
match:ctx: {
|
|
21
|
+
response: '__EXISTS__'
|
|
22
|
+
result: '__EXISTS__'
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
25
|
]
|
|
31
|
-
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
basic: set: [
|
|
3
|
+
{
|
|
4
|
+
ctx: {
|
|
5
|
+
response: {
|
|
6
|
+
status: 201,
|
|
7
|
+
statusText: 'OK1'
|
|
8
|
+
headers: {h1:v1}
|
|
9
|
+
body: {b:1}
|
|
10
|
+
}
|
|
11
|
+
spec: {step:''}
|
|
12
|
+
result: {ok:false,status:-1,statusText:''}
|
|
13
|
+
target: {transform:{}}
|
|
14
|
+
}
|
|
15
|
+
match:ctx:result: {
|
|
16
|
+
ok: true
|
|
17
|
+
status: 201
|
|
18
|
+
statusText: 'OK1'
|
|
19
|
+
body: {b:1}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
DEF: {
|
|
3
|
-
|
|
3
|
+
setup: a: {
|
|
4
4
|
base: 'BASE-',
|
|
5
5
|
prefix: 'PREFIX-',
|
|
6
6
|
suffix: 'SUFFIX-',
|
|
@@ -11,9 +11,15 @@ DEF: {
|
|
|
11
11
|
basic: set: [
|
|
12
12
|
{
|
|
13
13
|
ctx: {
|
|
14
|
-
|
|
14
|
+
opname: 'list'
|
|
15
|
+
target: {
|
|
16
|
+
parts: [],
|
|
17
|
+
args: { params: [] },
|
|
18
|
+
params: [],
|
|
19
|
+
alias: {},
|
|
20
|
+
transform: {},
|
|
21
|
+
}
|
|
15
22
|
},
|
|
16
|
-
client: a
|
|
17
23
|
match: ctx: spec: {
|
|
18
24
|
base: 'BASE-',
|
|
19
25
|
prefix: 'PREFIX-',
|
|
@@ -25,8 +31,6 @@ basic: set: [
|
|
|
25
31
|
'content-type': 'application/json',
|
|
26
32
|
},
|
|
27
33
|
step: 'start',
|
|
28
|
-
alias: {}
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
]
|
|
32
|
-
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
basic: set: [
|
|
3
|
+
{
|
|
4
|
+
ctx: {
|
|
5
|
+
spec: {
|
|
6
|
+
base: 'base-',
|
|
7
|
+
prefix: 'prefix-',
|
|
8
|
+
suffix: 'suffix-',
|
|
9
|
+
path: '/p0/{a}',
|
|
10
|
+
params: {
|
|
11
|
+
a: 'A'
|
|
12
|
+
},
|
|
13
|
+
query: {},
|
|
14
|
+
alias: {}
|
|
15
|
+
},
|
|
16
|
+
result: { resmatch: {} }
|
|
17
|
+
},
|
|
18
|
+
out: 'base-/prefix-/p0/A/suffix-'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
]
|
|
@@ -1,60 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
basic: set: [
|
|
3
3
|
{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
params: ['foo_id'],
|
|
10
|
-
alias: {'foo_id':'id','id':'foo_id'},
|
|
11
|
-
match: {},
|
|
12
|
-
data: {},
|
|
13
|
-
state: {},
|
|
14
|
-
reqform: '`data`',
|
|
15
|
-
resform: '`body`',
|
|
16
|
-
check: {}
|
|
17
|
-
}
|
|
4
|
+
in: {
|
|
5
|
+
entity: 'Foo',
|
|
6
|
+
name: 'load',
|
|
7
|
+
input: 'match',
|
|
8
|
+
targets: []
|
|
18
9
|
}
|
|
19
|
-
match: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
path: '/foo/{foo_id}',
|
|
25
|
-
params: ['foo_id'],
|
|
26
|
-
alias: {'foo_id':'id','id':'foo_id'},
|
|
27
|
-
match: {},
|
|
28
|
-
data: {},
|
|
29
|
-
state: {},
|
|
30
|
-
reqform: '`data`',
|
|
31
|
-
resform: '`body`',
|
|
32
|
-
check: {}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
ctx: op: {}
|
|
39
|
-
err: 'Invalid data: Expected field entity to be string, but found no value. | Expected field kind to be exactly equal to one of req, res, but found no value. | Expected field name to be string, but found no value. | Expected field path to be string, but found no value. | Expected field reqform to be one of string, object, function, but found no value. | Expected field resform to be one of string, object, function, but found no value.'
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
ctx: op: {
|
|
44
|
-
entity: 11,
|
|
45
|
-
name: 22,
|
|
46
|
-
path: 33,
|
|
47
|
-
params: [44],
|
|
48
|
-
alias: {'foo_id':55},
|
|
49
|
-
match: 101,
|
|
50
|
-
data: 102,
|
|
51
|
-
state: 103,
|
|
52
|
-
reqform: 66,
|
|
53
|
-
resform: 77,
|
|
54
|
-
check: 88
|
|
10
|
+
match: out: {
|
|
11
|
+
entity: 'Foo',
|
|
12
|
+
name: 'load',
|
|
13
|
+
input: 'match',
|
|
14
|
+
targets: []
|
|
55
15
|
}
|
|
56
|
-
err: 'Invalid data: Expected field alias.foo_id to be string, but found number: 55. | Expected field check to be object, but found number: 88. | Expected field data to be one of {}, [], but found number: 102. | Expected field data to be array, but found number: 102. | Expected field entity to be string, but found number: 11. | Expected field kind to be exactly equal to one of req, res, but found no value. | Expected field match to be object, but found number: 101. | Expected field name to be string, but found number: 22. | Expected field path to be string, but found number: 33. | Expected field reqform to be one of string, object, function, but found number: 66. | Expected field resform to be one of string, object, function, but found number: 77. | Expected field state to be object, but found number: 103.'
|
|
57
16
|
}
|
|
58
|
-
|
|
59
17
|
]
|
|
60
|
-
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
DEF: {
|
|
4
|
-
ctx0: {
|
|
5
|
-
ctx1: .ctx0
|
|
6
|
-
ctx2: .ctx1 & {
|
|
7
|
-
ctx3: .ctx2 & {
|
|
8
|
-
ctx4: .ctx3
|
|
9
|
-
ctx5: .ctx4 & {
|
|
4
|
+
ctx0: {target:{alias:{}}}
|
|
5
|
+
ctx1: .ctx0
|
|
6
|
+
ctx2: .ctx1 & {reqmatch:{}}
|
|
7
|
+
ctx3: .ctx2 & {reqmatch:{a:'A'}}
|
|
8
|
+
ctx4: .ctx3
|
|
9
|
+
ctx5: .ctx4 & {target:{alias:{b:a}},spec:{alias:{}}}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
basic: set: [
|
|
@@ -19,4 +19,3 @@ basic: set: [
|
|
|
19
19
|
{ mark:70, args: [ .....DEF.ctx5, a ], out: 'A' }
|
|
20
20
|
{ mark:80, args: [ .....DEF.ctx5, b ], out: 'A', match: ctx:spec:alias:a:'b' }
|
|
21
21
|
]
|
|
22
|
-
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
basic: set: [
|
|
3
|
+
{
|
|
4
|
+
ctx: {
|
|
5
|
+
opname:create, target:{transform:{req:'`reqdata.foo`'}},
|
|
6
|
+
reqdata:{foo:{x:1}}
|
|
7
|
+
}
|
|
8
|
+
out: {x:1}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
{
|
|
12
|
+
ctx: {
|
|
13
|
+
opname:create, target:{transform:{req:'`reqdata.bar`'}},
|
|
14
|
+
reqdata:{foo:{x:2}}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
basic: set: [
|
|
3
|
+
{ ctx: {target:{args:{params:[]},params:[],alias:{}}}, out:{} }
|
|
4
|
+
{ ctx: {target:{args:{params:[{name:a}]},params:[a],alias:{}},reqmatch:{}}, out:{} }
|
|
5
|
+
{ ctx: {target:{args:{params:[{name:a}]},params:[a],alias:{}},reqmatch:{a:A}}, out:{a:A} }
|
|
6
|
+
{ ctx: {target:{args:{params:[{name:a}]},params:[a],alias:{}},reqmatch:{b:B}}, out:{} }
|
|
7
|
+
{ ctx: {target:{args:{params:[{name:a}]},params:[a],alias:{}},reqmatch:{a:A,b:B}}, out:{a:A} }
|
|
8
|
+
|
|
9
|
+
]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
basic: set: [
|
|
3
|
+
{ mark:10, ctx: {target:{params:[],alias:{}},reqmatch:{}}, out: {} }
|
|
4
|
+
{ mark:20, ctx: {target:{params:[a],alias:{}},reqmatch:{}}, out: {} }
|
|
5
|
+
{ mark:30, ctx: {target:{params:[a],alias:{}},reqmatch:{a:A}}, out: {} }
|
|
6
|
+
{ mark:40, ctx: {target:{params:[a],alias:{}},reqmatch:{b:B}}, out: {b:B} }
|
|
7
|
+
{ mark:50, ctx: {target:{params:[a],alias:{}},reqmatch:{a:A,b:B}}, out: {b:B} }
|
|
8
|
+
]
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
primary:
|
|
2
|
-
primary: body: @"body.jsonic"
|
|
3
|
-
primary: context: @"context.jsonic"
|
|
1
|
+
primary: clean: @"clean.jsonic"
|
|
4
2
|
primary: done: @"done.jsonic"
|
|
5
|
-
primary:
|
|
6
|
-
primary:
|
|
7
|
-
primary:
|
|
8
|
-
primary:
|
|
9
|
-
primary:
|
|
10
|
-
primary:
|
|
3
|
+
primary: featureAdd: @"featureAdd.jsonic"
|
|
4
|
+
primary: featureHook: @"featureHook.jsonic"
|
|
5
|
+
primary: featureInit: @"featureInit.jsonic"
|
|
6
|
+
primary: fetcher: @"fetcher.jsonic"
|
|
7
|
+
primary: makeContext: @"makeContext.jsonic"
|
|
8
|
+
primary: makeError: @"makeError.jsonic"
|
|
9
|
+
primary: makeFetchDef: @"makeFetchDef.jsonic"
|
|
10
|
+
primary: makeOptions: @"makeOptions.jsonic"
|
|
11
|
+
primary: makeRequest: @"makeRequest.jsonic"
|
|
12
|
+
primary: makeResponse: @"makeResponse.jsonic"
|
|
13
|
+
primary: makeResult: @"makeResult.jsonic"
|
|
14
|
+
primary: makeSpec: @"makeSpec.jsonic"
|
|
15
|
+
primary: makeTarget: @"makeTarget.jsonic"
|
|
16
|
+
primary: makeUrl: @"makeUrl.jsonic"
|
|
11
17
|
primary: operator: @"operator.jsonic"
|
|
12
|
-
primary:
|
|
13
|
-
primary:
|
|
14
|
-
primary:
|
|
15
|
-
primary:
|
|
16
|
-
primary:
|
|
17
|
-
primary:
|
|
18
|
-
primary:
|
|
19
|
-
primary:
|
|
20
|
-
primary:
|
|
21
|
-
primary:
|
|
22
|
-
primary:
|
|
23
|
-
primary:
|
|
18
|
+
primary: param: @"param.jsonic"
|
|
19
|
+
primary: prepareAuth: @"prepareAuth.jsonic"
|
|
20
|
+
primary: prepareBody: @"prepareBody.jsonic"
|
|
21
|
+
primary: prepareHeaders: @"prepareHeaders.jsonic"
|
|
22
|
+
primary: prepareMethod: @"prepareMethod.jsonic"
|
|
23
|
+
primary: prepareParams: @"prepareParams.jsonic"
|
|
24
|
+
primary: preparePath: @"preparePath.jsonic"
|
|
25
|
+
primary: prepareQuery: @"prepareQuery.jsonic"
|
|
26
|
+
primary: resultBasic: @"resultBasic.jsonic"
|
|
27
|
+
primary: resultBody: @"resultBody.jsonic"
|
|
28
|
+
primary: resultHeaders: @"resultHeaders.jsonic"
|
|
29
|
+
primary: transformRequest: @"transformRequest.jsonic"
|
|
30
|
+
primary: transformResponse: @"transformResponse.jsonic"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
basic: set: [
|
|
3
|
+
{ ctx:{response:{status:200,statusText:'OK'},result:{}},
|
|
4
|
+
match:out:{status:200,statusText:'OK'}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
{ ctx:{response:{status:500,statusText:'r01'},result:{}},
|
|
8
|
+
match:out:{status:500,statusText:'r01',err:message:'request: 500: r01'}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
{ ctx:{response:{status:400,statusText:'BAD'},result:{err:{message:'Foo'}}},
|
|
12
|
+
match:out:{status:400,statusText:'BAD',err:message:'Foo: request: 400: BAD'}
|
|
13
|
+
}
|
|
14
|
+
]
|