skill-universe 1.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 (334) hide show
  1. package/README.md +24 -0
  2. package/bin/skillc.mjs +3 -0
  3. package/build/dev/javascript/argv/_gleam_artefacts/argv.cache +0 -0
  4. package/build/dev/javascript/argv/_gleam_artefacts/argv.cache_inline +0 -0
  5. package/build/dev/javascript/argv/_gleam_artefacts/argv.cache_meta +0 -0
  6. package/build/dev/javascript/argv/argv.erl +12 -0
  7. package/build/dev/javascript/argv/argv.mjs +31 -0
  8. package/build/dev/javascript/argv/argv_ffi.erl +27 -0
  9. package/build/dev/javascript/argv/argv_ffi.mjs +20 -0
  10. package/build/dev/javascript/argv/gleam.mjs +1 -0
  11. package/build/dev/javascript/filepath/_gleam_artefacts/filepath.cache +0 -0
  12. package/build/dev/javascript/filepath/_gleam_artefacts/filepath.cache_inline +0 -0
  13. package/build/dev/javascript/filepath/_gleam_artefacts/filepath.cache_meta +0 -0
  14. package/build/dev/javascript/filepath/filepath.erl +425 -0
  15. package/build/dev/javascript/filepath/filepath.mjs +529 -0
  16. package/build/dev/javascript/filepath/filepath_ffi.erl +9 -0
  17. package/build/dev/javascript/filepath/filepath_ffi.mjs +6 -0
  18. package/build/dev/javascript/filepath/gleam.mjs +1 -0
  19. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache +0 -0
  20. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_inline +0 -0
  21. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_meta +0 -0
  22. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache +0 -0
  23. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_inline +0 -0
  24. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_meta +0 -0
  25. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache +0 -0
  26. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_inline +0 -0
  27. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_meta +0 -0
  28. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache +0 -0
  29. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_inline +0 -0
  30. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_meta +0 -0
  31. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache +0 -0
  32. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_inline +0 -0
  33. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_meta +0 -0
  34. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache +0 -0
  35. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_inline +0 -0
  36. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_meta +0 -0
  37. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache +0 -0
  38. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_inline +0 -0
  39. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_meta +0 -0
  40. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache +0 -0
  41. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_inline +0 -0
  42. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_meta +0 -0
  43. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache +0 -0
  44. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_inline +0 -0
  45. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_meta +0 -0
  46. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache +0 -0
  47. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_inline +0 -0
  48. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_meta +0 -0
  49. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache +0 -0
  50. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_inline +0 -0
  51. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_meta +0 -0
  52. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache +0 -0
  53. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_inline +0 -0
  54. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_meta +0 -0
  55. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache +0 -0
  56. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_inline +0 -0
  57. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_meta +0 -0
  58. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache +0 -0
  59. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_inline +0 -0
  60. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_meta +0 -0
  61. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache +0 -0
  62. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_inline +0 -0
  63. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_meta +0 -0
  64. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache +0 -0
  65. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_inline +0 -0
  66. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_meta +0 -0
  67. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache +0 -0
  68. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_inline +0 -0
  69. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_meta +0 -0
  70. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache +0 -0
  71. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_inline +0 -0
  72. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_meta +0 -0
  73. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache +0 -0
  74. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_inline +0 -0
  75. package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_meta +0 -0
  76. package/build/dev/javascript/gleam_stdlib/dict.mjs +710 -0
  77. package/build/dev/javascript/gleam_stdlib/gleam/bit_array.mjs +285 -0
  78. package/build/dev/javascript/gleam_stdlib/gleam/bool.mjs +313 -0
  79. package/build/dev/javascript/gleam_stdlib/gleam/bytes_tree.mjs +225 -0
  80. package/build/dev/javascript/gleam_stdlib/gleam/dict.mjs +456 -0
  81. package/build/dev/javascript/gleam_stdlib/gleam/dynamic/decode.mjs +985 -0
  82. package/build/dev/javascript/gleam_stdlib/gleam/dynamic.mjs +35 -0
  83. package/build/dev/javascript/gleam_stdlib/gleam/float.mjs +572 -0
  84. package/build/dev/javascript/gleam_stdlib/gleam/function.mjs +6 -0
  85. package/build/dev/javascript/gleam_stdlib/gleam/int.mjs +832 -0
  86. package/build/dev/javascript/gleam_stdlib/gleam/io.mjs +8 -0
  87. package/build/dev/javascript/gleam_stdlib/gleam/list.mjs +3160 -0
  88. package/build/dev/javascript/gleam_stdlib/gleam/option.mjs +418 -0
  89. package/build/dev/javascript/gleam_stdlib/gleam/order.mjs +178 -0
  90. package/build/dev/javascript/gleam_stdlib/gleam/pair.mjs +102 -0
  91. package/build/dev/javascript/gleam_stdlib/gleam/result.mjs +480 -0
  92. package/build/dev/javascript/gleam_stdlib/gleam/set.mjs +416 -0
  93. package/build/dev/javascript/gleam_stdlib/gleam/string.mjs +723 -0
  94. package/build/dev/javascript/gleam_stdlib/gleam/string_tree.mjs +133 -0
  95. package/build/dev/javascript/gleam_stdlib/gleam/uri.mjs +1155 -0
  96. package/build/dev/javascript/gleam_stdlib/gleam.mjs +1 -0
  97. package/build/dev/javascript/gleam_stdlib/gleam@bit_array.erl +347 -0
  98. package/build/dev/javascript/gleam_stdlib/gleam@bool.erl +352 -0
  99. package/build/dev/javascript/gleam_stdlib/gleam@bytes_tree.erl +211 -0
  100. package/build/dev/javascript/gleam_stdlib/gleam@dict.erl +521 -0
  101. package/build/dev/javascript/gleam_stdlib/gleam@dynamic.erl +106 -0
  102. package/build/dev/javascript/gleam_stdlib/gleam@dynamic@decode.erl +1112 -0
  103. package/build/dev/javascript/gleam_stdlib/gleam@float.erl +764 -0
  104. package/build/dev/javascript/gleam_stdlib/gleam@function.erl +18 -0
  105. package/build/dev/javascript/gleam_stdlib/gleam@int.erl +1004 -0
  106. package/build/dev/javascript/gleam_stdlib/gleam@io.erl +80 -0
  107. package/build/dev/javascript/gleam_stdlib/gleam@list.erl +2832 -0
  108. package/build/dev/javascript/gleam_stdlib/gleam@option.erl +413 -0
  109. package/build/dev/javascript/gleam_stdlib/gleam@order.erl +200 -0
  110. package/build/dev/javascript/gleam_stdlib/gleam@pair.erl +110 -0
  111. package/build/dev/javascript/gleam_stdlib/gleam@result.erl +532 -0
  112. package/build/dev/javascript/gleam_stdlib/gleam@set.erl +433 -0
  113. package/build/dev/javascript/gleam_stdlib/gleam@string.erl +1012 -0
  114. package/build/dev/javascript/gleam_stdlib/gleam@string_tree.erl +207 -0
  115. package/build/dev/javascript/gleam_stdlib/gleam@uri.erl +1049 -0
  116. package/build/dev/javascript/gleam_stdlib/gleam_stdlib.erl +529 -0
  117. package/build/dev/javascript/gleam_stdlib/gleam_stdlib.mjs +1050 -0
  118. package/build/dev/javascript/gleam_version +1 -0
  119. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit.cache +0 -0
  120. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit.cache_inline +0 -0
  121. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit.cache_meta +0 -0
  122. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@gleam_panic.cache +0 -0
  123. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@gleam_panic.cache_inline +0 -0
  124. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@gleam_panic.cache_meta +0 -0
  125. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@reporting.cache +0 -0
  126. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@reporting.cache_inline +0 -0
  127. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@reporting.cache_meta +0 -0
  128. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@should.cache +0 -0
  129. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@should.cache_inline +0 -0
  130. package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@should.cache_meta +0 -0
  131. package/build/dev/javascript/gleeunit/gleam.mjs +1 -0
  132. package/build/dev/javascript/gleeunit/gleeunit/internal/gleam_panic.mjs +180 -0
  133. package/build/dev/javascript/gleeunit/gleeunit/internal/gleeunit_gleam_panic_ffi.erl +49 -0
  134. package/build/dev/javascript/gleeunit/gleeunit/internal/gleeunit_gleam_panic_ffi.mjs +91 -0
  135. package/build/dev/javascript/gleeunit/gleeunit/internal/reporting.mjs +256 -0
  136. package/build/dev/javascript/gleeunit/gleeunit/should.mjs +135 -0
  137. package/build/dev/javascript/gleeunit/gleeunit.erl +89 -0
  138. package/build/dev/javascript/gleeunit/gleeunit.mjs +62 -0
  139. package/build/dev/javascript/gleeunit/gleeunit@internal@gleam_panic.erl +56 -0
  140. package/build/dev/javascript/gleeunit/gleeunit@internal@reporting.erl +343 -0
  141. package/build/dev/javascript/gleeunit/gleeunit@should.erl +153 -0
  142. package/build/dev/javascript/gleeunit/gleeunit_ffi.erl +21 -0
  143. package/build/dev/javascript/gleeunit/gleeunit_ffi.mjs +100 -0
  144. package/build/dev/javascript/gleeunit/gleeunit_progress.erl +72 -0
  145. package/build/dev/javascript/prelude.mjs +1575 -0
  146. package/build/dev/javascript/simplifile/_gleam_artefacts/simplifile.cache +0 -0
  147. package/build/dev/javascript/simplifile/_gleam_artefacts/simplifile.cache_inline +0 -0
  148. package/build/dev/javascript/simplifile/_gleam_artefacts/simplifile.cache_meta +0 -0
  149. package/build/dev/javascript/simplifile/gleam.mjs +1 -0
  150. package/build/dev/javascript/simplifile/simplifile.erl +893 -0
  151. package/build/dev/javascript/simplifile/simplifile.mjs +893 -0
  152. package/build/dev/javascript/simplifile/simplifile_erl.erl +244 -0
  153. package/build/dev/javascript/simplifile/simplifile_js.mjs +400 -0
  154. package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache +0 -0
  155. package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache_inline +0 -0
  156. package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache_meta +0 -0
  157. package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache_warnings +0 -0
  158. package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache +0 -0
  159. package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache_inline +0 -0
  160. package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache_meta +0 -0
  161. package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache_warnings +0 -0
  162. package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache +0 -0
  163. package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache_inline +0 -0
  164. package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache_meta +0 -0
  165. package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache_warnings +0 -0
  166. package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache +0 -0
  167. package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache_inline +0 -0
  168. package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache_meta +0 -0
  169. package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache_warnings +0 -0
  170. package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache +0 -0
  171. package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache_inline +0 -0
  172. package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache_meta +0 -0
  173. package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache_warnings +0 -0
  174. package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache +0 -0
  175. package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache_inline +0 -0
  176. package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache_meta +0 -0
  177. package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache_warnings +0 -0
  178. package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache +0 -0
  179. package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache_inline +0 -0
  180. package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache_meta +0 -0
  181. package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache_warnings +0 -0
  182. package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache +0 -0
  183. package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache_inline +0 -0
  184. package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache_meta +0 -0
  185. package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache_warnings +0 -0
  186. package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache +0 -0
  187. package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache_inline +0 -0
  188. package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache_meta +0 -0
  189. package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache_warnings +0 -0
  190. package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache +0 -0
  191. package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache_inline +0 -0
  192. package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache_meta +0 -0
  193. package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache_warnings +0 -0
  194. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache +0 -0
  195. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache_inline +0 -0
  196. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache_meta +0 -0
  197. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache_warnings +0 -0
  198. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache +0 -0
  199. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache_inline +0 -0
  200. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache_meta +0 -0
  201. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache_warnings +0 -0
  202. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache +0 -0
  203. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache_inline +0 -0
  204. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache_meta +0 -0
  205. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache_warnings +0 -0
  206. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache +0 -0
  207. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache_inline +0 -0
  208. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache_meta +0 -0
  209. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache_warnings +0 -0
  210. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache +0 -0
  211. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache_inline +0 -0
  212. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache_meta +0 -0
  213. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache_warnings +0 -0
  214. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache +0 -0
  215. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache_inline +0 -0
  216. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache_meta +0 -0
  217. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache_warnings +0 -0
  218. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache +0 -0
  219. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache_inline +0 -0
  220. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache_meta +0 -0
  221. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache_warnings +0 -0
  222. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache +0 -0
  223. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache_inline +0 -0
  224. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache_meta +0 -0
  225. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache_warnings +0 -0
  226. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache +0 -0
  227. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache_inline +0 -0
  228. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache_meta +0 -0
  229. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache_warnings +0 -0
  230. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache +0 -0
  231. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache_inline +0 -0
  232. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache_meta +0 -0
  233. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache_warnings +0 -0
  234. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache +0 -0
  235. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache_inline +0 -0
  236. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache_meta +0 -0
  237. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache_warnings +0 -0
  238. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache +0 -0
  239. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache_inline +0 -0
  240. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache_meta +0 -0
  241. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache_warnings +0 -0
  242. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache +0 -0
  243. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache_inline +0 -0
  244. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache_meta +0 -0
  245. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache_warnings +0 -0
  246. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache +0 -0
  247. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache_inline +0 -0
  248. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache_meta +0 -0
  249. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache_warnings +0 -0
  250. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache +0 -0
  251. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache_inline +0 -0
  252. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache_meta +0 -0
  253. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache_warnings +0 -0
  254. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache +0 -0
  255. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache_inline +0 -0
  256. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache_meta +0 -0
  257. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache_warnings +0 -0
  258. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache +0 -0
  259. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache_inline +0 -0
  260. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache_meta +0 -0
  261. package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache_warnings +0 -0
  262. package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache +0 -0
  263. package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache_inline +0 -0
  264. package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache_meta +0 -0
  265. package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache_warnings +0 -0
  266. package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache +0 -0
  267. package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache_inline +0 -0
  268. package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache_meta +0 -0
  269. package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache_warnings +0 -0
  270. package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache +0 -0
  271. package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache_inline +0 -0
  272. package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache_meta +0 -0
  273. package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache_warnings +0 -0
  274. package/build/dev/javascript/skillc/cli_test.mjs +461 -0
  275. package/build/dev/javascript/skillc/compiler_test.mjs +3089 -0
  276. package/build/dev/javascript/skillc/config_test.mjs +308 -0
  277. package/build/dev/javascript/skillc/gleam.main.mjs +2 -0
  278. package/build/dev/javascript/skillc/gleam.mjs +1 -0
  279. package/build/dev/javascript/skillc/importer_test.mjs +1643 -0
  280. package/build/dev/javascript/skillc/parser_test.mjs +1601 -0
  281. package/build/dev/javascript/skillc/path_test.mjs +26 -0
  282. package/build/dev/javascript/skillc/provider_test.mjs +221 -0
  283. package/build/dev/javascript/skillc/registry_test.mjs +359 -0
  284. package/build/dev/javascript/skillc/scaffold_test.mjs +405 -0
  285. package/build/dev/javascript/skillc/skillc/compiler.mjs +724 -0
  286. package/build/dev/javascript/skillc/skillc/config.mjs +172 -0
  287. package/build/dev/javascript/skillc/skillc/error.mjs +145 -0
  288. package/build/dev/javascript/skillc/skillc/fs.mjs +40 -0
  289. package/build/dev/javascript/skillc/skillc/importer.mjs +975 -0
  290. package/build/dev/javascript/skillc/skillc/parser.mjs +427 -0
  291. package/build/dev/javascript/skillc/skillc/path.mjs +52 -0
  292. package/build/dev/javascript/skillc/skillc/platform.mjs +44 -0
  293. package/build/dev/javascript/skillc/skillc/provider.mjs +86 -0
  294. package/build/dev/javascript/skillc/skillc/registry.mjs +701 -0
  295. package/build/dev/javascript/skillc/skillc/scaffold.mjs +117 -0
  296. package/build/dev/javascript/skillc/skillc/semver.mjs +293 -0
  297. package/build/dev/javascript/skillc/skillc/shell.mjs +14 -0
  298. package/build/dev/javascript/skillc/skillc/template.mjs +1177 -0
  299. package/build/dev/javascript/skillc/skillc/types.mjs +249 -0
  300. package/build/dev/javascript/skillc/skillc/version_constraint.mjs +290 -0
  301. package/build/dev/javascript/skillc/skillc/yaml.mjs +51 -0
  302. package/build/dev/javascript/skillc/skillc.mjs +873 -0
  303. package/build/dev/javascript/skillc/skillc_ffi.mjs +30 -0
  304. package/build/dev/javascript/skillc/skillc_test.mjs +5 -0
  305. package/build/dev/javascript/skillc/template_test.mjs +1638 -0
  306. package/build/dev/javascript/skillc/version_constraint_test.mjs +1325 -0
  307. package/build/dev/javascript/yay/_gleam_artefacts/yay.cache +0 -0
  308. package/build/dev/javascript/yay/_gleam_artefacts/yay.cache_inline +0 -0
  309. package/build/dev/javascript/yay/_gleam_artefacts/yay.cache_meta +0 -0
  310. package/build/dev/javascript/yay/gleam.mjs +1 -0
  311. package/build/dev/javascript/yay/yaml_ffi.erl +106 -0
  312. package/build/dev/javascript/yay/yaml_ffi.mjs +373 -0
  313. package/build/dev/javascript/yay/yay.erl +1218 -0
  314. package/build/dev/javascript/yay/yay.mjs +1403 -0
  315. package/package.json +28 -0
  316. package/src/skillc/compiler.gleam +561 -0
  317. package/src/skillc/config.gleam +91 -0
  318. package/src/skillc/error.gleam +37 -0
  319. package/src/skillc/fs.gleam +31 -0
  320. package/src/skillc/importer.gleam +709 -0
  321. package/src/skillc/parser.gleam +279 -0
  322. package/src/skillc/path.gleam +30 -0
  323. package/src/skillc/platform.gleam +25 -0
  324. package/src/skillc/provider.gleam +58 -0
  325. package/src/skillc/registry.gleam +472 -0
  326. package/src/skillc/scaffold.gleam +112 -0
  327. package/src/skillc/semver.gleam +165 -0
  328. package/src/skillc/shell.gleam +12 -0
  329. package/src/skillc/template.gleam +885 -0
  330. package/src/skillc/types.gleam +93 -0
  331. package/src/skillc/version_constraint.gleam +163 -0
  332. package/src/skillc/yaml.gleam +27 -0
  333. package/src/skillc.gleam +466 -0
  334. package/src/skillc_ffi.mjs +30 -0
