@voxgig/sdkgen 0.32.2 → 0.33.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/voxgig-sdkgen +1 -1
- package/dist/cmp/Readme.js +10 -0
- package/dist/cmp/Readme.js.map +1 -1
- package/dist/cmp/ReadmeEntity.js +91 -8
- package/dist/cmp/ReadmeEntity.js.map +1 -1
- package/dist/cmp/ReadmeIntro.js +24 -2
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeModel.js +93 -16
- package/dist/cmp/ReadmeModel.js.map +1 -1
- package/dist/cmp/ReadmeOptions.js +30 -5
- package/dist/cmp/ReadmeOptions.js.map +1 -1
- package/dist/cmp/ReadmeRef.d.ts +2 -0
- package/dist/cmp/ReadmeRef.js +334 -0
- package/dist/cmp/ReadmeRef.js.map +1 -0
- package/dist/sdkgen.d.ts +2 -1
- package/dist/sdkgen.js +3 -1
- package/dist/sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -3
- package/project/.sdk/src/cmp/go/TestDirect_go.ts +2 -2
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +3 -3
- package/project/.sdk/src/cmp/js/Config_js.ts +62 -23
- package/project/.sdk/src/cmp/js/EntityOperation_js.ts +49 -0
- package/project/.sdk/src/cmp/js/Entity_js.ts +21 -50
- package/project/.sdk/src/cmp/js/MainEntity_js.ts +1 -1
- package/project/.sdk/src/cmp/js/Main_js.ts +53 -44
- package/project/.sdk/src/cmp/js/Package_js.ts +39 -12
- package/project/.sdk/src/cmp/js/Quick_js.ts +6 -10
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +101 -5
- package/project/.sdk/src/cmp/js/SdkError_js.ts +42 -0
- package/project/.sdk/src/cmp/js/TestDirect_js.ts +288 -0
- package/project/.sdk/src/cmp/js/TestEntity_js.ts +352 -2
- package/project/.sdk/src/cmp/js/TestMain_js.ts +0 -3
- package/project/.sdk/src/cmp/js/Test_js.ts +20 -8
- package/project/.sdk/src/cmp/js/fragment/Config.fragment.js +55 -0
- package/project/.sdk/src/cmp/js/fragment/Direct.test.fragment.js +30 -0
- package/project/.sdk/src/cmp/js/fragment/Entity.fragment.js +119 -28
- package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +39 -0
- package/project/.sdk/src/cmp/js/fragment/EntityCreateOp.fragment.js +89 -45
- package/project/.sdk/src/cmp/js/fragment/EntityListOp.fragment.js +92 -41
- package/project/.sdk/src/cmp/js/fragment/EntityLoadOp.fragment.js +95 -45
- package/project/.sdk/src/cmp/js/fragment/EntityRemoveOp.fragment.js +95 -43
- package/project/.sdk/src/cmp/js/fragment/EntityUpdateOp.fragment.js +95 -43
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +150 -65
- package/project/.sdk/src/cmp/js/fragment/SdkError.fragment.js +22 -0
- package/project/.sdk/src/cmp/js/utility_js.ts +64 -0
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +102 -5
- package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +2 -2
- package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +11 -8
- package/src/cmp/Readme.ts +12 -0
- package/src/cmp/ReadmeEntity.ts +105 -9
- package/src/cmp/ReadmeIntro.ts +30 -2
- package/src/cmp/ReadmeModel.ts +101 -18
- package/src/cmp/ReadmeOptions.ts +35 -6
- package/src/cmp/ReadmeRef.ts +369 -0
- package/src/sdkgen.ts +2 -0
|
@@ -1,61 +1,111 @@
|
|
|
1
|
-
class EntityOperation { // REMOVED
|
|
2
|
-
|
|
3
|
-
async load(match) {
|
|
4
|
-
const entity = this
|
|
5
|
-
const client = this.#client
|
|
6
|
-
const utility = this.#utility
|
|
7
|
-
const { operator, makeSpec, makeRequest, makeResponse, makeResult, error, struct, done } = utility
|
|
8
|
-
|
|
9
|
-
const op = {
|
|
10
|
-
entity: 'Name',
|
|
11
|
-
name: 'load',
|
|
12
|
-
path: 'PATH',
|
|
13
|
-
params: ['PARAM-LIST'],
|
|
14
|
-
alias: {'ALIAS':'MAP'},
|
|
15
|
-
match,
|
|
16
|
-
data: this.#data,
|
|
17
|
-
state: {},
|
|
18
|
-
reqform: 'REQFORM',
|
|
19
|
-
resform: 'RESFORM',
|
|
20
|
-
}
|
|
21
1
|
|
|
22
|
-
|
|
2
|
+
class EntityOperation {
|
|
3
|
+
|
|
4
|
+
#match
|
|
5
|
+
#data
|
|
6
|
+
#utility
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// EJECT-START
|
|
10
|
+
|
|
11
|
+
async load(reqmatch, ctrl) {
|
|
12
|
+
|
|
13
|
+
const utility = this.#utility
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
makeContext,
|
|
17
|
+
done,
|
|
18
|
+
error,
|
|
19
|
+
featureHook,
|
|
20
|
+
makeTarget,
|
|
21
|
+
makeRequest,
|
|
22
|
+
makeResponse,
|
|
23
|
+
makeResult,
|
|
24
|
+
makeSpec,
|
|
25
|
+
} = utility
|
|
26
|
+
|
|
27
|
+
let fres = undefined
|
|
28
|
+
|
|
29
|
+
let ctx = makeContext({
|
|
30
|
+
opname: 'load',
|
|
31
|
+
ctrl,
|
|
32
|
+
match: this.#match,
|
|
33
|
+
data: this.#data,
|
|
34
|
+
reqmatch
|
|
35
|
+
}, this._entctx)
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
// #PreSelection-Hook
|
|
39
|
+
|
|
40
|
+
ctx.out.target = makeTarget(ctx)
|
|
41
|
+
if (ctx.out.target instanceof Error) {
|
|
42
|
+
return error(ctx, ctx.out.target)
|
|
43
|
+
}
|
|
23
44
|
|
|
24
|
-
|
|
25
|
-
// #PreTarget-Hook
|
|
26
45
|
|
|
27
|
-
|
|
46
|
+
// #PreSpec-Hook
|
|
28
47
|
|
|
29
|
-
|
|
30
|
-
|
|
48
|
+
ctx.out.spec = makeSpec(ctx)
|
|
49
|
+
if (ctx.out.spec instanceof Error) {
|
|
50
|
+
return error(ctx, ctx.out.spec)
|
|
51
|
+
}
|
|
31
52
|
|
|
32
|
-
this.#match = op.match
|
|
33
|
-
|
|
34
|
-
await makeSpec(ctx)
|
|
35
53
|
|
|
36
|
-
|
|
37
|
-
// #PreRequest-Hook
|
|
54
|
+
// #PreRequest-Hook
|
|
38
55
|
|
|
39
|
-
|
|
56
|
+
ctx.out.request = await makeRequest(ctx)
|
|
57
|
+
if (ctx.out.request instanceof Error) {
|
|
58
|
+
return error(ctx, ctx.out.request)
|
|
59
|
+
}
|
|
40
60
|
|
|
41
|
-
|
|
42
|
-
// #PreResponse-Hook
|
|
43
61
|
|
|
44
|
-
|
|
62
|
+
// #PreResponse-Hook
|
|
45
63
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
64
|
+
ctx.out.response = await makeResponse(ctx)
|
|
65
|
+
if (ctx.out.response instanceof Error) {
|
|
66
|
+
return error(ctx, ctx.out.response)
|
|
67
|
+
}
|
|
50
68
|
|
|
51
|
-
|
|
52
|
-
// #PostOperation-Hook
|
|
53
69
|
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
// #PreResult-Hook
|
|
71
|
+
|
|
72
|
+
ctx.out.result = await makeResult(ctx)
|
|
73
|
+
if (ctx.out.result instanceof Error) {
|
|
74
|
+
return error(ctx, ctx.out.result)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
// #PreDone-Hook
|
|
79
|
+
|
|
80
|
+
if (null != ctx.result) {
|
|
81
|
+
if (null != ctx.result.resmatch) {
|
|
82
|
+
this.#match = ctx.result.resmatch
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (null != ctx.result.resdata) {
|
|
86
|
+
this.#data = ctx.result.resdata
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return done(ctx)
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
// #PreUnexpected-Hook
|
|
94
|
+
|
|
95
|
+
err = this.#unexpected(ctx, err)
|
|
96
|
+
|
|
97
|
+
if (err) {
|
|
98
|
+
throw err
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
return undefined
|
|
102
|
+
}
|
|
103
|
+
}
|
|
56
104
|
}
|
|
57
105
|
|
|
58
|
-
|
|
106
|
+
// EJECT-END
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
#unexpected(ctx, err) { return err }
|
|
59
110
|
}
|
|
60
111
|
|
|
61
|
-
} // REMOVED
|
|
@@ -1,61 +1,113 @@
|
|
|
1
|
-
class EntityOperation { // REMOVED
|
|
2
|
-
|
|
3
|
-
async remove(match) {
|
|
4
|
-
let entity = this
|
|
5
|
-
let client = this.#client
|
|
6
|
-
const utility = this.#utility
|
|
7
|
-
const { operator, makeSpec, makeRequest, makeResponse, makeResult, error, struct, done } = utility
|
|
8
|
-
|
|
9
|
-
let op = {
|
|
10
|
-
entity: 'Name',
|
|
11
|
-
name: 'remove',
|
|
12
|
-
path: 'PATH',
|
|
13
|
-
params: ['PARAM-LIST'],
|
|
14
|
-
alias: {'ALIAS':'MAP'},
|
|
15
|
-
match,
|
|
16
|
-
data: this.#data,
|
|
17
|
-
state: {},
|
|
18
|
-
reqform: 'REQFORM',
|
|
19
|
-
resform: 'RESFORM',
|
|
20
|
-
}
|
|
21
1
|
|
|
22
|
-
|
|
2
|
+
class EntityOperation {
|
|
3
|
+
|
|
4
|
+
#match
|
|
5
|
+
#data
|
|
6
|
+
#utility
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// EJECT-START
|
|
10
|
+
|
|
11
|
+
async remove(reqmatch, ctrl) {
|
|
12
|
+
|
|
13
|
+
const utility = this.#utility
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
makeContext,
|
|
17
|
+
done,
|
|
18
|
+
error,
|
|
19
|
+
featureHook,
|
|
20
|
+
makeTarget,
|
|
21
|
+
makeRequest,
|
|
22
|
+
makeResponse,
|
|
23
|
+
makeResult,
|
|
24
|
+
makeSpec,
|
|
25
|
+
} = utility
|
|
26
|
+
|
|
27
|
+
let fres = undefined
|
|
28
|
+
|
|
29
|
+
let ctx = makeContext({
|
|
30
|
+
opname: 'remove',
|
|
31
|
+
ctrl,
|
|
32
|
+
match: this.#match,
|
|
33
|
+
data: this.#data,
|
|
34
|
+
reqmatch
|
|
35
|
+
}, this._entctx)
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
|
|
39
|
+
// #PreTarget-Hook
|
|
23
40
|
|
|
41
|
+
ctx.out.target = makeTarget(ctx)
|
|
42
|
+
if (ctx.out.target instanceof Error) {
|
|
43
|
+
return error(ctx, ctx.out.target)
|
|
44
|
+
}
|
|
24
45
|
|
|
25
|
-
// #PreTarget-Hook
|
|
26
46
|
|
|
27
|
-
|
|
47
|
+
// #PreSpec-Hook
|
|
28
48
|
|
|
29
|
-
|
|
30
|
-
|
|
49
|
+
ctx.out.spec = makeSpec(ctx)
|
|
50
|
+
if (ctx.out.spec instanceof Error) {
|
|
51
|
+
return error(ctx, ctx.out.spec)
|
|
52
|
+
}
|
|
31
53
|
|
|
32
|
-
this.#data = op.data
|
|
33
|
-
|
|
34
|
-
await makeSpec(ctx)
|
|
35
54
|
|
|
36
|
-
|
|
37
|
-
// #PreRequest-Hook
|
|
55
|
+
// #PreRequest-Hook
|
|
38
56
|
|
|
39
|
-
|
|
57
|
+
ctx.out.request = await makeRequest(ctx)
|
|
58
|
+
if (ctx.out.request instanceof Error) {
|
|
59
|
+
return error(ctx, ctx.out.request)
|
|
60
|
+
}
|
|
40
61
|
|
|
41
|
-
|
|
42
|
-
// #PreResponse-Hook
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
// #PreResponse-Hook
|
|
45
64
|
|
|
46
|
-
|
|
47
|
-
|
|
65
|
+
ctx.out.response = await makeResponse(ctx)
|
|
66
|
+
if (ctx.out.response instanceof Error) {
|
|
67
|
+
return error(ctx, ctx.out.response)
|
|
68
|
+
}
|
|
48
69
|
|
|
49
|
-
await makeResult(ctx)
|
|
50
70
|
|
|
71
|
+
// #PreResult-Hook
|
|
51
72
|
|
|
52
|
-
|
|
73
|
+
ctx.out.result = await makeResult(ctx)
|
|
74
|
+
if (ctx.out.result instanceof Error) {
|
|
75
|
+
return error(ctx, ctx.out.result)
|
|
76
|
+
}
|
|
53
77
|
|
|
54
|
-
|
|
55
|
-
|
|
78
|
+
|
|
79
|
+
// #PreDone-Hook
|
|
80
|
+
|
|
81
|
+
if (null != ctx.result) {
|
|
82
|
+
if (null != ctx.result.resmatch) {
|
|
83
|
+
this.#match = ctx.result.resmatch
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (null != ctx.result.resdata) {
|
|
87
|
+
this.#data = ctx.result.resdata
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return done(ctx)
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
// #PreSelection-Hook
|
|
95
|
+
|
|
96
|
+
err = this.#unexpected(ctx, err)
|
|
97
|
+
|
|
98
|
+
if (err) {
|
|
99
|
+
throw err
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return undefined
|
|
103
|
+
}
|
|
104
|
+
}
|
|
56
105
|
}
|
|
57
106
|
|
|
58
|
-
|
|
107
|
+
// EJECT-END
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
#unexpected(ctx, err) { return err }
|
|
111
|
+
|
|
59
112
|
}
|
|
60
|
-
|
|
61
|
-
} // REMOVED
|
|
113
|
+
|
|
@@ -1,61 +1,113 @@
|
|
|
1
|
-
class EntityOperation { // REMOVED
|
|
2
|
-
|
|
3
|
-
async update(data) {
|
|
4
|
-
let entity = this
|
|
5
|
-
let client = this.#client
|
|
6
|
-
const utility = this.#utility
|
|
7
|
-
const { operator, makeSpec, makeRequest, makeResponse, makeResult, error, struct, done } = utility
|
|
8
|
-
|
|
9
|
-
let op = {
|
|
10
|
-
entity: 'Name',
|
|
11
|
-
name: 'update',
|
|
12
|
-
path: 'PATH',
|
|
13
|
-
params: ['PARAM-LIST'],
|
|
14
|
-
alias: {'ALIAS':'MAP'},
|
|
15
|
-
match: this.#match,
|
|
16
|
-
data: null == data ? this.#data : data,
|
|
17
|
-
state: {},
|
|
18
|
-
reqform: 'REQFORM',
|
|
19
|
-
resform: 'RESFORM',
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let ctx = {client, entity, op, utility}
|
|
23
1
|
|
|
2
|
+
class EntityOperation {
|
|
3
|
+
|
|
4
|
+
#match
|
|
5
|
+
#data
|
|
6
|
+
#utility
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// EJECT-START
|
|
10
|
+
|
|
11
|
+
async update(reqdata, ctrl) {
|
|
12
|
+
|
|
13
|
+
const utility = this.#utility
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
makeContext,
|
|
17
|
+
done,
|
|
18
|
+
error,
|
|
19
|
+
featureHook,
|
|
20
|
+
makeTarget,
|
|
21
|
+
makeRequest,
|
|
22
|
+
makeResponse,
|
|
23
|
+
makeResult,
|
|
24
|
+
makeSpec,
|
|
25
|
+
} = utility
|
|
26
|
+
|
|
27
|
+
let fres = undefined
|
|
28
|
+
|
|
29
|
+
let ctx = makeContext({
|
|
30
|
+
opname: 'update',
|
|
31
|
+
ctrl,
|
|
32
|
+
match: this.#match,
|
|
33
|
+
data: this.#data,
|
|
34
|
+
reqdata
|
|
35
|
+
}, this._entctx)
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
|
|
39
|
+
// #PreSelection-Hook
|
|
24
40
|
|
|
25
|
-
|
|
41
|
+
ctx.out.target = makeTarget(ctx)
|
|
42
|
+
if (ctx.out.target instanceof Error) {
|
|
43
|
+
return error(ctx, ctx.out.target)
|
|
44
|
+
}
|
|
26
45
|
|
|
27
|
-
await operator(ctx)
|
|
28
46
|
|
|
29
|
-
|
|
30
|
-
// #PreSpec-Hook
|
|
47
|
+
// #PreSpec-Hook
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
ctx.out.spec = makeSpec(ctx)
|
|
50
|
+
if (ctx.out.spec instanceof Error) {
|
|
51
|
+
return error(ctx, ctx.out.spec)
|
|
52
|
+
}
|
|
35
53
|
|
|
36
|
-
|
|
37
|
-
// #PreRequest-Hook
|
|
38
54
|
|
|
39
|
-
|
|
55
|
+
// #PreRequest-Hook
|
|
40
56
|
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
ctx.out.request = await makeRequest(ctx)
|
|
58
|
+
if (ctx.out.request instanceof Error) {
|
|
59
|
+
return error(ctx, ctx.out.request)
|
|
60
|
+
}
|
|
43
61
|
|
|
44
|
-
await makeResponse(ctx)
|
|
45
62
|
|
|
46
|
-
|
|
47
|
-
// #PreResult-Hook
|
|
63
|
+
// #PreResponse-Hook
|
|
48
64
|
|
|
49
|
-
|
|
65
|
+
ctx.out.response = await makeResponse(ctx)
|
|
66
|
+
if (ctx.out.response instanceof Error) {
|
|
67
|
+
return error(ctx, ctx.out.response)
|
|
68
|
+
}
|
|
50
69
|
|
|
51
70
|
|
|
52
|
-
|
|
71
|
+
// #PreResult-Hook
|
|
53
72
|
|
|
54
|
-
|
|
55
|
-
|
|
73
|
+
ctx.out.result = await makeResult(ctx)
|
|
74
|
+
if (ctx.out.result instanceof Error) {
|
|
75
|
+
return error(ctx, ctx.out.result)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
// #PreDone-Hook
|
|
80
|
+
|
|
81
|
+
if (null != ctx.result) {
|
|
82
|
+
if (null != ctx.result.resmatch) {
|
|
83
|
+
this.#match = ctx.result.resmatch
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (null != ctx.result.resdata) {
|
|
87
|
+
this.#data = ctx.result.resdata
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return done(ctx)
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
// #PreUnexpected-Hook
|
|
95
|
+
|
|
96
|
+
err = this.#unexpected(ctx, err)
|
|
97
|
+
|
|
98
|
+
if (err) {
|
|
99
|
+
throw err
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return undefined
|
|
103
|
+
}
|
|
104
|
+
}
|
|
56
105
|
}
|
|
57
106
|
|
|
58
|
-
|
|
107
|
+
// EJECT-END
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
#unexpected(ctx, err) { return err }
|
|
111
|
+
|
|
59
112
|
}
|
|
60
113
|
|
|
61
|
-
} // REMOVED
|