@voxgig/create-sdkgen 0.1.1 → 0.2.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 +2 -0
- package/bin/create-sdkgen~ +261 -0
- package/dist/create-sdkgen.js +2 -1
- package/dist/create-sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/project/standard/.env.local +1 -0
- package/project/standard/.sdk/build/apidef.js +8 -0
- package/project/standard/.sdk/build/docgen.js +15 -0
- package/project/standard/.sdk/build/sdkgen.js +16 -0
- package/project/standard/.sdk/def/README.md +4 -0
- package/project/standard/.sdk/model/.model-config/model-config.jsonic +19 -0
- package/project/standard/.sdk/model/README.md +2 -0
- package/project/standard/.sdk/model/api/api-def.jsonic +5 -0
- package/project/standard/.sdk/model/api/api-entity-index.jsonic +2 -0
- package/project/standard/.sdk/model/config.jsonic +13 -0
- package/project/standard/.sdk/model/feature/README.md +2 -0
- package/project/standard/.sdk/model/feature/feature-index.jsonic +3 -0
- package/project/standard/.sdk/model/flow/flow-index.jsonic +2 -0
- package/project/standard/.sdk/model/guide.jsonic +5 -0
- package/project/standard/.sdk/model/sdk.fragment.jsonic +39 -0
- package/project/standard/.sdk/model/target/README.md +2 -0
- package/project/standard/.sdk/model/target/target-index.jsonic +2 -0
- package/project/standard/.sdk/model/target/target-index.jsonic~ +4 -0
- package/project/standard/.sdk/package.json +37 -0
- package/project/standard/.sdk/src/DocStaticRoot.ts +45 -0
- package/project/standard/.sdk/src/Root.ts +233 -0
- package/project/standard/.sdk/src/Top.ts +48 -0
- package/project/standard/.sdk/src/cmp/README.md +2 -0
- package/project/standard/.sdk/src/tsconfig.json +16 -0
- package/project/standard/.sdk/test/.model-config/model-config.json +7 -0
- package/project/standard/.sdk/test/.model-config/model-config.jsonic +4 -0
- package/project/standard/.sdk/test/primary/auth.jsonic +20 -0
- package/project/standard/.sdk/test/primary/body.jsonic +27 -0
- package/project/standard/.sdk/test/primary/contextify.jsonic +5 -0
- package/project/standard/.sdk/test/primary/done.jsonic +7 -0
- package/project/standard/.sdk/test/primary/error.jsonic +19 -0
- package/project/standard/.sdk/test/primary/findparam.jsonic +22 -0
- package/project/standard/.sdk/test/primary/fullurl.jsonic +50 -0
- package/project/standard/.sdk/test/primary/headers.jsonic +12 -0
- package/project/standard/.sdk/test/primary/inward.jsonic +3 -0
- package/project/standard/.sdk/test/primary/method.jsonic +11 -0
- package/project/standard/.sdk/test/primary/operator.jsonic +60 -0
- package/project/standard/.sdk/test/primary/options.jsonic +60 -0
- package/project/standard/.sdk/test/primary/outward.jsonic +3 -0
- package/project/standard/.sdk/test/primary/params.jsonic +10 -0
- package/project/standard/.sdk/test/primary/query.jsonic +9 -0
- package/project/standard/.sdk/test/primary/reqform.jsonic +9 -0
- package/project/standard/.sdk/test/primary/request.jsonic +31 -0
- package/project/standard/.sdk/test/primary/resbasic.jsonic +15 -0
- package/project/standard/.sdk/test/primary/resbody.jsonic +5 -0
- package/project/standard/.sdk/test/primary/resform.jsonic +11 -0
- package/project/standard/.sdk/test/primary/resheaders.jsonic +9 -0
- package/project/standard/.sdk/test/primary/response.jsonic +20 -0
- package/project/standard/.sdk/test/primary/spec.jsonic +32 -0
- package/project/standard/.sdk/test/struct/getpath.jsonic +143 -0
- package/project/standard/.sdk/test/struct/inject.jsonic +76 -0
- package/project/standard/.sdk/test/struct/merge.jsonic +161 -0
- package/project/standard/.sdk/test/struct/minor.jsonic +693 -0
- package/project/standard/.sdk/test/struct/select.jsonic +166 -0
- package/project/standard/.sdk/test/struct/transform.jsonic +453 -0
- package/project/standard/.sdk/test/struct/validate.jsonic +287 -0
- package/project/standard/.sdk/test/struct/walk.jsonic +57 -0
- package/project/standard/.sdk/test/test.json +15080 -0
- package/project/standard/.sdk/test/test.jsonic +44 -0
- package/project/standard/.sdk/tm/LICENSE +22 -0
- package/project/standard/.sdk/tm/README.md +2 -0
- package/src/create-sdkgen.ts +3 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Copyright (c) 2025 Voxgig Ltd. MIT License.
|
|
2
|
+
|
|
3
|
+
# Tests are defined as sets of expected inputs and outputs
|
|
4
|
+
# The test runner script for each language loads the generated test.json
|
|
5
|
+
# file and runs the actual tests.
|
|
6
|
+
|
|
7
|
+
# Each language must pass these exact same tests, ensuring uniform
|
|
8
|
+
# behaviour over all languages.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Tests for the core "struct" data structure utilities.
|
|
12
|
+
struct: minor: @"struct/minor.jsonic"
|
|
13
|
+
struct: getpath: @"struct/getpath.jsonic"
|
|
14
|
+
struct: inject: @"struct/inject.jsonic"
|
|
15
|
+
struct: merge: @"struct/merge.jsonic"
|
|
16
|
+
struct: transform: @"struct/transform.jsonic"
|
|
17
|
+
struct: walk: @"struct/walk.jsonic"
|
|
18
|
+
struct: validate: @"struct/validate.jsonic"
|
|
19
|
+
struct: select: @"struct/select.jsonic"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Tests for the primary SDK utilities.
|
|
23
|
+
primary: auth: @"primary/auth.jsonic"
|
|
24
|
+
primary: body: @"primary/body.jsonic"
|
|
25
|
+
primary: contextify: @"primary/contextify.jsonic"
|
|
26
|
+
primary: done: @"primary/done.jsonic"
|
|
27
|
+
primary: error: @"primary/error.jsonic"
|
|
28
|
+
primary: findparam: @"primary/findparam.jsonic"
|
|
29
|
+
primary: fullurl: @"primary/fullurl.jsonic"
|
|
30
|
+
primary: headers: @"primary/headers.jsonic"
|
|
31
|
+
primary: resform: @"primary/resform.jsonic"
|
|
32
|
+
primary: method: @"primary/method.jsonic"
|
|
33
|
+
primary: operator: @"primary/operator.jsonic"
|
|
34
|
+
primary: options: @"primary/options.jsonic"
|
|
35
|
+
primary: reqform: @"primary/reqform.jsonic"
|
|
36
|
+
primary: params: @"primary/params.jsonic"
|
|
37
|
+
primary: query: @"primary/query.jsonic"
|
|
38
|
+
primary: request: @"primary/request.jsonic"
|
|
39
|
+
primary: resbasic: @"primary/resbasic.jsonic"
|
|
40
|
+
primary: resbody: @"primary/resbody.jsonic"
|
|
41
|
+
primary: resheaders: @"primary/resheaders.jsonic"
|
|
42
|
+
primary: response: @"primary/response.jsonic"
|
|
43
|
+
primary: spec: @"primary/spec.jsonic"
|
|
44
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) $$year$$ $$Name$$
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/src/create-sdkgen.ts
CHANGED
|
@@ -89,9 +89,11 @@ function CreateSdkGen(opts: FullCreateSdkGenOptions) {
|
|
|
89
89
|
|
|
90
90
|
log.debug({ point: 'generate-model', model, note: JSON.stringify(model, null, 2) })
|
|
91
91
|
|
|
92
|
+
// console.log('GENERATE', model, jopts)
|
|
93
|
+
|
|
92
94
|
const jres = await jostraca.generate(jopts, () => Root({ model, spec }))
|
|
93
95
|
|
|
94
|
-
//
|
|
96
|
+
// console.log('JRES', jres)
|
|
95
97
|
|
|
96
98
|
showChanges(jopts.log, 'generate-result', jres, Path.dirname(process.cwd()))
|
|
97
99
|
|