@sdboyer/thema-ui 0.0.0-bootstrap.0 → 0.1.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.
Files changed (225) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -1
  3. package/dist/Diagnostics.d.ts +8 -0
  4. package/dist/Diagnostics.js +14 -0
  5. package/dist/Editor.d.ts +12 -0
  6. package/dist/Editor.js +95 -0
  7. package/dist/OpBar.d.ts +14 -0
  8. package/dist/OpBar.js +15 -0
  9. package/dist/Output.d.ts +20 -0
  10. package/dist/Output.js +56 -0
  11. package/dist/Tabs.d.ts +15 -0
  12. package/dist/Tabs.js +23 -0
  13. package/dist/cue-lang.d.ts +8 -0
  14. package/dist/cue-lang.js +82 -0
  15. package/dist/docs.d.ts +64 -0
  16. package/dist/docs.js +42 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +18 -0
  19. package/dist/markers.d.ts +11 -0
  20. package/dist/markers.js +45 -0
  21. package/dist/ops.d.ts +13 -0
  22. package/dist/ops.js +22 -0
  23. package/dist/positions.d.ts +7 -0
  24. package/dist/positions.js +40 -0
  25. package/dist/theme.d.ts +16 -0
  26. package/dist/theme.js +55 -0
  27. package/dist/types.d.ts +580 -0
  28. package/dist/types.js +85 -0
  29. package/errors/E0101.md +43 -0
  30. package/errors/E0102.md +34 -0
  31. package/errors/E0103.md +41 -0
  32. package/errors/E0104.md +5 -0
  33. package/errors/E0105.md +62 -0
  34. package/errors/E0106.md +46 -0
  35. package/errors/E0107.md +48 -0
  36. package/errors/E0108.md +45 -0
  37. package/errors/E0109.md +37 -0
  38. package/errors/E0110.md +17 -0
  39. package/errors/E0111.md +55 -0
  40. package/errors/E0112.md +40 -0
  41. package/errors/E0120.md +34 -0
  42. package/errors/E0121.md +34 -0
  43. package/errors/E0122.md +26 -0
  44. package/errors/E0123.md +37 -0
  45. package/errors/E0124.md +36 -0
  46. package/errors/E0125.md +43 -0
  47. package/errors/E0126.md +38 -0
  48. package/errors/E0128.md +34 -0
  49. package/errors/E0129.md +42 -0
  50. package/errors/E0130.md +43 -0
  51. package/errors/E0131.md +42 -0
  52. package/errors/E0132.md +40 -0
  53. package/errors/E0133.md +46 -0
  54. package/errors/E0134.md +36 -0
  55. package/errors/E0135.md +109 -0
  56. package/errors/E0137.md +37 -0
  57. package/errors/E0140.md +46 -0
  58. package/errors/E0141.md +35 -0
  59. package/errors/E0142.md +38 -0
  60. package/errors/E0143.md +62 -0
  61. package/errors/E0144.md +49 -0
  62. package/errors/E0145.md +48 -0
  63. package/errors/E0146.md +38 -0
  64. package/errors/E0147.md +57 -0
  65. package/errors/E0148.md +42 -0
  66. package/errors/E0149.md +27 -0
  67. package/errors/E0150.md +77 -0
  68. package/errors/E0151.md +47 -0
  69. package/errors/E0152.md +35 -0
  70. package/errors/E0201.md +35 -0
  71. package/errors/E0202.md +42 -0
  72. package/errors/E0203.md +37 -0
  73. package/errors/E0204.md +46 -0
  74. package/errors/E0205.md +47 -0
  75. package/errors/E0206.md +47 -0
  76. package/errors/E0208.md +59 -0
  77. package/errors/E0210.md +44 -0
  78. package/errors/E0211.md +43 -0
  79. package/errors/E0212.md +41 -0
  80. package/errors/E0213.md +42 -0
  81. package/errors/E0214.md +42 -0
  82. package/errors/E0215.md +44 -0
  83. package/errors/E0216.md +41 -0
  84. package/errors/E0217.md +43 -0
  85. package/errors/E0218.md +44 -0
  86. package/errors/E0230.md +46 -0
  87. package/errors/E0232.md +42 -0
  88. package/errors/E0233.md +42 -0
  89. package/errors/E0234.md +43 -0
  90. package/errors/E0240.md +31 -0
  91. package/errors/E0242.md +5 -0
  92. package/errors/E0243.md +5 -0
  93. package/errors/E0250.md +39 -0
  94. package/errors/E0251.md +83 -0
  95. package/errors/E0252.md +42 -0
  96. package/errors/E0253.md +142 -0
  97. package/errors/E0254.md +38 -0
  98. package/errors/E0301.md +43 -0
  99. package/errors/E0302.md +58 -0
  100. package/errors/E0303.md +57 -0
  101. package/errors/E0304.md +9 -0
  102. package/errors/E0305.md +55 -0
  103. package/errors/E0307.md +9 -0
  104. package/errors/E0308.md +9 -0
  105. package/errors/E0310.md +46 -0
  106. package/errors/E0311.md +46 -0
  107. package/errors/E0330.md +67 -0
  108. package/errors/E0331.md +64 -0
  109. package/errors/E0332.md +52 -0
  110. package/errors/E0333.md +61 -0
  111. package/errors/E0334.md +61 -0
  112. package/errors/E0335.md +57 -0
  113. package/errors/E0336.md +50 -0
  114. package/errors/E0337.md +54 -0
  115. package/errors/E0338.md +62 -0
  116. package/errors/E0340.md +57 -0
  117. package/errors/E0341.md +51 -0
  118. package/errors/E0342.md +53 -0
  119. package/errors/E0343.md +56 -0
  120. package/errors/E0344.md +58 -0
  121. package/errors/E0345.md +51 -0
  122. package/errors/E0346.md +45 -0
  123. package/errors/E0347.md +53 -0
  124. package/errors/E0348.md +50 -0
  125. package/errors/E0349.md +52 -0
  126. package/errors/E0350.md +54 -0
  127. package/errors/E0351.md +54 -0
  128. package/errors/E0352.md +60 -0
  129. package/errors/E0353.md +53 -0
  130. package/errors/E0354.md +43 -0
  131. package/errors/E0355.md +55 -0
  132. package/errors/E0356.md +65 -0
  133. package/errors/E0357.md +68 -0
  134. package/errors/E0358.md +50 -0
  135. package/errors/E0359.md +53 -0
  136. package/errors/E0360.md +59 -0
  137. package/errors/E0361.md +59 -0
  138. package/errors/E0362.md +56 -0
  139. package/errors/E0364.md +58 -0
  140. package/errors/E0365.md +58 -0
  141. package/errors/E0366.md +56 -0
  142. package/errors/E0367.md +57 -0
  143. package/errors/E0368.md +58 -0
  144. package/errors/E0369.md +60 -0
  145. package/errors/E0370.md +59 -0
  146. package/errors/E0371.md +59 -0
  147. package/errors/E0372.md +57 -0
  148. package/errors/E0380.md +71 -0
  149. package/errors/E0381.md +61 -0
  150. package/errors/E0382.md +64 -0
  151. package/errors/E0383.md +61 -0
  152. package/errors/E0384.md +63 -0
  153. package/errors/E0385.md +61 -0
  154. package/errors/E0386.md +59 -0
  155. package/errors/E0387.md +59 -0
  156. package/errors/E0388.md +60 -0
  157. package/errors/E0389.md +59 -0
  158. package/errors/E0390.md +59 -0
  159. package/errors/E0401.md +56 -0
  160. package/errors/E0402.md +51 -0
  161. package/errors/E0403.md +51 -0
  162. package/errors/E0404.md +57 -0
  163. package/errors/E0405.md +56 -0
  164. package/errors/E0406.md +53 -0
  165. package/errors/E0407.md +54 -0
  166. package/errors/E0410.md +56 -0
  167. package/errors/E0411.md +59 -0
  168. package/errors/E0412.md +59 -0
  169. package/errors/E0413.md +74 -0
  170. package/errors/E0414.md +53 -0
  171. package/errors/E0415.md +72 -0
  172. package/errors/E0416.md +67 -0
  173. package/errors/E0418.md +59 -0
  174. package/errors/E0420.md +71 -0
  175. package/errors/E0421.md +82 -0
  176. package/errors/E0422.md +82 -0
  177. package/errors/E0423.md +83 -0
  178. package/errors/E0501.md +51 -0
  179. package/errors/E0502.md +50 -0
  180. package/errors/E0503.md +52 -0
  181. package/errors/E0504.md +64 -0
  182. package/errors/E0505.md +51 -0
  183. package/errors/E0506.md +48 -0
  184. package/errors/E0507.md +41 -0
  185. package/errors/E0508.md +39 -0
  186. package/errors/E0601.md +22 -0
  187. package/errors/E0602.md +28 -0
  188. package/errors/E0603.md +65 -0
  189. package/errors/E0604.md +37 -0
  190. package/errors/E0605.md +36 -0
  191. package/errors/E0606.md +44 -0
  192. package/errors/E0607.md +57 -0
  193. package/errors/E0608.md +37 -0
  194. package/errors/E0609.md +33 -0
  195. package/errors/E0611.md +37 -0
  196. package/errors/E0612.md +34 -0
  197. package/errors/E0613.md +30 -0
  198. package/errors/E0614.md +36 -0
  199. package/errors/E0616.md +33 -0
  200. package/errors/E0617.md +15 -0
  201. package/errors/E0618.md +16 -0
  202. package/errors/E0620.md +37 -0
  203. package/errors/E0621.md +45 -0
  204. package/errors/E0622.md +34 -0
  205. package/errors/E0623.md +33 -0
  206. package/errors/E0624.md +34 -0
  207. package/errors/E0625.md +28 -0
  208. package/errors/E0626.md +54 -0
  209. package/errors/E0627.md +27 -0
  210. package/errors/E0628.md +63 -0
  211. package/errors/E0701.md +25 -0
  212. package/errors/E0801.md +23 -0
  213. package/errors/E0802.md +22 -0
  214. package/errors/E0803.md +22 -0
  215. package/errors/E0804.md +25 -0
  216. package/errors/E0805.md +26 -0
  217. package/errors/E0901.md +27 -0
  218. package/errors/E0902.md +40 -0
  219. package/errors/E0903.md +23 -0
  220. package/errors/E1001.md +53 -0
  221. package/errors/E1002.md +43 -0
  222. package/errors/E1003.md +40 -0
  223. package/errors/E1004.md +44 -0
  224. package/errors/README.md +215 -0
  225. package/package.json +29 -3