@@ -0,0 +1,249 @@
1
+ import * as $option from "../../gleam_stdlib/gleam/option.mjs";
2
+ import { Ok, Error, CustomType as $CustomType } from "../gleam.mjs";
3
+ import * as $semver from "../skillc/semver.mjs";
4
+ import * as $version_constraint from "../skillc/version_constraint.mjs";
5
+
6
+ export class OpenClaw extends $CustomType {}
7
+ export const Provider$OpenClaw = () => new OpenClaw();
8
+ export const Provider$isOpenClaw = (value) => value instanceof OpenClaw;
9
+
10
+ export class ClaudeCode extends $CustomType {}
11
+ export const Provider$ClaudeCode = () => new ClaudeCode();
12
+ export const Provider$isClaudeCode = (value) => value instanceof ClaudeCode;
13
+
14
+ export class Codex extends $CustomType {}
15
+ export const Provider$Codex = () => new Codex();
16
+ export const Provider$isCodex = (value) => value instanceof Codex;
17
+
18
+ export class Required extends $CustomType {}
19
+ export const ConfigRequirement$Required = () => new Required();
20
+ export const ConfigRequirement$isRequired = (value) =>
21
+ value instanceof Required;
22
+
23
+ export class Optional extends $CustomType {}
24
+ export const ConfigRequirement$Optional = () => new Optional();
25
+ export const ConfigRequirement$isOptional = (value) =>
26
+ value instanceof Optional;
27
+
28
+ export class OptionalWithDefault extends $CustomType {
29
+ constructor($0) {
30
+ super();
31
+ this[0] = $0;
32
+ }
33
+ }
34
+ export const ConfigRequirement$OptionalWithDefault = ($0) =>
35
+ new OptionalWithDefault($0);
36
+ export const ConfigRequirement$isOptionalWithDefault = (value) =>
37
+ value instanceof OptionalWithDefault;
38
+ export const ConfigRequirement$OptionalWithDefault$0 = (value) => value[0];
39
+
40
+ export class Skill extends $CustomType {
41
+ constructor(name, description, version, license, homepage, repository, metadata, dependencies, config) {
42
+ super();
43
+ this.name = name;
44
+ this.description = description;
45
+ this.version = version;
46
+ this.license = license;
47
+ this.homepage = homepage;
48
+ this.repository = repository;
49
+ this.metadata = metadata;
50
+ this.dependencies = dependencies;
51
+ this.config = config;
52
+ }
53
+ }
54
+ export const Skill$Skill = (name, description, version, license, homepage, repository, metadata, dependencies, config) =>
55
+ new Skill(name,
56
+ description,
57
+ version,
58
+ license,
59
+ homepage,
60
+ repository,
61
+ metadata,
62
+ dependencies,
63
+ config);
64
+ export const Skill$isSkill = (value) => value instanceof Skill;
65
+ export const Skill$Skill$name = (value) => value.name;
66
+ export const Skill$Skill$0 = (value) => value.name;
67
+ export const Skill$Skill$description = (value) => value.description;
68
+ export const Skill$Skill$1 = (value) => value.description;
69
+ export const Skill$Skill$version = (value) => value.version;
70
+ export const Skill$Skill$2 = (value) => value.version;
71
+ export const Skill$Skill$license = (value) => value.license;
72
+ export const Skill$Skill$3 = (value) => value.license;
73
+ export const Skill$Skill$homepage = (value) => value.homepage;
74
+ export const Skill$Skill$4 = (value) => value.homepage;
75
+ export const Skill$Skill$repository = (value) => value.repository;
76
+ export const Skill$Skill$5 = (value) => value.repository;
77
+ export const Skill$Skill$metadata = (value) => value.metadata;
78
+ export const Skill$Skill$6 = (value) => value.metadata;
79
+ export const Skill$Skill$dependencies = (value) => value.dependencies;
80
+ export const Skill$Skill$7 = (value) => value.dependencies;
81
+ export const Skill$Skill$config = (value) => value.config;
82
+ export const Skill$Skill$8 = (value) => value.config;
83
+
84
+ export class SkillMetadata extends $CustomType {
85
+ constructor(author, author_email, tags) {
86
+ super();
87
+ this.author = author;
88
+ this.author_email = author_email;
89
+ this.tags = tags;
90
+ }
91
+ }
92
+ export const SkillMetadata$SkillMetadata = (author, author_email, tags) =>
93
+ new SkillMetadata(author, author_email, tags);
94
+ export const SkillMetadata$isSkillMetadata = (value) =>
95
+ value instanceof SkillMetadata;
96
+ export const SkillMetadata$SkillMetadata$author = (value) => value.author;
97
+ export const SkillMetadata$SkillMetadata$0 = (value) => value.author;
98
+ export const SkillMetadata$SkillMetadata$author_email = (value) =>
99
+ value.author_email;
100
+ export const SkillMetadata$SkillMetadata$1 = (value) => value.author_email;
101
+ export const SkillMetadata$SkillMetadata$tags = (value) => value.tags;
102
+ export const SkillMetadata$SkillMetadata$2 = (value) => value.tags;
103
+
104
+ export class Dependency extends $CustomType {
105
+ constructor(name, version, optional) {
106
+ super();
107
+ this.name = name;
108
+ this.version = version;
109
+ this.optional = optional;
110
+ }
111
+ }
112
+ export const Dependency$Dependency = (name, version, optional) =>
113
+ new Dependency(name, version, optional);
114
+ export const Dependency$isDependency = (value) => value instanceof Dependency;
115
+ export const Dependency$Dependency$name = (value) => value.name;
116
+ export const Dependency$Dependency$0 = (value) => value.name;
117
+ export const Dependency$Dependency$version = (value) => value.version;
118
+ export const Dependency$Dependency$1 = (value) => value.version;
119
+ export const Dependency$Dependency$optional = (value) => value.optional;
120
+ export const Dependency$Dependency$2 = (value) => value.optional;
121
+
122
+ export class ConfigField extends $CustomType {
123
+ constructor(name, description, requirement, secret) {
124
+ super();
125
+ this.name = name;
126
+ this.description = description;
127
+ this.requirement = requirement;
128
+ this.secret = secret;
129
+ }
130
+ }
131
+ export const ConfigField$ConfigField = (name, description, requirement, secret) =>
132
+ new ConfigField(name, description, requirement, secret);
133
+ export const ConfigField$isConfigField = (value) =>
134
+ value instanceof ConfigField;
135
+ export const ConfigField$ConfigField$name = (value) => value.name;
136
+ export const ConfigField$ConfigField$0 = (value) => value.name;
137
+ export const ConfigField$ConfigField$description = (value) => value.description;
138
+ export const ConfigField$ConfigField$1 = (value) => value.description;
139
+ export const ConfigField$ConfigField$requirement = (value) => value.requirement;
140
+ export const ConfigField$ConfigField$2 = (value) => value.requirement;
141
+ export const ConfigField$ConfigField$secret = (value) => value.secret;
142
+ export const ConfigField$ConfigField$3 = (value) => value.secret;
143
+
144
+ export class FrontmatterInInstructions extends $CustomType {
145
+ constructor(file) {
146
+ super();
147
+ this.file = file;
148
+ }
149
+ }
150
+ export const CompileWarning$FrontmatterInInstructions = (file) =>
151
+ new FrontmatterInInstructions(file);
152
+ export const CompileWarning$isFrontmatterInInstructions = (value) =>
153
+ value instanceof FrontmatterInInstructions;
154
+ export const CompileWarning$FrontmatterInInstructions$file = (value) =>
155
+ value.file;
156
+ export const CompileWarning$FrontmatterInInstructions$0 = (value) => value.file;
157
+
158
+ export class MissingDependency extends $CustomType {
159
+ constructor(dependency) {
160
+ super();
161
+ this.dependency = dependency;
162
+ }
163
+ }
164
+ export const CompileWarning$MissingDependency = (dependency) =>
165
+ new MissingDependency(dependency);
166
+ export const CompileWarning$isMissingDependency = (value) =>
167
+ value instanceof MissingDependency;
168
+ export const CompileWarning$MissingDependency$dependency = (value) =>
169
+ value.dependency;
170
+ export const CompileWarning$MissingDependency$0 = (value) => value.dependency;
171
+
172
+ export class CompiledSkill extends $CustomType {
173
+ constructor(name, provider, skill_md, scripts, assets, warnings, codex_yaml) {
174
+ super();
175
+ this.name = name;
176
+ this.provider = provider;
177
+ this.skill_md = skill_md;
178
+ this.scripts = scripts;
179
+ this.assets = assets;
180
+ this.warnings = warnings;
181
+ this.codex_yaml = codex_yaml;
182
+ }
183
+ }
184
+ export const CompiledSkill$CompiledSkill = (name, provider, skill_md, scripts, assets, warnings, codex_yaml) =>
185
+ new CompiledSkill(name,
186
+ provider,
187
+ skill_md,
188
+ scripts,
189
+ assets,
190
+ warnings,
191
+ codex_yaml);
192
+ export const CompiledSkill$isCompiledSkill = (value) =>
193
+ value instanceof CompiledSkill;
194
+ export const CompiledSkill$CompiledSkill$name = (value) => value.name;
195
+ export const CompiledSkill$CompiledSkill$0 = (value) => value.name;
196
+ export const CompiledSkill$CompiledSkill$provider = (value) => value.provider;
197
+ export const CompiledSkill$CompiledSkill$1 = (value) => value.provider;
198
+ export const CompiledSkill$CompiledSkill$skill_md = (value) => value.skill_md;
199
+ export const CompiledSkill$CompiledSkill$2 = (value) => value.skill_md;
200
+ export const CompiledSkill$CompiledSkill$scripts = (value) => value.scripts;
201
+ export const CompiledSkill$CompiledSkill$3 = (value) => value.scripts;
202
+ export const CompiledSkill$CompiledSkill$assets = (value) => value.assets;
203
+ export const CompiledSkill$CompiledSkill$4 = (value) => value.assets;
204
+ export const CompiledSkill$CompiledSkill$warnings = (value) => value.warnings;
205
+ export const CompiledSkill$CompiledSkill$5 = (value) => value.warnings;
206
+ export const CompiledSkill$CompiledSkill$codex_yaml = (value) =>
207
+ value.codex_yaml;
208
+ export const CompiledSkill$CompiledSkill$6 = (value) => value.codex_yaml;
209
+
210
+ export class FileCopy extends $CustomType {
211
+ constructor(src, relative_path) {
212
+ super();
213
+ this.src = src;
214
+ this.relative_path = relative_path;
215
+ }
216
+ }
217
+ export const FileCopy$FileCopy = (src, relative_path) =>
218
+ new FileCopy(src, relative_path);
219
+ export const FileCopy$isFileCopy = (value) => value instanceof FileCopy;
220
+ export const FileCopy$FileCopy$src = (value) => value.src;
221
+ export const FileCopy$FileCopy$0 = (value) => value.src;
222
+ export const FileCopy$FileCopy$relative_path = (value) => value.relative_path;
223
+ export const FileCopy$FileCopy$1 = (value) => value.relative_path;
224
+
225
+ export function provider_from_string(s) {
226
+ if (s === "openclaw") {
227
+ return new Ok(new OpenClaw());
228
+ } else if (s === "claude-code") {
229
+ return new Ok(new ClaudeCode());
230
+ } else if (s === "codex") {
231
+ return new Ok(new Codex());
232
+ } else {
233
+ return new Error(undefined);
234
+ }
235
+ }
236
+
237
+ export function all_provider_names() {
238
+ return "openclaw, claude-code, codex";
239
+ }
240
+
241
+ export function provider_to_string(provider) {
242
+ if (provider instanceof OpenClaw) {
243
+ return "openclaw";
244
+ } else if (provider instanceof ClaudeCode) {
245
+ return "claude-code";
246
+ } else {
247
+ return "codex";
248
+ }
249
+ }
@@ -0,0 +1,290 @@
1
+ import * as $order from "../../gleam_stdlib/gleam/order.mjs";
2
+ import * as $result from "../../gleam_stdlib/gleam/result.mjs";
3
+ import * as $string from "../../gleam_stdlib/gleam/string.mjs";
4
+ import { Ok, Error, CustomType as $CustomType } from "../gleam.mjs";
5
+ import * as $error from "../skillc/error.mjs";
6
+ import { ValidationError } from "../skillc/error.mjs";
7
+ import * as $semver from "../skillc/semver.mjs";
8
+
9
+ class Caret extends $CustomType {
10
+ constructor($0) {
11
+ super();
12
+ this[0] = $0;
13
+ }
14
+ }
15
+
16
+ class Tilde extends $CustomType {
17
+ constructor($0) {
18
+ super();
19
+ this[0] = $0;
20
+ }
21
+ }
22
+
23
+ class Gte extends $CustomType {
24
+ constructor($0) {
25
+ super();
26
+ this[0] = $0;
27
+ }
28
+ }
29
+
30
+ class Lte extends $CustomType {
31
+ constructor($0) {
32
+ super();
33
+ this[0] = $0;
34
+ }
35
+ }
36
+
37
+ class Gt extends $CustomType {
38
+ constructor($0) {
39
+ super();
40
+ this[0] = $0;
41
+ }
42
+ }
43
+
44
+ class Lt extends $CustomType {
45
+ constructor($0) {
46
+ super();
47
+ this[0] = $0;
48
+ }
49
+ }
50
+
51
+ class Exact extends $CustomType {
52
+ constructor($0) {
53
+ super();
54
+ this[0] = $0;
55
+ }
56
+ }
57
+
58
+ class Wildcard extends $CustomType {}
59
+
60
+ class VersionConstraint extends $CustomType {
61
+ constructor(op) {
62
+ super();
63
+ this.op = op;
64
+ }
65
+ }
66
+
67
+ /**
68
+ * The wildcard constraint, matching any version.
69
+ */
70
+ export function wildcard() {
71
+ return new VersionConstraint(new Wildcard());
72
+ }
73
+
74
+ /**
75
+ * Convert back to the underlying string representation.
76
+ */
77
+ export function to_string(vc) {
78
+ let $ = vc.op;
79
+ if ($ instanceof Caret) {
80
+ let v = $[0];
81
+ return "^" + $semver.to_string(v);
82
+ } else if ($ instanceof Tilde) {
83
+ let v = $[0];
84
+ return "~" + $semver.to_string(v);
85
+ } else if ($ instanceof Gte) {
86
+ let v = $[0];
87
+ return ">=" + $semver.to_string(v);
88
+ } else if ($ instanceof Lte) {
89
+ let v = $[0];
90
+ return "<=" + $semver.to_string(v);
91
+ } else if ($ instanceof Gt) {
92
+ let v = $[0];
93
+ return ">" + $semver.to_string(v);
94
+ } else if ($ instanceof Lt) {
95
+ let v = $[0];
96
+ return "<" + $semver.to_string(v);
97
+ } else if ($ instanceof Exact) {
98
+ let v = $[0];
99
+ return $semver.to_string(v);
100
+ } else {
101
+ return "*";
102
+ }
103
+ }
104
+
105
+ function satisfies_caret(version, constraint) {
106
+ let $ = $semver.compare(version, constraint);
107
+ if ($ instanceof $order.Lt) {
108
+ return false;
109
+ } else {
110
+ let _block;
111
+ let $1 = $semver.major(constraint);
112
+ if ($1 === 0) {
113
+ let $2 = $semver.minor(constraint);
114
+ if ($2 === 0) {
115
+ _block = $semver.new$(0, 0, $semver.patch(constraint) + 1);
116
+ } else {
117
+ let minor = $2;
118
+ _block = $semver.new$(0, minor + 1, 0);
119
+ }
120
+ } else {
121
+ let major = $1;
122
+ _block = $semver.new$(major + 1, 0, 0);
123
+ }
124
+ let upper = _block;
125
+ if (upper instanceof Ok) {
126
+ let upper_ver = upper[0];
127
+ return $semver.compare(version, upper_ver) instanceof $order.Lt;
128
+ } else {
129
+ return false;
130
+ }
131
+ }
132
+ }
133
+
134
+ function satisfies_tilde(version, constraint) {
135
+ let $ = $semver.compare(version, constraint);
136
+ if ($ instanceof $order.Lt) {
137
+ return false;
138
+ } else {
139
+ let $1 = $semver.new$(
140
+ $semver.major(constraint),
141
+ $semver.minor(constraint) + 1,
142
+ 0,
143
+ );
144
+ if ($1 instanceof Ok) {
145
+ let upper = $1[0];
146
+ return $semver.compare(version, upper) instanceof $order.Lt;
147
+ } else {
148
+ return false;
149
+ }
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Check if a version satisfies a constraint.
155
+ */
156
+ export function satisfies(version, constraint) {
157
+ let $ = constraint.op;
158
+ if ($ instanceof Caret) {
159
+ let v = $[0];
160
+ return satisfies_caret(version, v);
161
+ } else if ($ instanceof Tilde) {
162
+ let v = $[0];
163
+ return satisfies_tilde(version, v);
164
+ } else if ($ instanceof Gte) {
165
+ let v = $[0];
166
+ return !($semver.compare(version, v) instanceof $order.Lt);
167
+ } else if ($ instanceof Lte) {
168
+ let v = $[0];
169
+ return !($semver.compare(version, v) instanceof $order.Gt);
170
+ } else if ($ instanceof Gt) {
171
+ let v = $[0];
172
+ return $semver.compare(version, v) instanceof $order.Gt;
173
+ } else if ($ instanceof Lt) {
174
+ let v = $[0];
175
+ return $semver.compare(version, v) instanceof $order.Lt;
176
+ } else if ($ instanceof Exact) {
177
+ let v = $[0];
178
+ return $semver.compare(version, v) instanceof $order.Eq;
179
+ } else {
180
+ return true;
181
+ }
182
+ }
183
+
184
+ function validate_has_version(rest, original, make_op) {
185
+ let version_part = $string.trim(rest);
186
+ let $ = $string.is_empty(version_part);
187
+ if ($) {
188
+ return new Error(
189
+ new ValidationError(
190
+ "version",
191
+ ("Invalid version constraint: operator without version in '" + original) + "'",
192
+ ),
193
+ );
194
+ } else {
195
+ return $result.try$(
196
+ (() => {
197
+ let _pipe = $semver.parse(version_part);
198
+ return $result.map_error(
199
+ _pipe,
200
+ (_) => {
201
+ return new ValidationError(
202
+ "version",
203
+ ("Invalid version in constraint: '" + original) + "'",
204
+ );
205
+ },
206
+ );
207
+ })(),
208
+ (ver) => { return new Ok(new VersionConstraint(make_op(ver))); },
209
+ );
210
+ }
211
+ }
212
+
213
+ function validate_bare_version(input) {
214
+ let $ = $semver.parse(input);
215
+ if ($ instanceof Ok) {
216
+ let ver = $[0];
217
+ return new Ok(new VersionConstraint(new Exact(ver)));
218
+ } else {
219
+ return new Error(
220
+ new ValidationError(
221
+ "version",
222
+ ("Invalid version constraint: '" + input) + "' (expected valid semver like 1.0.0)",
223
+ ),
224
+ );
225
+ }
226
+ }
227
+
228
+ function validate(input) {
229
+ if (input === "*") {
230
+ return new Ok(new VersionConstraint(new Wildcard()));
231
+ } else if (input.startsWith("^")) {
232
+ let rest = input.slice(1);
233
+ return validate_has_version(
234
+ rest,
235
+ input,
236
+ (var0) => { return new Caret(var0); },
237
+ );
238
+ } else if (input.startsWith("~")) {
239
+ let rest = input.slice(1);
240
+ return validate_has_version(
241
+ rest,
242
+ input,
243
+ (var0) => { return new Tilde(var0); },
244
+ );
245
+ } else if (input.startsWith(">=")) {
246
+ let rest = input.slice(2);
247
+ return validate_has_version(
248
+ rest,
249
+ input,
250
+ (var0) => { return new Gte(var0); },
251
+ );
252
+ } else if (input.startsWith("<=")) {
253
+ let rest = input.slice(2);
254
+ return validate_has_version(
255
+ rest,
256
+ input,
257
+ (var0) => { return new Lte(var0); },
258
+ );
259
+ } else if (input.startsWith(">")) {
260
+ let rest = input.slice(1);
261
+ return validate_has_version(rest, input, (var0) => { return new Gt(var0); });
262
+ } else if (input.startsWith("<")) {
263
+ let rest = input.slice(1);
264
+ return validate_has_version(rest, input, (var0) => { return new Lt(var0); });
265
+ } else if (input.startsWith("=")) {
266
+ let rest = input.slice(1);
267
+ return validate_has_version(
268
+ rest,
269
+ input,
270
+ (var0) => { return new Exact(var0); },
271
+ );
272
+ } else {
273
+ return validate_bare_version(input);
274
+ }
275
+ }
276
+
277
+ /**
278
+ * Parse a version constraint string. Empty/whitespace-only strings are
279
+ * normalized to the wildcard constraint "*". Returns an error if the
280
+ * constraint uses an unrecognized operator.
281
+ */
282
+ export function parse(input) {
283
+ let trimmed = $string.trim(input);
284
+ let $ = $string.is_empty(trimmed);
285
+ if ($) {
286
+ return new Ok(new VersionConstraint(new Wildcard()));
287
+ } else {
288
+ return validate(trimmed);
289
+ }
290
+ }
@@ -0,0 +1,51 @@
1
+ import * as $list from "../../gleam_stdlib/gleam/list.mjs";
2
+ import * as $string from "../../gleam_stdlib/gleam/string.mjs";
3
+ import { toList } from "../gleam.mjs";
4
+
5
+ const special_chars = /* @__PURE__ */ toList([
6
+ ":",
7
+ "#",
8
+ " ",
9
+ "\"",
10
+ "'",
11
+ "[",
12
+ "]",
13
+ "{",
14
+ "}",
15
+ ",",
16
+ "&",
17
+ "*",
18
+ "!",
19
+ "|",
20
+ ">",
21
+ "%",
22
+ "@",
23
+ "\n",
24
+ ]);
25
+
26
+ const reserved_words = /* @__PURE__ */ toList([
27
+ "true",
28
+ "false",
29
+ "yes",
30
+ "no",
31
+ "on",
32
+ "off",
33
+ "null",
34
+ "~",
35
+ "",
36
+ ]);
37
+
38
+ export function quote_string(s) {
39
+ let needs_quoting = $list.any(
40
+ special_chars,
41
+ (c) => { return $string.contains(s, c); },
42
+ ) || $list.contains(reserved_words, s);
43
+ if (needs_quoting) {
44
+ let escaped = $string.replace(s, "\\", "\\\\");
45
+ let escaped$1 = $string.replace(escaped, "\"", "\\\"");
46
+ let escaped$2 = $string.replace(escaped$1, "\n", "\\n");
47
+ return ("\"" + escaped$2) + "\"";
48
+ } else {
49
+ return s;
50
+ }
51
+ }