@voxgig/sdkgen 4.22.0 → 4.23.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/ReadmeTop.js +1 -1
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/ReadmeUnions.js +1 -1
- package/dist/cmp/ReadmeUnions.js.map +1 -1
- package/dist/cmp/Test.js +1 -1
- package/dist/cmp/Test.js.map +1 -1
- package/dist/helpers/buildIdNames.d.ts +3 -1
- package/dist/helpers/buildIdNames.js +15 -7
- package/dist/helpers/buildIdNames.js.map +1 -1
- package/dist/helpers/canonSpec.js +2 -2
- package/dist/helpers/canonSpec.js.map +1 -1
- package/dist/helpers/getMatchEntries.js +2 -2
- package/dist/helpers/getMatchEntries.js.map +1 -1
- package/dist/helpers/modelNames.js +5 -1
- package/dist/helpers/modelNames.js.map +1 -1
- package/dist/helpers/opShape.js +33 -33
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/pointPath.js +5 -10
- package/dist/helpers/pointPath.js.map +1 -1
- package/dist/helpers/resolved.js +2 -29
- package/dist/helpers/resolved.js.map +1 -1
- package/dist/sdkgen.d.ts +2 -2
- package/dist/sdkgen.js +5 -3
- package/dist/sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.js +15 -7
- package/dist/utility.js.map +1 -1
- package/package.json +3 -3
- package/project/.sdk/src/cmp/c/EntityTypes_c.ts +4 -4
- package/project/.sdk/src/cmp/c/ReadmeEntity_c.ts +3 -3
- package/project/.sdk/src/cmp/c/ReadmeModel_c.ts +3 -3
- package/project/.sdk/src/cmp/c/ReadmeRef_c.ts +5 -5
- package/project/.sdk/src/cmp/c/Schema_c.ts +1 -1
- package/project/.sdk/src/cmp/c/TestDirect_c.ts +12 -12
- package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +3 -3
- package/project/.sdk/src/cmp/clojure/ReadmeModel_clojure.ts +3 -3
- package/project/.sdk/src/cmp/clojure/ReadmeRef_clojure.ts +5 -5
- package/project/.sdk/src/cmp/clojure/Schema_clojure.ts +1 -1
- package/project/.sdk/src/cmp/cpp/EntityTypes_cpp.ts +3 -3
- package/project/.sdk/src/cmp/cpp/ReadmeEntity_cpp.ts +3 -3
- package/project/.sdk/src/cmp/cpp/ReadmeModel_cpp.ts +3 -3
- package/project/.sdk/src/cmp/cpp/ReadmeRef_cpp.ts +5 -5
- package/project/.sdk/src/cmp/cpp/Schema_cpp.ts +1 -1
- package/project/.sdk/src/cmp/cpp/TestDirect_cpp.ts +14 -14
- package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +51 -50
- package/project/.sdk/src/cmp/csharp/EntityTypes_csharp.ts +4 -4
- package/project/.sdk/src/cmp/csharp/ReadmeEntity_csharp.ts +3 -3
- package/project/.sdk/src/cmp/csharp/ReadmeModel_csharp.ts +3 -3
- package/project/.sdk/src/cmp/csharp/ReadmeRef_csharp.ts +5 -5
- package/project/.sdk/src/cmp/csharp/Schema_csharp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +30 -30
- package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +66 -65
- package/project/.sdk/src/cmp/elixir/EntityTypes_elixir.ts +4 -4
- package/project/.sdk/src/cmp/elixir/ReadmeEntity_elixir.ts +3 -3
- package/project/.sdk/src/cmp/elixir/ReadmeModel_elixir.ts +3 -3
- package/project/.sdk/src/cmp/elixir/ReadmeRef_elixir.ts +4 -4
- package/project/.sdk/src/cmp/elixir/Schema_elixir.ts +1 -1
- package/project/.sdk/src/cmp/go/EntityTypes_go.ts +4 -4
- package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +3 -3
- package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +3 -3
- package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +5 -5
- package/project/.sdk/src/cmp/go/Schema_go.ts +1 -1
- package/project/.sdk/src/cmp/go/TestDirect_go.ts +38 -38
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +75 -74
- package/project/.sdk/src/cmp/go/utility_go.ts +5 -5
- package/project/.sdk/src/cmp/java/EntityTypes_java.ts +4 -4
- package/project/.sdk/src/cmp/java/ReadmeEntity_java.ts +3 -3
- package/project/.sdk/src/cmp/java/ReadmeModel_java.ts +3 -3
- package/project/.sdk/src/cmp/java/ReadmeRef_java.ts +5 -5
- package/project/.sdk/src/cmp/java/Schema_java.ts +1 -1
- package/project/.sdk/src/cmp/java/TestDirect_java.ts +30 -30
- package/project/.sdk/src/cmp/java/TestEntity_java.ts +69 -68
- package/project/.sdk/src/cmp/js/EntityTypes_js.ts +5 -5
- package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +3 -3
- package/project/.sdk/src/cmp/js/ReadmeModel_js.ts +3 -3
- package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +5 -5
- package/project/.sdk/src/cmp/js/Schema_js.ts +1 -1
- package/project/.sdk/src/cmp/js/TestDirect_js.ts +27 -27
- package/project/.sdk/src/cmp/js/TestEntity_js.ts +66 -69
- package/project/.sdk/src/cmp/js/TestLive_js.ts +3 -3
- package/project/.sdk/src/cmp/js/utility_js.ts +5 -5
- package/project/.sdk/src/cmp/kotlin/EntityTypes_kotlin.ts +4 -4
- package/project/.sdk/src/cmp/kotlin/ReadmeEntity_kotlin.ts +3 -3
- package/project/.sdk/src/cmp/kotlin/ReadmeModel_kotlin.ts +3 -3
- package/project/.sdk/src/cmp/kotlin/ReadmeRef_kotlin.ts +5 -5
- package/project/.sdk/src/cmp/kotlin/Schema_kotlin.ts +1 -1
- package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +30 -30
- package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +67 -66
- package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +5 -5
- package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +3 -3
- package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +3 -3
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +4 -4
- package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +5 -5
- package/project/.sdk/src/cmp/lua/Schema_lua.ts +1 -1
- package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +25 -25
- package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +66 -65
- package/project/.sdk/src/cmp/ocaml/ReadmeEntity_ocaml.ts +3 -3
- package/project/.sdk/src/cmp/ocaml/ReadmeModel_ocaml.ts +3 -3
- package/project/.sdk/src/cmp/ocaml/ReadmeRef_ocaml.ts +5 -5
- package/project/.sdk/src/cmp/ocaml/Schema_ocaml.ts +1 -1
- package/project/.sdk/src/cmp/perl/ReadmeEntity_perl.ts +3 -3
- package/project/.sdk/src/cmp/perl/ReadmeModel_perl.ts +3 -3
- package/project/.sdk/src/cmp/perl/ReadmeRef_perl.ts +5 -5
- package/project/.sdk/src/cmp/perl/Schema_perl.ts +1 -1
- package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +25 -25
- package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +60 -59
- package/project/.sdk/src/cmp/php/EntityTypes_php.ts +4 -4
- package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +3 -3
- package/project/.sdk/src/cmp/php/ReadmeModel_php.ts +3 -3
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +4 -4
- package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +5 -5
- package/project/.sdk/src/cmp/php/Schema_php.ts +1 -1
- package/project/.sdk/src/cmp/php/TestDirect_php.ts +25 -25
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +66 -65
- package/project/.sdk/src/cmp/py/EntityTypes_py.ts +4 -4
- package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +3 -3
- package/project/.sdk/src/cmp/py/ReadmeModel_py.ts +3 -3
- package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +5 -5
- package/project/.sdk/src/cmp/py/Schema_py.ts +1 -1
- package/project/.sdk/src/cmp/py/TestDirect_py.ts +25 -25
- package/project/.sdk/src/cmp/py/TestEntity_py.ts +66 -65
- package/project/.sdk/src/cmp/py-data/Main_py-data.ts +4 -4
- package/project/.sdk/src/cmp/rb/EntityTypes_rb.ts +4 -4
- package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/ReadmeModel_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +4 -4
- package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +5 -5
- package/project/.sdk/src/cmp/rb/Schema_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +25 -25
- package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +66 -65
- package/project/.sdk/src/cmp/rust/EntityTypes_rust.ts +4 -4
- package/project/.sdk/src/cmp/rust/ReadmeEntity_rust.ts +3 -3
- package/project/.sdk/src/cmp/rust/ReadmeModel_rust.ts +3 -3
- package/project/.sdk/src/cmp/rust/ReadmeRef_rust.ts +5 -5
- package/project/.sdk/src/cmp/rust/Schema_rust.ts +1 -1
- package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +18 -18
- package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +63 -62
- package/project/.sdk/src/cmp/scala/EntityTypes_scala.ts +4 -4
- package/project/.sdk/src/cmp/scala/ReadmeEntity_scala.ts +3 -3
- package/project/.sdk/src/cmp/scala/ReadmeModel_scala.ts +3 -3
- package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +5 -5
- package/project/.sdk/src/cmp/scala/Schema_scala.ts +1 -1
- package/project/.sdk/src/cmp/scala/TestDirect_scala.ts +14 -14
- package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +60 -59
- package/project/.sdk/src/cmp/swift/EntityTypes_swift.ts +4 -4
- package/project/.sdk/src/cmp/swift/ReadmeEntity_swift.ts +3 -3
- package/project/.sdk/src/cmp/swift/ReadmeModel_swift.ts +3 -3
- package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +5 -5
- package/project/.sdk/src/cmp/swift/Schema_swift.ts +1 -1
- package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +5 -5
- package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +3 -3
- package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +3 -3
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +5 -5
- package/project/.sdk/src/cmp/ts/Schema_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +40 -40
- package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +72 -75
- package/project/.sdk/src/cmp/ts/TestLive_ts.ts +3 -3
- package/project/.sdk/src/cmp/ts/utility_ts.ts +5 -5
- package/project/.sdk/src/cmp/zig/ReadmeEntity_zig.ts +3 -3
- package/project/.sdk/src/cmp/zig/ReadmeModel_zig.ts +3 -3
- package/project/.sdk/src/cmp/zig/ReadmeRef_zig.ts +5 -5
- package/project/.sdk/src/cmp/zig/Schema_zig.ts +1 -1
- package/project/.sdk/tm/c/feature/test.c +20 -4
- package/project/.sdk/tm/clojure/src/sdk/features.clj +6 -4
- package/project/.sdk/tm/cpp/feature/test.hpp +17 -6
- package/project/.sdk/tm/csharp/feature/TestFeature.cs +10 -4
- package/project/.sdk/tm/elixir/lib/projectname/feature/test.ex +11 -5
- package/project/.sdk/tm/java/feature/TestFeature.java +11 -6
- package/project/.sdk/tm/js/test/live-entity.js +29 -29
- package/project/.sdk/tm/js/test/live-scenarios.js +4 -4
- package/project/.sdk/tm/kotlin/feature/TestFeature.kt +8 -4
- package/project/.sdk/tm/ocaml/sdk_features.ml +6 -4
- package/project/.sdk/tm/perl/feature/test_feature.pm +6 -4
- package/project/.sdk/tm/rb/feature/test_feature.rb +6 -4
- package/project/.sdk/tm/rust/feature/test.rs +8 -4
- package/project/.sdk/tm/scala/feature/TestFeature.scala +10 -6
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +10 -6
- package/project/.sdk/tm/ts/test/live-entity.ts +26 -26
- package/project/.sdk/tm/ts/test/live-scenarios.ts +3 -3
- package/project/.sdk/tm/zig/feature/test.zig +11 -4
- package/project/sdkgen-package.json +1 -1
- package/src/cmp/ReadmeTop.ts +1 -1
- package/src/cmp/ReadmeUnions.ts +1 -1
- package/src/cmp/Test.ts +1 -1
- package/src/helpers/buildIdNames.ts +17 -7
- package/src/helpers/canonSpec.ts +2 -2
- package/src/helpers/getMatchEntries.ts +2 -2
- package/src/helpers/modelNames.ts +6 -1
- package/src/helpers/opShape.ts +33 -33
- package/src/helpers/pointPath.ts +5 -10
- package/src/helpers/resolved.ts +3 -14
- package/src/sdkgen.ts +3 -1
- package/src/utility.ts +16 -7
|
@@ -27,10 +27,10 @@ function normalizePathParams(
|
|
|
27
27
|
const snaked = snakify(rawName)
|
|
28
28
|
const depluralized = depluralize(snaked)
|
|
29
29
|
const param = params.find((p: any) =>
|
|
30
|
-
p.
|
|
30
|
+
p.n === snaked || p.n === depluralized) ||
|
|
31
31
|
params.find((p: any) =>
|
|
32
|
-
p.
|
|
33
|
-
if (param) return '{' + param.
|
|
32
|
+
p.or === snaked || p.or === depluralized)
|
|
33
|
+
if (param) return '{' + param.n + '}'
|
|
34
34
|
|
|
35
35
|
if (rename) {
|
|
36
36
|
for (const [origCamel, renamedTo] of Object.entries(rename)) {
|
|
@@ -38,10 +38,10 @@ function normalizePathParams(
|
|
|
38
38
|
const origSnaked = snakify(origCamel)
|
|
39
39
|
const origDepluralized = depluralize(origSnaked)
|
|
40
40
|
const renamedParam = params.find(
|
|
41
|
-
(p: any) => p.
|
|
42
|
-
p.
|
|
41
|
+
(p: any) => p.or === origSnaked || p.n === origSnaked ||
|
|
42
|
+
p.or === origDepluralized || p.n === origDepluralized
|
|
43
43
|
)
|
|
44
|
-
if (renamedParam) return '{' + renamedParam.
|
|
44
|
+
if (renamedParam) return '{' + renamedParam.n + '}'
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -85,15 +85,15 @@ const TestDirect = cmp(function TestDirect(props: any) {
|
|
|
85
85
|
const listOp = entity.op?.list
|
|
86
86
|
|
|
87
87
|
const loadPoint = loadOp?.points?.[0]
|
|
88
|
-
const loadPath = loadPoint ? normalizePathParams(pointParts(loadPoint), loadPoint?.
|
|
89
|
-
const allLoadParams = loadPoint?.
|
|
88
|
+
const loadPath = loadPoint ? normalizePathParams(pointParts(loadPoint), loadPoint?.g?.params || [], loadPoint?.r?.param) : ''
|
|
89
|
+
const allLoadParams = loadPoint?.g?.params || []
|
|
90
90
|
const _pathPlaceholders = new Set<string>()
|
|
91
91
|
for (const part of pointParts(loadPoint)) {
|
|
92
92
|
if (typeof part === 'string' && part.startsWith('{') && part.endsWith('}')) {
|
|
93
93
|
_pathPlaceholders.add(part.slice(1, -1))
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
const _renameMap = (loadPoint?.
|
|
96
|
+
const _renameMap = (loadPoint?.r?.param || {}) as Record<string, string>
|
|
97
97
|
const _renamedPlaceholders = new Set<string>()
|
|
98
98
|
for (const ph of _pathPlaceholders) {
|
|
99
99
|
_renamedPlaceholders.add(ph)
|
|
@@ -102,24 +102,24 @@ const TestDirect = cmp(function TestDirect(props: any) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
const loadParams = allLoadParams.filter((p: any) =>
|
|
105
|
-
_renamedPlaceholders.has(p.
|
|
105
|
+
_renamedPlaceholders.has(p.n) || _renamedPlaceholders.has(p.or))
|
|
106
106
|
|
|
107
107
|
const listPoint = listOp?.points?.[0]
|
|
108
|
-
const listPath = listPoint ? normalizePathParams(pointParts(listPoint), listPoint?.
|
|
109
|
-
const listParams = listPoint?.
|
|
108
|
+
const listPath = listPoint ? normalizePathParams(pointParts(listPoint), listPoint?.g?.params || [], listPoint?.r?.param) : ''
|
|
109
|
+
const listParams = listPoint?.g?.params || []
|
|
110
110
|
|
|
111
|
-
const loadQuery = loadPoint?.
|
|
111
|
+
const loadQuery = loadPoint?.g?.query || []
|
|
112
112
|
const loadLiveQueryEntries = loadQuery
|
|
113
|
-
.filter((q: any) => q.
|
|
113
|
+
.filter((q: any) => q.r && undefined !== q.ex && null !== q.ex)
|
|
114
114
|
const loadLiveQueryLines = loadLiveQueryEntries
|
|
115
|
-
.map((q: any) => ` query["${q.
|
|
115
|
+
.map((q: any) => ` query["${q.n}"] = ${kotlinLiteral(q.ex)}`)
|
|
116
116
|
.join('\n')
|
|
117
117
|
|
|
118
118
|
const loadAllHaveExamples =
|
|
119
119
|
loadParams.length > 0 &&
|
|
120
|
-
loadParams.every((p: any) => undefined !== p.
|
|
120
|
+
loadParams.every((p: any) => undefined !== p.ex && null !== p.ex)
|
|
121
121
|
const loadExampleLines = loadAllHaveExamples
|
|
122
|
-
? loadParams.map((p: any) => ` params["${p.
|
|
122
|
+
? loadParams.map((p: any) => ` params["${p.n}"] = ${kotlinLiteral(p.ex)}`).join('\n')
|
|
123
123
|
: ''
|
|
124
124
|
|
|
125
125
|
const entidEnvVar = `${PROJECTNAME}_TEST_${envToken(entity.name)}_ENTID`
|
|
@@ -148,10 +148,10 @@ class ${entity.Name}DirectTest {
|
|
|
148
148
|
|
|
149
149
|
if (hasList && listPoint) {
|
|
150
150
|
const listLiveParams = listParams.map((p: any) => {
|
|
151
|
-
const key = p.
|
|
151
|
+
const key = p.n === 'id'
|
|
152
152
|
? entity.name + '01'
|
|
153
|
-
: p.
|
|
154
|
-
return { name: p.
|
|
153
|
+
: p.n.replace(/_id$/, '') + '01'
|
|
154
|
+
return { name: p.n, key }
|
|
155
155
|
})
|
|
156
156
|
|
|
157
157
|
const listLiveIdKeys = listParams.length > 0
|
|
@@ -250,18 +250,18 @@ ${listSkipBlock} val client = setup.client
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
if (hasLoad && loadPoint) {
|
|
253
|
-
const ancestorParams = loadParams.filter((p: any) => p.
|
|
253
|
+
const ancestorParams = loadParams.filter((p: any) => p.n !== 'id')
|
|
254
254
|
|
|
255
255
|
let loadLiveIdKeys: string[] = []
|
|
256
256
|
if (loadParams.length > 0 && !loadAllHaveExamples) {
|
|
257
257
|
if (hasList) {
|
|
258
258
|
loadLiveIdKeys = listParams.map((p: any) => {
|
|
259
|
-
return p.
|
|
259
|
+
return p.n === 'id'
|
|
260
260
|
? entity.name + '01'
|
|
261
|
-
: p.
|
|
261
|
+
: p.n.replace(/_id$/, '') + '01'
|
|
262
262
|
})
|
|
263
263
|
} else {
|
|
264
|
-
loadLiveIdKeys = loadParams.map((p: any) => p.
|
|
264
|
+
loadLiveIdKeys = loadParams.map((p: any) => p.n + '01')
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
const loadSkipBlock = loadLiveIdKeys.length > 0
|
|
@@ -306,10 +306,10 @@ ${loadSkipBlock} val client = setup.client
|
|
|
306
306
|
Content(` val listParams = linkedMapOf<String, Any?>()
|
|
307
307
|
`)
|
|
308
308
|
for (const p of listParams) {
|
|
309
|
-
const key = p.
|
|
309
|
+
const key = p.n === 'id'
|
|
310
310
|
? entity.name + '01'
|
|
311
|
-
: p.
|
|
312
|
-
Content(` listParams["${p.
|
|
311
|
+
: p.n.replace(/_id$/, '') + '01'
|
|
312
|
+
Content(` listParams["${p.n}"] = setup.idmap["${key}"]
|
|
313
313
|
`)
|
|
314
314
|
}
|
|
315
315
|
|
|
@@ -326,8 +326,8 @@ ${loadSkipBlock} val client = setup.client
|
|
|
326
326
|
params["id"] = firstEnt["id"]
|
|
327
327
|
`)
|
|
328
328
|
for (const p of ancestorParams) {
|
|
329
|
-
const key = p.
|
|
330
|
-
Content(` params["${p.
|
|
329
|
+
const key = p.n.replace(/_id$/, '') + '01'
|
|
330
|
+
Content(` params["${p.n}"] = setup.idmap["${key}"]
|
|
331
331
|
`)
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -336,7 +336,7 @@ ${loadSkipBlock} val client = setup.client
|
|
|
336
336
|
Content(` } else {
|
|
337
337
|
`)
|
|
338
338
|
for (let i = 0; i < loadParams.length; i++) {
|
|
339
|
-
Content(` params["${loadParams[i].
|
|
339
|
+
Content(` params["${loadParams[i].n}"] = "direct0${i + 1}"
|
|
340
340
|
`)
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { flowSteps } from '@voxgig/sdkgen'
|
|
1
2
|
|
|
2
3
|
import {
|
|
3
4
|
KIT,
|
|
@@ -67,17 +68,17 @@ const TestEntity = cmp(function TestEntity(props: any) {
|
|
|
67
68
|
|
|
68
69
|
const idnames = buildIdNames(entity, basicflow)
|
|
69
70
|
|
|
70
|
-
const allSteps = Object.values(basicflow
|
|
71
|
-
const updateStep = allSteps.find((s: any) => s.
|
|
72
|
-
const updateData = updateStep?.
|
|
73
|
-
? Object.entries(updateStep.
|
|
71
|
+
const allSteps = Object.values(flowSteps(basicflow)) as any[]
|
|
72
|
+
const updateStep = allSteps.find((s: any) => s.o === 'update')
|
|
73
|
+
const updateData = updateStep?.d
|
|
74
|
+
? Object.entries(updateStep.d).filter(([k]: any) => k !== 'id' && !k.endsWith('$'))
|
|
74
75
|
: []
|
|
75
76
|
const aliases = updateData.map(([k, v]: any) => [k, v])
|
|
76
77
|
|
|
77
78
|
const genCtx: GenCtx = { model, entity, kotlinpackage, flow: basicflow, PROJUPPER, accessor }
|
|
78
79
|
|
|
79
80
|
const stepOps = Array.from(new Set(
|
|
80
|
-
(allSteps as any[]).map((s: any) => s.
|
|
81
|
+
(allSteps as any[]).map((s: any) => s.o).filter(Boolean)))
|
|
81
82
|
|
|
82
83
|
File({ name: entity.Name + 'EntityTest.' + target.ext }, () => {
|
|
83
84
|
|
|
@@ -127,7 +128,7 @@ class ${entity.Name}EntityTest {
|
|
|
127
128
|
)
|
|
128
129
|
${allSteps.length > 0 ? ` val client = setup.client\n\n` : ''}`)
|
|
129
130
|
|
|
130
|
-
const flowHasCreate = allSteps.some((s: any) => s.
|
|
131
|
+
const flowHasCreate = allSteps.some((s: any) => s.o === 'create')
|
|
131
132
|
if (!flowHasCreate) {
|
|
132
133
|
const preambleRef = entity.name + '_ref01'
|
|
133
134
|
const preambleVar = kvar(preambleRef)
|
|
@@ -140,8 +141,8 @@ ${allSteps.length > 0 ? ` val client = setup.client\n\n` : ''}`)
|
|
|
140
141
|
`)
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
each(basicflow
|
|
144
|
-
const opgen: OpGen = GENERATE_OP[step.
|
|
144
|
+
each(flowSteps(basicflow), (step: any, index: any) => {
|
|
145
|
+
const opgen: OpGen = GENERATE_OP[step.o]
|
|
145
146
|
if (opgen) {
|
|
146
147
|
opgen(genCtx, step, index)
|
|
147
148
|
Content('\n')
|
|
@@ -152,7 +153,7 @@ ${allSteps.length > 0 ? ` val client = setup.client\n\n` : ''}`)
|
|
|
152
153
|
|
|
153
154
|
`)
|
|
154
155
|
|
|
155
|
-
const flowHasList = allSteps.some((s: any) => s.
|
|
156
|
+
const flowHasList = allSteps.some((s: any) => s.o === 'list')
|
|
156
157
|
if (flowHasList) {
|
|
157
158
|
Content(` @Test
|
|
158
159
|
fun stream() {
|
|
@@ -276,18 +277,18 @@ ${authActive ? ` liveOpts["apikey"] = env["${PROJUPPER}_APIKEY"]\n` : ''}
|
|
|
276
277
|
|
|
277
278
|
const generateCreate: OpGen = (ctx, step, index) => {
|
|
278
279
|
const { entity, flow, accessor } = ctx
|
|
279
|
-
const ref = step.
|
|
280
|
-
const entvar = kvar(step.
|
|
281
|
-
const datavar = kvar(step.
|
|
280
|
+
const ref = step.i.ref ?? entity.name + '_ref01'
|
|
281
|
+
const entvar = kvar(step.i.entvar ?? ref + '_ent')
|
|
282
|
+
const datavar = kvar(step.i.datavar ?? (ref + '_data' + (step.i.suffix ?? '')))
|
|
282
283
|
|
|
283
|
-
const priorSteps = Object.values(flow
|
|
284
|
+
const priorSteps = Object.values(flowSteps(flow)).slice(0, Number(index)) as any[]
|
|
284
285
|
const needsEnt = !priorSteps.some((s: any) =>
|
|
285
|
-
['create', 'list', 'load', 'update', 'remove'].includes(s.
|
|
286
|
+
['create', 'list', 'load', 'update', 'remove'].includes(s.o))
|
|
286
287
|
|
|
287
288
|
const hasDatvar = priorSteps.some((s: any) => {
|
|
288
|
-
if ('create' === s.
|
|
289
|
-
const priorRef = s.
|
|
290
|
-
const priorDatvar = kvar(s.
|
|
289
|
+
if ('create' === s.o) {
|
|
290
|
+
const priorRef = s.i.ref ?? entity.name + '_ref01'
|
|
291
|
+
const priorDatvar = kvar(s.i.datavar ?? (priorRef + '_data' + (s.i.suffix ?? '')))
|
|
291
292
|
return priorDatvar === datavar
|
|
292
293
|
}
|
|
293
294
|
return false
|
|
@@ -325,14 +326,14 @@ const generateCreate: OpGen = (ctx, step, index) => {
|
|
|
325
326
|
|
|
326
327
|
const generateList: OpGen = (ctx, step, index) => {
|
|
327
328
|
const { entity, flow, accessor } = ctx
|
|
328
|
-
const ref = step.
|
|
329
|
-
const entvar = kvar(step.
|
|
330
|
-
const matchvar = kvar(step.
|
|
331
|
-
const listvar = kvar(step.
|
|
329
|
+
const ref = step.i.ref ?? entity.name + '_ref01'
|
|
330
|
+
const entvar = kvar(step.i.entvar ?? ref + '_ent')
|
|
331
|
+
const matchvar = kvar(step.i.matchvar ?? (ref + '_match' + (step.i.suffix ?? '')))
|
|
332
|
+
const listvar = kvar(step.i.listvar ?? (ref + '_list' + (step.i.suffix ?? '')))
|
|
332
333
|
|
|
333
|
-
const priorSteps = Object.values(flow
|
|
334
|
+
const priorSteps = Object.values(flowSteps(flow)).slice(0, Number(index)) as any[]
|
|
334
335
|
const needsEnt = !priorSteps.some((s: any) =>
|
|
335
|
-
['create', 'list', 'load', 'update', 'remove'].includes(s.
|
|
336
|
+
['create', 'list', 'load', 'update', 'remove'].includes(s.o))
|
|
336
337
|
|
|
337
338
|
Content(` // LIST
|
|
338
339
|
`)
|
|
@@ -349,12 +350,12 @@ const generateList: OpGen = (ctx, step, index) => {
|
|
|
349
350
|
`)
|
|
350
351
|
}
|
|
351
352
|
|
|
352
|
-
const allSteps = Object.values(flow
|
|
353
|
-
const listvarUsed = !!step.
|
|
353
|
+
const allSteps = Object.values(flowSteps(flow)) as any[]
|
|
354
|
+
const listvarUsed = !!step.v?.some((v: any) => {
|
|
354
355
|
if ('ItemExists' !== v.apply && 'ItemNotExists' !== v.apply) return false
|
|
355
356
|
const validRef = v.def?.ref
|
|
356
|
-
return validRef && allSteps.some((s: any) => 'create' === s.
|
|
357
|
-
((s.
|
|
357
|
+
return validRef && allSteps.some((s: any) => 'create' === s.o &&
|
|
358
|
+
((s.i.ref ?? entity.name + '_ref01') === validRef))
|
|
358
359
|
})
|
|
359
360
|
|
|
360
361
|
Content(`
|
|
@@ -367,11 +368,11 @@ const generateList: OpGen = (ctx, step, index) => {
|
|
|
367
368
|
`)
|
|
368
369
|
}
|
|
369
370
|
|
|
370
|
-
if (step.
|
|
371
|
-
for (const validator of step.
|
|
371
|
+
if (step.v) {
|
|
372
|
+
for (const validator of step.v) {
|
|
372
373
|
const validRef = validator.def?.ref
|
|
373
|
-
const hasRefData = validRef && allSteps.some((s: any) => 'create' === s.
|
|
374
|
-
((s.
|
|
374
|
+
const hasRefData = validRef && allSteps.some((s: any) => 'create' === s.o &&
|
|
375
|
+
((s.i.ref ?? entity.name + '_ref01') === validRef))
|
|
375
376
|
|
|
376
377
|
if ('ItemExists' === validator.apply && hasRefData) {
|
|
377
378
|
const refDataVar = kvar(validRef + '_data')
|
|
@@ -397,16 +398,16 @@ const generateList: OpGen = (ctx, step, index) => {
|
|
|
397
398
|
|
|
398
399
|
const generateUpdate: OpGen = (ctx, step, index) => {
|
|
399
400
|
const { entity, flow, accessor } = ctx
|
|
400
|
-
const ref = step.
|
|
401
|
-
const entvar = kvar(step.
|
|
402
|
-
const datavar = kvar(step.
|
|
403
|
-
const resdatavar = kvar(step.
|
|
404
|
-
const markdefvar = kvar(step.
|
|
405
|
-
const srcdatavar = kvar(step.
|
|
406
|
-
|
|
407
|
-
const priorSteps = Object.values(flow
|
|
401
|
+
const ref = step.i.ref ?? entity.name + '_ref01'
|
|
402
|
+
const entvar = kvar(step.i.entvar ?? ref + '_ent')
|
|
403
|
+
const datavar = kvar(step.i.datavar ?? (ref + '_data' + (step.i.suffix ?? '')))
|
|
404
|
+
const resdatavar = kvar(step.i.resdatavar ?? (ref + '_resdata' + (step.i.suffix ?? '')))
|
|
405
|
+
const markdefvar = kvar(step.i.markdefvar ?? (ref + '_markdef' + (step.i.suffix ?? '')))
|
|
406
|
+
const srcdatavar = kvar(step.i.srcdatavar ?? (ref + '_data' + (step.i.suffix ?? '')))
|
|
407
|
+
|
|
408
|
+
const priorSteps = Object.values(flowSteps(flow)).slice(0, Number(index)) as any[]
|
|
408
409
|
const needsEnt = !priorSteps.some((s: any) =>
|
|
409
|
-
['create', 'list', 'load', 'update', 'remove'].includes(s.
|
|
410
|
+
['create', 'list', 'load', 'update', 'remove'].includes(s.o))
|
|
410
411
|
|
|
411
412
|
const hasEntIdU = null != entity.id
|
|
412
413
|
|
|
@@ -423,18 +424,18 @@ const generateUpdate: OpGen = (ctx, step, index) => {
|
|
|
423
424
|
`)
|
|
424
425
|
}
|
|
425
426
|
|
|
426
|
-
if (step.
|
|
427
|
-
const dataEntries = Object.entries(step.
|
|
427
|
+
if (step.d) {
|
|
428
|
+
const dataEntries = Object.entries(step.d).filter(([k]: any) => k !== 'id' && !k.endsWith('$'))
|
|
428
429
|
for (const [key] of dataEntries) {
|
|
429
430
|
Content(` ${datavar}Up["${key}"] = setup.idmap!!["${key}"]
|
|
430
431
|
`)
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
434
|
|
|
434
|
-
if (step.
|
|
435
|
-
for (const spec of step.
|
|
436
|
-
if ('TextFieldMark' === spec.apply && null != step.
|
|
437
|
-
const fieldname = step.
|
|
435
|
+
if (step.s) {
|
|
436
|
+
for (const spec of step.s) {
|
|
437
|
+
if ('TextFieldMark' === spec.apply && null != step.i.textfield) {
|
|
438
|
+
const fieldname = step.i.textfield
|
|
438
439
|
const fieldvalue = spec.def?.mark ?? `Mark01-${ref}`
|
|
439
440
|
Content(`
|
|
440
441
|
val ${markdefvar}Name = "${fieldname}"
|
|
@@ -456,9 +457,9 @@ const generateUpdate: OpGen = (ctx, step, index) => {
|
|
|
456
457
|
`)
|
|
457
458
|
}
|
|
458
459
|
|
|
459
|
-
if (step.
|
|
460
|
-
for (const spec of step.
|
|
461
|
-
if ('TextFieldMark' === spec.apply && null != step.
|
|
460
|
+
if (step.s) {
|
|
461
|
+
for (const spec of step.s) {
|
|
462
|
+
if ('TextFieldMark' === spec.apply && null != step.i.textfield) {
|
|
462
463
|
Content(` assertEquals(${markdefvar}Value, ${resdatavar}[${markdefvar}Name],
|
|
463
464
|
"expected " + ${markdefvar}Name + " to be updated")
|
|
464
465
|
`)
|
|
@@ -470,23 +471,23 @@ const generateUpdate: OpGen = (ctx, step, index) => {
|
|
|
470
471
|
|
|
471
472
|
const generateLoad: OpGen = (ctx, step, index) => {
|
|
472
473
|
const { entity, flow, accessor } = ctx
|
|
473
|
-
const ref = step.
|
|
474
|
-
const entvar = kvar(step.
|
|
475
|
-
const matchvar = kvar(step.
|
|
476
|
-
const datavar = kvar(step.
|
|
477
|
-
const srcdatavar = kvar(step.
|
|
474
|
+
const ref = step.i.ref ?? entity.name + '_ref01'
|
|
475
|
+
const entvar = kvar(step.i.entvar ?? ref + '_ent')
|
|
476
|
+
const matchvar = kvar(step.i.matchvar ?? (ref + '_match' + (step.i.suffix ?? '')))
|
|
477
|
+
const datavar = kvar(step.i.datavar ?? (ref + '_data' + (step.i.suffix ?? '')))
|
|
478
|
+
const srcdatavar = kvar(step.i.srcdatavar ?? (ref + '_data' + (step.i.suffix ?? '')))
|
|
478
479
|
|
|
479
|
-
const priorSteps = Object.values(flow
|
|
480
|
+
const priorSteps = Object.values(flowSteps(flow)).slice(0, Number(index)) as any[]
|
|
480
481
|
const hasEntVar = priorSteps.some((s: any) =>
|
|
481
|
-
['create', 'list', 'load', 'update', 'remove'].includes(s.
|
|
482
|
+
['create', 'list', 'load', 'update', 'remove'].includes(s.o))
|
|
482
483
|
|
|
483
|
-
const flowHasCreate = Object.values(flow
|
|
484
|
+
const flowHasCreate = Object.values(flowSteps(flow)).some((s: any) => (s as any).o === 'create')
|
|
484
485
|
const preambleRef = entity.name + '_ref01'
|
|
485
486
|
const hasSrcData = (!flowHasCreate && srcdatavar === kvar(preambleRef + '_data')) ||
|
|
486
487
|
priorSteps.some((s: any) => {
|
|
487
|
-
if ('create' === s.
|
|
488
|
-
const priorRef = s.
|
|
489
|
-
const priorDatvar = kvar(s.
|
|
488
|
+
if ('create' === s.o) {
|
|
489
|
+
const priorRef = s.i.ref ?? entity.name + '_ref01'
|
|
490
|
+
const priorDatvar = kvar(s.i.datavar ?? (priorRef + '_data' + (s.i.suffix ?? '')))
|
|
490
491
|
return priorDatvar === srcdatavar
|
|
491
492
|
}
|
|
492
493
|
return false
|
|
@@ -527,14 +528,14 @@ const generateLoad: OpGen = (ctx, step, index) => {
|
|
|
527
528
|
|
|
528
529
|
const generateRemove: OpGen = (ctx, step, index) => {
|
|
529
530
|
const { entity, flow, accessor } = ctx
|
|
530
|
-
const ref = step.
|
|
531
|
-
const entvar = kvar(step.
|
|
532
|
-
const matchvar = kvar(step.
|
|
533
|
-
const srcdatavar = kvar(step.
|
|
531
|
+
const ref = step.i.ref ?? entity.name + '_ref01'
|
|
532
|
+
const entvar = kvar(step.i.entvar ?? ref + '_ent')
|
|
533
|
+
const matchvar = kvar(step.i.matchvar ?? (ref + '_match' + (step.i.suffix ?? '')))
|
|
534
|
+
const srcdatavar = kvar(step.i.srcdatavar ?? (ref + '_data'))
|
|
534
535
|
|
|
535
|
-
const priorSteps = Object.values(flow
|
|
536
|
+
const priorSteps = Object.values(flowSteps(flow)).slice(0, Number(index)) as any[]
|
|
536
537
|
const needsEnt = !priorSteps.some((s: any) =>
|
|
537
|
-
['create', 'list', 'load', 'update', 'remove'].includes(s.
|
|
538
|
+
['create', 'list', 'load', 'update', 'remove'].includes(s.o))
|
|
538
539
|
|
|
539
540
|
Content(` // REMOVE
|
|
540
541
|
`)
|
|
@@ -43,8 +43,8 @@ const EntityTypes = cmp(function EntityTypes(props: any) {
|
|
|
43
43
|
|
|
44
44
|
Content(`-- Typed models for the ${model.const.Name} SDK (LuaLS annotations).
|
|
45
45
|
--
|
|
46
|
-
-- GENERATED from the API model: main.${KIT}.entity.<e>.fields
|
|
47
|
-
-- params (op.<name>.points[].
|
|
46
|
+
-- GENERATED from the API model: main.${KIT}.entity.<e>.fields{} and per-op
|
|
47
|
+
-- params (op.<name>.points[].g.params[]). Field/param types come from the
|
|
48
48
|
-- canonical type sentinels via @voxgig/sdkgen canonToType (source of truth:
|
|
49
49
|
-- @voxgig/apidef VALID_CANON). Annotations only — no runtime effect. Do not
|
|
50
50
|
-- edit by hand.
|
|
@@ -54,13 +54,13 @@ const EntityTypes = cmp(function EntityTypes(props: any) {
|
|
|
54
54
|
entityList.forEach((ent: any) => {
|
|
55
55
|
const Name = ent.Name
|
|
56
56
|
const fields = (ent.fields ? each(ent.fields) : [])
|
|
57
|
-
.filter((f: any) => f.
|
|
57
|
+
.filter((f: any) => f.a !== false)
|
|
58
58
|
|
|
59
59
|
Content(`---@class ${Name}
|
|
60
60
|
`)
|
|
61
61
|
fields.forEach((f: any) => {
|
|
62
|
-
const opt = false === f.
|
|
63
|
-
Content(`---@field ${propKey(f.
|
|
62
|
+
const opt = false === f.r ? '?' : ''
|
|
63
|
+
Content(`---@field ${propKey(f.n)}${opt} ${canonToType(f.t, LANG)}
|
|
64
64
|
`)
|
|
65
65
|
})
|
|
66
66
|
Content(`
|
|
@@ -51,7 +51,7 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
51
51
|
|
|
52
52
|
publishedEntities.map((entity: any) => {
|
|
53
53
|
const opnames = Object.keys(entity.op || {})
|
|
54
|
-
const fields = entity.fields ||
|
|
54
|
+
const fields = Object.values(entity.fields || {})
|
|
55
55
|
const idF = entityIdField(entity)
|
|
56
56
|
// Sanitise the local variable name — an entity whose lowercased name is a
|
|
57
57
|
// Lua keyword (e.g. `end`) would otherwise emit uncompilable code.
|
|
@@ -98,8 +98,8 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
98
98
|
`)
|
|
99
99
|
|
|
100
100
|
each(fields, (field: any) => {
|
|
101
|
-
const desc = field.
|
|
102
|
-
Content(`| \`${field.
|
|
101
|
+
const desc = field.sh || ''
|
|
102
|
+
Content(`| \`${field.n}\` | \`${canonToType(field.t, target.name)}\` | ${desc} |
|
|
103
103
|
`)
|
|
104
104
|
})
|
|
105
105
|
|
|
@@ -131,13 +131,13 @@ Only \`direct()\` returns a response envelope — a \`table\` with \`ok\`,
|
|
|
131
131
|
|
|
132
132
|
`)
|
|
133
133
|
each(entityList, (ent: any) => {
|
|
134
|
-
const fields = ent.fields ||
|
|
134
|
+
const fields = Object.values(ent.fields || {})
|
|
135
135
|
const opnames = Object.keys(ent.op || {})
|
|
136
136
|
const ops = ent.op || {}
|
|
137
137
|
const points = each(ops).map((op: any) =>
|
|
138
138
|
op.points ? each(op.points) : []
|
|
139
139
|
).flat()
|
|
140
|
-
const path = points.length > 0 ? (points[0] as any).
|
|
140
|
+
const path = points.length > 0 ? (points[0] as any).o || '' : ''
|
|
141
141
|
|
|
142
142
|
Content(`#### ${ent.Name}
|
|
143
143
|
|
|
@@ -145,7 +145,7 @@ Only \`direct()\` returns a response envelope — a \`table\` with \`ok\`,
|
|
|
145
145
|
| --- | --- |
|
|
146
146
|
`)
|
|
147
147
|
each(fields, (field: any) => {
|
|
148
|
-
Content(`| \`${field.
|
|
148
|
+
Content(`| \`${field.n}\` | ${field.sh || ''} |
|
|
149
149
|
`)
|
|
150
150
|
})
|
|
151
151
|
|
|
@@ -70,12 +70,12 @@ local client = ${ctor}
|
|
|
70
70
|
// `id`, matching the load example and the seeded test fixture.
|
|
71
71
|
const idNames = new Set<string>(['id',
|
|
72
72
|
(exampleEntity.id && exampleEntity.id.field) || 'id'])
|
|
73
|
-
const fields: any[] =
|
|
73
|
+
const fields: any[] = Object.values(exampleEntity.fields || {})
|
|
74
74
|
const isStringField = (f: any) =>
|
|
75
|
-
f && typeof f.
|
|
75
|
+
f && typeof f.t === 'string' && /STRING/i.test(f.t)
|
|
76
76
|
const displayFieldObj =
|
|
77
|
-
fields.find((f: any) => f && !idNames.has(f.
|
|
78
|
-
fields.find((f: any) => f && !idNames.has(f.
|
|
77
|
+
fields.find((f: any) => f && !idNames.has(f.n) && isStringField(f)) ||
|
|
78
|
+
fields.find((f: any) => f && !idNames.has(f.n))
|
|
79
79
|
const displayField = displayFieldObj ? displayFieldObj.name : null
|
|
80
80
|
const idCol = dataIdF ? `item["${dataIdF}"]` : null
|
|
81
81
|
const dispCol = displayField ? `item["${displayField}"]` : null
|
|
@@ -166,7 +166,7 @@ same parameters as \`direct()\`.
|
|
|
166
166
|
|
|
167
167
|
publishedEntities.map((ent: any) => {
|
|
168
168
|
const opnames = Object.keys(ent.op || {})
|
|
169
|
-
const fields = ent.fields ||
|
|
169
|
+
const fields = Object.values(ent.fields || {})
|
|
170
170
|
// Model-driven id key: null when this entity has no id-like field, in
|
|
171
171
|
// which case load/remove match on no argument and update omits the id.
|
|
172
172
|
const idF = entityIdField(ent)
|
|
@@ -201,9 +201,9 @@ local ${eVar} = client:${ent.Name}(nil)
|
|
|
201
201
|
| --- | --- | --- | --- |
|
|
202
202
|
`)
|
|
203
203
|
each(fields, (field: any) => {
|
|
204
|
-
const req = field.
|
|
205
|
-
const desc = field.
|
|
206
|
-
Content(`| \`${field.
|
|
204
|
+
const req = field.r ? 'Yes' : 'No'
|
|
205
|
+
const desc = field.sh || ''
|
|
206
|
+
Content(`| \`${field.n}\` | \`${canonToType(field.t, target.name)}\` | ${req} | ${desc} |
|
|
207
207
|
`)
|
|
208
208
|
})
|
|
209
209
|
|
|
@@ -230,7 +230,7 @@ local ${eVar} = client:${ent.Name}(nil)
|
|
|
230
230
|
if (fop.active === false) return '-'
|
|
231
231
|
return 'Yes'
|
|
232
232
|
})
|
|
233
|
-
Content(`| \`${field.
|
|
233
|
+
Content(`| \`${field.n}\` | ${cols.join(' | ')} |
|
|
234
234
|
`)
|
|
235
235
|
})
|
|
236
236
|
|
|
@@ -30,7 +30,7 @@ const Schema = cmp(async function Schema(props: any) {
|
|
|
30
30
|
Content(`-- ${model.const.Name} ${target.Name} SDK: generated schemas. Do not edit.
|
|
31
31
|
--
|
|
32
32
|
-- Generated from the model: \`main.kit.optspec\` and each feature's
|
|
33
|
-
-- \`config.options\` for OPTSPEC; entity \`fields
|
|
33
|
+
-- \`config.options\` for OPTSPEC; entity \`fields{}.type\` for ENTITYSPEC.
|
|
34
34
|
|
|
35
35
|
local json = require("dkjson")
|
|
36
36
|
|