@@ -0,0 +1,37 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0608: the lineage imports a package that is not available here
4
+
5
+ The lineage imports a package no module provides. Only thema's own module
6
+ is built in; another module must be listed in the deps of a cue.mod/module.cue
7
+ above the lineage, for the loader to fetch it.
8
+
9
+ ## Example
10
+
11
+ `pkg/x.cue`:
12
+
13
+ ```cue
14
+ package x
15
+
16
+ import "example.com/nothere"
17
+
18
+ lin: nothere.Lineage
19
+ ```
20
+
21
+ `data.json`:
22
+
23
+ ```json
24
+ {"a": "Argo"}
25
+ ```
26
+
27
+ thema reports:
28
+
29
+ ```
30
+ error[E0608]: the lineage imports example.com/nothere, which is not available here
31
+ --> pkg/x.cue:3:8
32
+ |
33
+ 3 | import "example.com/nothere"
34
+ | ^^^^^^^^^^^^^^^^^^^^^
35
+ |
36
+ = help: only github.com/sdboyer/thema is built in; another module must be declared in the deps of a cue.mod/module.cue above the lineage
37
+ ```
@@ -0,0 +1,33 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0609: loading the lineage's CUE failed
4
+
5
+ CUE's loader failed in a way thema does not describe further, here a syntax
6
+ error in the lineage file. The detail is the loader's own message.
7
+
8
+ ## Example
9
+
10
+ `broken.cue`:
11
+
12
+ ```cue
13
+ name: "ship"
14
+ schemas: "0": "0": {schema: {a: string
15
+ ```
16
+
17
+ `data.json`:
18
+
19
+ ```json
20
+ {"a": "Argo"}
21
+ ```
22
+
23
+ thema reports:
24
+
25
+ ```
26
+ error[E0609]: loading the lineage's CUE failed
27
+ --> broken.cue:2:40
28
+ |
29
+ 2 | schemas: "0": "0": {schema: {a: string
30
+ | ^
31
+ |
32
+ = detail: expected '}', found 'EOF'
33
+ ```
@@ -0,0 +1,37 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0611: the data's format could not be recognized
4
+
5
+ The data document parses as neither JSON nor YAML, and no format was named
6
+ with -e. Naming the format shows what its parser reports.
7
+
8
+ ## Example
9
+
10
+ `lineage.cue`:
11
+
12
+ ```cue
13
+ name: "ship"
14
+ schemas: {
15
+ "0": {
16
+ "0": {
17
+ schema: {
18
+ a: string
19
+ }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ `bad.json`:
26
+
27
+ ```json
28
+ {"a": "Argo"
29
+ ```
30
+
31
+ thema reports:
32
+
33
+ ```
34
+ error[E0611]: bad.json is neither JSON nor YAML
35
+ |
36
+ = help: name the format with -e json or -e yaml to see what its parser reports
37
+ ```
@@ -0,0 +1,34 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0612: the data's format flag disagrees with its file extension
4
+
5
+ The format named with -e disagrees with the data file's extension.
6
+
7
+ ## Example
8
+
9
+ `lineage.cue`:
10
+
11
+ ```cue
12
+ name: "ship"
13
+ schemas: {
14
+ "0": {
15
+ "0": {
16
+ schema: {
17
+ a: string
18
+ }
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ `data.json`:
25
+
26
+ ```json
27
+ {"a": "Argo"}
28
+ ```
29
+
30
+ thema reports:
31
+
32
+ ```
33
+ error[E0612]: -e yaml was given, but data.json has a json extension
34
+ ```
@@ -0,0 +1,30 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0613: no data was given, or the data path cannot be read
4
+
5
+ No data was given: no path argument, and nothing on stdin.
6
+
7
+ ## Example
8
+
9
+ `lineage.cue`:
10
+
11
+ ```cue
12
+ name: "ship"
13
+ schemas: {
14
+ "0": {
15
+ "0": {
16
+ schema: {
17
+ a: string
18
+ }
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ thema reports:
25
+
26
+ ```
27
+ error[E0613]: no data was given
28
+ |
29
+ = help: pass the path to a JSON or YAML file, or pipe the data on stdin
30
+ ```
@@ -0,0 +1,36 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0614: the data format flag names a format thema does not read
4
+
5
+ The format named with -e is not one thema reads. It takes json or yaml.
6
+
7
+ ## Example
8
+
9
+ `lineage.cue`:
10
+
11
+ ```cue
12
+ name: "ship"
13
+ schemas: {
14
+ "0": {
15
+ "0": {
16
+ schema: {
17
+ a: string
18
+ }
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ `data.json`:
25
+
26
+ ```json
27
+ {"a": "Argo"}
28
+ ```
29
+
30
+ thema reports:
31
+
32
+ ```
33
+ error[E0614]: -e toml names a format thema does not read
34
+ |
35
+ = help: -e takes json or yaml
36
+ ```
@@ -0,0 +1,33 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0616: a file cannot be written
4
+
5
+ A command could not write a file it needed to: here `thema lineage fmt`
6
+ rewriting a version file that is not in the authoring form's layout, which
7
+ the author's permissions do not let it change. The detail is the operating
8
+ system's reason.
9
+
10
+ ## Example
11
+
12
+ `ship/history/0.0.thema`:
13
+
14
+ ```cue
15
+ Schema: {name: string, count: int}
16
+ ```
17
+
18
+ `ship/tip.thema`:
19
+
20
+ ```cue
21
+ Schema: {
22
+ name: string
23
+ count: int
24
+ }
25
+ ```
26
+
27
+ thema reports:
28
+
29
+ ```
30
+ error[E0616]: ship/history/0.0.thema cannot be written
31
+ |
32
+ = detail: permission denied
33
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0617: this thema was built without the playground
4
+
5
+ thema serve playground serves the playground built into this thema, and this
6
+ one was built without it. The help says how to build it in: the bundle is
7
+ generated, then embedded under the playgroundui build tag.
8
+
9
+ thema reports:
10
+
11
+ ```
12
+ error[E0617]: this thema was built without the playground
13
+ |
14
+ = help: build it in: go generate ./cmd/thema/playground && go build -tags playgroundui ./cmd/thema
15
+ ```
@@ -0,0 +1,16 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0618: the server cannot listen on the address
4
+
5
+ thema serve playground could not listen on the address given with --addr: it
6
+ is not a valid address, is in use, or needs privileges the command
7
+ lacks. The detail is the operating system's reason.
8
+
9
+ thema reports:
10
+
11
+ ```
12
+ error[E0618]: cannot listen on 127.0.0.1:99999
13
+ |
14
+ = detail: listen tcp: address 99999: invalid port
15
+ = help: choose another address with --addr
16
+ ```
@@ -0,0 +1,37 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0620: a flag or argument is not valid
4
+
5
+ A flag or argument is not valid, here a version that is not of the form
6
+ <major>.<minor>. The help says what the flag takes.
7
+
8
+ ## Example
9
+
10
+ `lineage.cue`:
11
+
12
+ ```cue
13
+ name: "ship"
14
+ schemas: {
15
+ "0": {
16
+ "0": {
17
+ schema: {
18
+ a: string
19
+ }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ `data.json`:
26
+
27
+ ```json
28
+ {"a": "Argo"}
29
+ ```
30
+
31
+ thema reports:
32
+
33
+ ```
34
+ error[E0620]: "3" is not a version
35
+ |
36
+ = help: a version is <major>.<minor>, such as 1.0
37
+ ```
@@ -0,0 +1,45 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0621: an example's example.cue is not valid
4
+
5
+ Each lineage a playground deployment offers as an example has an example.cue
6
+ beside its version files, describing it: a category, the group it is listed
7
+ in, and optionally a title and a summary, each a string. Nothing else may be
8
+ in it.
9
+
10
+ ## Example
11
+
12
+ `lineages/pets/cat/history/0.0.thema`:
13
+
14
+ ```cue
15
+ Schema: {
16
+ lives: int
17
+ }
18
+ ```
19
+
20
+ `lineages/pets/cat/tip.thema`:
21
+
22
+ ```cue
23
+ Schema: {
24
+ lives: int
25
+ }
26
+ ```
27
+
28
+ `lineages/pets/cat/example.cue`:
29
+
30
+ ```cue
31
+ category: "Pets"
32
+ color: "grey"
33
+ ```
34
+
35
+ thema reports:
36
+
37
+ ```
38
+ error[E0621]: lineages/pets/cat/example.cue has a field color, which is not category, title or summary
39
+ --> lineages/pets/cat/example.cue:2:1
40
+ |
41
+ 2 | color: "grey"
42
+ | ^^^^^
43
+ |
44
+ = help: remove the field
45
+ ```
@@ -0,0 +1,34 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0622: the examples directory holds no example
4
+
5
+ A directory of lineages offers the playground the ones with an example.cue
6
+ beside their version files, and a directory with none offers nothing, which
7
+ is a mistake: the notes list the lineages it holds without one.
8
+
9
+ ## Example
10
+
11
+ `lineages/wip/draft/history/0.0.thema`:
12
+
13
+ ```cue
14
+ Schema: {
15
+ x: int
16
+ }
17
+ ```
18
+
19
+ `lineages/wip/draft/tip.thema`:
20
+
21
+ ```cue
22
+ Schema: {
23
+ x: int
24
+ }
25
+ ```
26
+
27
+ thema reports:
28
+
29
+ ```
30
+ error[E0622]: lineages holds no example
31
+ |
32
+ = note: lineages/wip/draft holds a lineage but no example.cue
33
+ = help: an example is a lineage's directory of version files with an example.cue beside them
34
+ ```
@@ -0,0 +1,33 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0623: the directory for a new lineage already holds version files
4
+
5
+ `thema lineage init` creates a new lineage, and never overwrites one: the
6
+ directory it would write the new lineage's tip.thema in already holds version
7
+ files, here the tip and history of the lineage ship.
8
+
9
+ ## Example
10
+
11
+ `ship/history/0.0.thema`:
12
+
13
+ ```cue
14
+ Schema: {
15
+ name: string
16
+ }
17
+ ```
18
+
19
+ `ship/tip.thema`:
20
+
21
+ ```cue
22
+ Schema: {
23
+ name: string
24
+ }
25
+ ```
26
+
27
+ thema reports:
28
+
29
+ ```
30
+ error[E0623]: ship already holds a lineage's version files
31
+ |
32
+ = help: init creates a new lineage and never overwrites one: give -l a directory that holds no version files
33
+ ```
@@ -0,0 +1,34 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0624: the document is not of an OpenAPI version thema converts
4
+
5
+ `thema lineage init openapi` converts OpenAPI 3.0 and 3.1 documents, which
6
+ declare their version in an `openapi` field. Here the document is OpenAPI 2,
7
+ Swagger, which declares `swagger: "2.0"` instead, and keeps its schemas under
8
+ `definitions`.
9
+
10
+ ## Example
11
+
12
+ `swagger.json`:
13
+
14
+ ```json
15
+ {
16
+ "swagger": "2.0",
17
+ "info": {"title": "ships", "version": "v1"},
18
+ "paths": {},
19
+ "definitions": {
20
+ "Ship": {
21
+ "type": "object",
22
+ "properties": {"name": {"type": "string"}}
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ thema reports:
29
+
30
+ ```
31
+ error[E0624]: the document declares no OpenAPI version, so it is not an OpenAPI document thema converts
32
+ |
33
+ = help: an OpenAPI 3 document declares its version as a string, as in openapi: "3.0.0"; convert an OpenAPI 2 (Swagger) document to OpenAPI 3 first
34
+ ```
@@ -0,0 +1,28 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0625: the directory to position a lineage's files under is not a valid path
4
+
5
+ A tool that compiles a lineage positions its files under a directory with
6
+ `authoring.At`, so that lineages from different directories, composed into one
7
+ value, name their own files. The directory is a path of the `fs.FS` the
8
+ lineage was loaded from: relative and separated by `/`, with no `.` or `..`
9
+ elements. Here it climbs out of the filesystem with `..`.
10
+
11
+ ## Example
12
+
13
+ `query/history/0.0.thema`:
14
+
15
+ ```cue
16
+ Schema: {
17
+ a: string
18
+ }
19
+ ```
20
+
21
+ thema reports:
22
+
23
+ ```
24
+ error[E0625]: "../operations/get/query" is not a directory to position the lineage's files under
25
+ |
26
+ = note: the directory is a path of an fs.FS: relative and separated by /, with no . or .. elements
27
+ = help: pass the lineage's directory as a path of its fs.FS, such as operations/get/query
28
+ ```
@@ -0,0 +1,54 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0626: the lineage bound on the development path is not the one that was compiled
4
+
5
+ A tool that composes lineages into one value binds the tip of one, compiled
6
+ on the development path, as that value holds it, with
7
+ `authoring.BindDevelopmentValue`. The development path tolerates the lenses
8
+ missing from the tip's edge only for the lineage that was compiled with them
9
+ missing. Here the value bound is the history alone, without the tip: it has
10
+ none of the tip's version, so it is not the lineage that was compiled.
11
+
12
+ ## Example
13
+
14
+ `ship/history/0.0.thema`:
15
+
16
+ ```cue
17
+ Schema: {
18
+ a: string
19
+ b: int
20
+ }
21
+ ```
22
+
23
+ `ship/tip.thema`:
24
+
25
+ ```cue
26
+ Schema: {
27
+ a: string
28
+ }
29
+ ```
30
+
31
+ `value.cue`:
32
+
33
+ ```cue
34
+ name: "ship"
35
+ schemas: {
36
+ "0": {
37
+ "0": {
38
+ schema: {
39
+ a: string
40
+ b: int
41
+ }
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ thema reports:
48
+
49
+ ```
50
+ error[E0626]: the lineage to bind on the development path has versions 0.0, where ship was compiled with 0.0, 1.0
51
+ |
52
+ = note: the development path tolerates the lenses missing from the tip's edge because ship was compiled with them missing, so it binds only the lineage ship was compiled to
53
+ = help: bind the lineage that Compiled.File builds, as the larger value holds it
54
+ ```
@@ -0,0 +1,27 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0627: the placements given to Compose cannot be written as one package
4
+
5
+ A tool composes lineages into one package with `thema.Compose`, which writes
6
+ each lineage's file into the package nested under fields at the lineage's
7
+ path. A path that names a list element, a pattern, an optional or required
8
+ constraint, or a hidden label cannot be written as fields. Here the path
9
+ indexes a list.
10
+
11
+ ## Example
12
+
13
+ `text.cue`:
14
+
15
+ ```cue
16
+ name: "get"
17
+ schemas: "0": "0": schema: {a?: string}
18
+ ```
19
+
20
+ thema reports:
21
+
22
+ ```
23
+ error[E0627]: a placement's path is made of field and definition labels, and placement 0's path operations[0] is not
24
+ |
25
+ = note: 0 is a list index, and a placement goes in a field
26
+ = help: place the file at a path of regular field and definition labels
27
+ ```
@@ -0,0 +1,63 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0628: a generated file on disk is not what would be generated
4
+
5
+ With --check, a command that generates files writes nothing, and checks the
6
+ files already on disk instead: here `thema lineage gen gotypes`, whose files
7
+ for version 0.0 are out of date, and for version 0.1 were never generated. One
8
+ diagnostic names each file; running the command without --check regenerates
9
+ them.
10
+
11
+ ## Example
12
+
13
+ `lineage.cue`:
14
+
15
+ ```cue
16
+ name: "ship"
17
+ schemas: {
18
+ "0": {
19
+ "0": {
20
+ schema: {
21
+ name: string
22
+ }
23
+ }
24
+ "1": {
25
+ schema: {
26
+ name: string
27
+ crew?: int
28
+ }
29
+ }
30
+ }
31
+ }
32
+ lenses: "0.1->0.0": {
33
+ v0_1: _
34
+ v0_0: name: v0_1.name
35
+ }
36
+ ```
37
+
38
+ `gen/v0_0/types.go`:
39
+
40
+ ```
41
+ // Code generated by thema. DO NOT EDIT.
42
+
43
+ package v0_0
44
+
45
+ // Ship is version 0.0 of the ship lineage's schema.
46
+ type Ship struct {
47
+ Title string `json:"title"`
48
+ }
49
+ ```
50
+
51
+ thema reports:
52
+
53
+ ```
54
+ error[E0628]: a generated file on disk is what would be generated, and v0_0/types.go differs
55
+ |
56
+ = note: the path is relative to -o, gen
57
+ = help: run the command without --check to regenerate it
58
+
59
+ error[E0628]: a generated file is on disk, and v0_1/types.go is missing
60
+ |
61
+ = note: the path is relative to -o, gen
62
+ = help: run the command without --check to regenerate it
63
+ ```
@@ -0,0 +1,25 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0701: generating code from the schema failed
4
+
5
+ A generator could not express a schema the lineage accepts: here TypeScript,
6
+ for a struct closed with CUE's close(). The schema is valid; the target
7
+ language has no equivalent for the construct. The detail is the generator's
8
+ own message.
9
+
10
+ ## Example
11
+
12
+ `request.json`:
13
+
14
+ ```json
15
+ {"lineage": {"normal": {"path": "lineage.cue", "text": "name: \"ship\"\nschemas: {\n\t\"0\": {\n\t\t\"0\": {\n\t\t\tschema: {\n\t\t\t\tcrew: close({size: int})\n\t\t\t}\n\t\t}\n\t}\n}\n"}}}
16
+ ```
17
+
18
+ thema reports:
19
+
20
+ ```
21
+ error[E0701]: generating TypeScript from schema 0.0 failed
22
+ |
23
+ = detail: generating TS for schema root failed: Found an error in the field 'crew:6:5'. Error: not expecting op type 6
24
+ = help: the schema is valid; TypeScript cannot express some construct in it
25
+ ```
@@ -0,0 +1,23 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0801: the playground request is malformed
4
+
5
+ The playground was asked for an operation it does not have, or sent a request
6
+ that is not the JSON the operation takes. This is a bug in whatever sent the
7
+ request; the help lists the operations.
8
+
9
+ ## Example
10
+
11
+ `request.json`:
12
+
13
+ ```json
14
+ {}
15
+ ```
16
+
17
+ thema reports:
18
+
19
+ ```
20
+ error[E0801]: "translate-all" is not an operation of the playground
21
+ |
22
+ = help: the operations are bind, compile, decompile, example, examples, format, init, jsonschema, openapi, register-examples, translate, typescript, validate and validate-any
23
+ ```