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.
- package/README.md +24 -0
- package/bin/skillc.mjs +3 -0
- package/build/dev/javascript/argv/_gleam_artefacts/argv.cache +0 -0
- package/build/dev/javascript/argv/_gleam_artefacts/argv.cache_inline +0 -0
- package/build/dev/javascript/argv/_gleam_artefacts/argv.cache_meta +0 -0
- package/build/dev/javascript/argv/argv.erl +12 -0
- package/build/dev/javascript/argv/argv.mjs +31 -0
- package/build/dev/javascript/argv/argv_ffi.erl +27 -0
- package/build/dev/javascript/argv/argv_ffi.mjs +20 -0
- package/build/dev/javascript/argv/gleam.mjs +1 -0
- package/build/dev/javascript/filepath/_gleam_artefacts/filepath.cache +0 -0
- package/build/dev/javascript/filepath/_gleam_artefacts/filepath.cache_inline +0 -0
- package/build/dev/javascript/filepath/_gleam_artefacts/filepath.cache_meta +0 -0
- package/build/dev/javascript/filepath/filepath.erl +425 -0
- package/build/dev/javascript/filepath/filepath.mjs +529 -0
- package/build/dev/javascript/filepath/filepath_ffi.erl +9 -0
- package/build/dev/javascript/filepath/filepath_ffi.mjs +6 -0
- package/build/dev/javascript/filepath/gleam.mjs +1 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_inline +0 -0
- package/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_meta +0 -0
- package/build/dev/javascript/gleam_stdlib/dict.mjs +710 -0
- package/build/dev/javascript/gleam_stdlib/gleam/bit_array.mjs +285 -0
- package/build/dev/javascript/gleam_stdlib/gleam/bool.mjs +313 -0
- package/build/dev/javascript/gleam_stdlib/gleam/bytes_tree.mjs +225 -0
- package/build/dev/javascript/gleam_stdlib/gleam/dict.mjs +456 -0
- package/build/dev/javascript/gleam_stdlib/gleam/dynamic/decode.mjs +985 -0
- package/build/dev/javascript/gleam_stdlib/gleam/dynamic.mjs +35 -0
- package/build/dev/javascript/gleam_stdlib/gleam/float.mjs +572 -0
- package/build/dev/javascript/gleam_stdlib/gleam/function.mjs +6 -0
- package/build/dev/javascript/gleam_stdlib/gleam/int.mjs +832 -0
- package/build/dev/javascript/gleam_stdlib/gleam/io.mjs +8 -0
- package/build/dev/javascript/gleam_stdlib/gleam/list.mjs +3160 -0
- package/build/dev/javascript/gleam_stdlib/gleam/option.mjs +418 -0
- package/build/dev/javascript/gleam_stdlib/gleam/order.mjs +178 -0
- package/build/dev/javascript/gleam_stdlib/gleam/pair.mjs +102 -0
- package/build/dev/javascript/gleam_stdlib/gleam/result.mjs +480 -0
- package/build/dev/javascript/gleam_stdlib/gleam/set.mjs +416 -0
- package/build/dev/javascript/gleam_stdlib/gleam/string.mjs +723 -0
- package/build/dev/javascript/gleam_stdlib/gleam/string_tree.mjs +133 -0
- package/build/dev/javascript/gleam_stdlib/gleam/uri.mjs +1155 -0
- package/build/dev/javascript/gleam_stdlib/gleam.mjs +1 -0
- package/build/dev/javascript/gleam_stdlib/gleam@bit_array.erl +347 -0
- package/build/dev/javascript/gleam_stdlib/gleam@bool.erl +352 -0
- package/build/dev/javascript/gleam_stdlib/gleam@bytes_tree.erl +211 -0
- package/build/dev/javascript/gleam_stdlib/gleam@dict.erl +521 -0
- package/build/dev/javascript/gleam_stdlib/gleam@dynamic.erl +106 -0
- package/build/dev/javascript/gleam_stdlib/gleam@dynamic@decode.erl +1112 -0
- package/build/dev/javascript/gleam_stdlib/gleam@float.erl +764 -0
- package/build/dev/javascript/gleam_stdlib/gleam@function.erl +18 -0
- package/build/dev/javascript/gleam_stdlib/gleam@int.erl +1004 -0
- package/build/dev/javascript/gleam_stdlib/gleam@io.erl +80 -0
- package/build/dev/javascript/gleam_stdlib/gleam@list.erl +2832 -0
- package/build/dev/javascript/gleam_stdlib/gleam@option.erl +413 -0
- package/build/dev/javascript/gleam_stdlib/gleam@order.erl +200 -0
- package/build/dev/javascript/gleam_stdlib/gleam@pair.erl +110 -0
- package/build/dev/javascript/gleam_stdlib/gleam@result.erl +532 -0
- package/build/dev/javascript/gleam_stdlib/gleam@set.erl +433 -0
- package/build/dev/javascript/gleam_stdlib/gleam@string.erl +1012 -0
- package/build/dev/javascript/gleam_stdlib/gleam@string_tree.erl +207 -0
- package/build/dev/javascript/gleam_stdlib/gleam@uri.erl +1049 -0
- package/build/dev/javascript/gleam_stdlib/gleam_stdlib.erl +529 -0
- package/build/dev/javascript/gleam_stdlib/gleam_stdlib.mjs +1050 -0
- package/build/dev/javascript/gleam_version +1 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit.cache +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit.cache_inline +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit.cache_meta +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@gleam_panic.cache +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@gleam_panic.cache_inline +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@gleam_panic.cache_meta +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@reporting.cache +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@reporting.cache_inline +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@internal@reporting.cache_meta +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@should.cache +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@should.cache_inline +0 -0
- package/build/dev/javascript/gleeunit/_gleam_artefacts/gleeunit@should.cache_meta +0 -0
- package/build/dev/javascript/gleeunit/gleam.mjs +1 -0
- package/build/dev/javascript/gleeunit/gleeunit/internal/gleam_panic.mjs +180 -0
- package/build/dev/javascript/gleeunit/gleeunit/internal/gleeunit_gleam_panic_ffi.erl +49 -0
- package/build/dev/javascript/gleeunit/gleeunit/internal/gleeunit_gleam_panic_ffi.mjs +91 -0
- package/build/dev/javascript/gleeunit/gleeunit/internal/reporting.mjs +256 -0
- package/build/dev/javascript/gleeunit/gleeunit/should.mjs +135 -0
- package/build/dev/javascript/gleeunit/gleeunit.erl +89 -0
- package/build/dev/javascript/gleeunit/gleeunit.mjs +62 -0
- package/build/dev/javascript/gleeunit/gleeunit@internal@gleam_panic.erl +56 -0
- package/build/dev/javascript/gleeunit/gleeunit@internal@reporting.erl +343 -0
- package/build/dev/javascript/gleeunit/gleeunit@should.erl +153 -0
- package/build/dev/javascript/gleeunit/gleeunit_ffi.erl +21 -0
- package/build/dev/javascript/gleeunit/gleeunit_ffi.mjs +100 -0
- package/build/dev/javascript/gleeunit/gleeunit_progress.erl +72 -0
- package/build/dev/javascript/prelude.mjs +1575 -0
- package/build/dev/javascript/simplifile/_gleam_artefacts/simplifile.cache +0 -0
- package/build/dev/javascript/simplifile/_gleam_artefacts/simplifile.cache_inline +0 -0
- package/build/dev/javascript/simplifile/_gleam_artefacts/simplifile.cache_meta +0 -0
- package/build/dev/javascript/simplifile/gleam.mjs +1 -0
- package/build/dev/javascript/simplifile/simplifile.erl +893 -0
- package/build/dev/javascript/simplifile/simplifile.mjs +893 -0
- package/build/dev/javascript/simplifile/simplifile_erl.erl +244 -0
- package/build/dev/javascript/simplifile/simplifile_js.mjs +400 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/cli_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/compiler_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/config_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/importer_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/parser_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/path_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/provider_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/registry_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/scaffold_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@compiler.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@config.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@error.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@fs.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@importer.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@parser.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@path.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@platform.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@provider.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@registry.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@scaffold.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@semver.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@shell.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@template.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@types.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@version_constraint.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc@yaml.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/skillc_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/template_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache_inline +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache_meta +0 -0
- package/build/dev/javascript/skillc/_gleam_artefacts/version_constraint_test.cache_warnings +0 -0
- package/build/dev/javascript/skillc/cli_test.mjs +461 -0
- package/build/dev/javascript/skillc/compiler_test.mjs +3089 -0
- package/build/dev/javascript/skillc/config_test.mjs +308 -0
- package/build/dev/javascript/skillc/gleam.main.mjs +2 -0
- package/build/dev/javascript/skillc/gleam.mjs +1 -0
- package/build/dev/javascript/skillc/importer_test.mjs +1643 -0
- package/build/dev/javascript/skillc/parser_test.mjs +1601 -0
- package/build/dev/javascript/skillc/path_test.mjs +26 -0
- package/build/dev/javascript/skillc/provider_test.mjs +221 -0
- package/build/dev/javascript/skillc/registry_test.mjs +359 -0
- package/build/dev/javascript/skillc/scaffold_test.mjs +405 -0
- package/build/dev/javascript/skillc/skillc/compiler.mjs +724 -0
- package/build/dev/javascript/skillc/skillc/config.mjs +172 -0
- package/build/dev/javascript/skillc/skillc/error.mjs +145 -0
- package/build/dev/javascript/skillc/skillc/fs.mjs +40 -0
- package/build/dev/javascript/skillc/skillc/importer.mjs +975 -0
- package/build/dev/javascript/skillc/skillc/parser.mjs +427 -0
- package/build/dev/javascript/skillc/skillc/path.mjs +52 -0
- package/build/dev/javascript/skillc/skillc/platform.mjs +44 -0
- package/build/dev/javascript/skillc/skillc/provider.mjs +86 -0
- package/build/dev/javascript/skillc/skillc/registry.mjs +701 -0
- package/build/dev/javascript/skillc/skillc/scaffold.mjs +117 -0
- package/build/dev/javascript/skillc/skillc/semver.mjs +293 -0
- package/build/dev/javascript/skillc/skillc/shell.mjs +14 -0
- package/build/dev/javascript/skillc/skillc/template.mjs +1177 -0
- package/build/dev/javascript/skillc/skillc/types.mjs +249 -0
- package/build/dev/javascript/skillc/skillc/version_constraint.mjs +290 -0
- package/build/dev/javascript/skillc/skillc/yaml.mjs +51 -0
- package/build/dev/javascript/skillc/skillc.mjs +873 -0
- package/build/dev/javascript/skillc/skillc_ffi.mjs +30 -0
- package/build/dev/javascript/skillc/skillc_test.mjs +5 -0
- package/build/dev/javascript/skillc/template_test.mjs +1638 -0
- package/build/dev/javascript/skillc/version_constraint_test.mjs +1325 -0
- package/build/dev/javascript/yay/_gleam_artefacts/yay.cache +0 -0
- package/build/dev/javascript/yay/_gleam_artefacts/yay.cache_inline +0 -0
- package/build/dev/javascript/yay/_gleam_artefacts/yay.cache_meta +0 -0
- package/build/dev/javascript/yay/gleam.mjs +1 -0
- package/build/dev/javascript/yay/yaml_ffi.erl +106 -0
- package/build/dev/javascript/yay/yaml_ffi.mjs +373 -0
- package/build/dev/javascript/yay/yay.erl +1218 -0
- package/build/dev/javascript/yay/yay.mjs +1403 -0
- package/package.json +28 -0
- package/src/skillc/compiler.gleam +561 -0
- package/src/skillc/config.gleam +91 -0
- package/src/skillc/error.gleam +37 -0
- package/src/skillc/fs.gleam +31 -0
- package/src/skillc/importer.gleam +709 -0
- package/src/skillc/parser.gleam +279 -0
- package/src/skillc/path.gleam +30 -0
- package/src/skillc/platform.gleam +25 -0
- package/src/skillc/provider.gleam +58 -0
- package/src/skillc/registry.gleam +472 -0
- package/src/skillc/scaffold.gleam +112 -0
- package/src/skillc/semver.gleam +165 -0
- package/src/skillc/shell.gleam +12 -0
- package/src/skillc/template.gleam +885 -0
- package/src/skillc/types.gleam +93 -0
- package/src/skillc/version_constraint.gleam +163 -0
- package/src/skillc/yaml.gleam +27 -0
- package/src/skillc.gleam +466 -0
- package/src/skillc_ffi.mjs +30 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as $option from "../../gleam_stdlib/gleam/option.mjs";
|
|
2
|
+
import { None, Some } from "../../gleam_stdlib/gleam/option.mjs";
|
|
3
|
+
import * as $string from "../../gleam_stdlib/gleam/string.mjs";
|
|
4
|
+
import { Ok, Error, toList, makeError, isEqual } from "../gleam.mjs";
|
|
5
|
+
|
|
6
|
+
const FILEPATH = "src/gleeunit/should.gleam";
|
|
7
|
+
|
|
8
|
+
export function equal(a, b) {
|
|
9
|
+
let $ = isEqual(a, b);
|
|
10
|
+
if ($) {
|
|
11
|
+
return undefined;
|
|
12
|
+
} else {
|
|
13
|
+
throw makeError(
|
|
14
|
+
"panic",
|
|
15
|
+
FILEPATH,
|
|
16
|
+
"gleeunit/should",
|
|
17
|
+
10,
|
|
18
|
+
"equal",
|
|
19
|
+
$string.concat(
|
|
20
|
+
toList([
|
|
21
|
+
"\n",
|
|
22
|
+
$string.inspect(a),
|
|
23
|
+
"\nshould equal\n",
|
|
24
|
+
$string.inspect(b),
|
|
25
|
+
]),
|
|
26
|
+
),
|
|
27
|
+
{}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function not_equal(a, b) {
|
|
33
|
+
let $ = !isEqual(a, b);
|
|
34
|
+
if ($) {
|
|
35
|
+
return undefined;
|
|
36
|
+
} else {
|
|
37
|
+
throw makeError(
|
|
38
|
+
"panic",
|
|
39
|
+
FILEPATH,
|
|
40
|
+
"gleeunit/should",
|
|
41
|
+
23,
|
|
42
|
+
"not_equal",
|
|
43
|
+
$string.concat(
|
|
44
|
+
toList([
|
|
45
|
+
"\n",
|
|
46
|
+
$string.inspect(a),
|
|
47
|
+
"\nshould not equal\n",
|
|
48
|
+
$string.inspect(b),
|
|
49
|
+
]),
|
|
50
|
+
),
|
|
51
|
+
{}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function be_ok(a) {
|
|
57
|
+
if (a instanceof Ok) {
|
|
58
|
+
let value = a[0];
|
|
59
|
+
return value;
|
|
60
|
+
} else {
|
|
61
|
+
throw makeError(
|
|
62
|
+
"panic",
|
|
63
|
+
FILEPATH,
|
|
64
|
+
"gleeunit/should",
|
|
65
|
+
35,
|
|
66
|
+
"be_ok",
|
|
67
|
+
$string.concat(toList(["\n", $string.inspect(a), "\nshould be ok"])),
|
|
68
|
+
{}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function be_error(a) {
|
|
74
|
+
if (a instanceof Error) {
|
|
75
|
+
let error = a[0];
|
|
76
|
+
return error;
|
|
77
|
+
} else {
|
|
78
|
+
throw makeError(
|
|
79
|
+
"panic",
|
|
80
|
+
FILEPATH,
|
|
81
|
+
"gleeunit/should",
|
|
82
|
+
42,
|
|
83
|
+
"be_error",
|
|
84
|
+
$string.concat(toList(["\n", $string.inspect(a), "\nshould be error"])),
|
|
85
|
+
{}
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function be_some(a) {
|
|
91
|
+
if (a instanceof Some) {
|
|
92
|
+
let value = a[0];
|
|
93
|
+
return value;
|
|
94
|
+
} else {
|
|
95
|
+
throw makeError(
|
|
96
|
+
"panic",
|
|
97
|
+
FILEPATH,
|
|
98
|
+
"gleeunit/should",
|
|
99
|
+
49,
|
|
100
|
+
"be_some",
|
|
101
|
+
$string.concat(toList(["\n", $string.inspect(a), "\nshould be some"])),
|
|
102
|
+
{}
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function be_none(a) {
|
|
108
|
+
if (a instanceof None) {
|
|
109
|
+
return undefined;
|
|
110
|
+
} else {
|
|
111
|
+
throw makeError(
|
|
112
|
+
"panic",
|
|
113
|
+
FILEPATH,
|
|
114
|
+
"gleeunit/should",
|
|
115
|
+
56,
|
|
116
|
+
"be_none",
|
|
117
|
+
$string.concat(toList(["\n", $string.inspect(a), "\nshould be none"])),
|
|
118
|
+
{}
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function be_true(actual) {
|
|
124
|
+
let _pipe = actual;
|
|
125
|
+
return equal(_pipe, true);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function be_false(actual) {
|
|
129
|
+
let _pipe = actual;
|
|
130
|
+
return equal(_pipe, false);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function fail() {
|
|
134
|
+
return be_true(false);
|
|
135
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
-module(gleeunit).
|
|
2
|
+
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
|
|
3
|
+
-define(FILEPATH, "src/gleeunit.gleam").
|
|
4
|
+
-export([main/0]).
|
|
5
|
+
-export_type([atom_/0, encoding/0, report_module_name/0, gleeunit_progress_option/0, eunit_option/0]).
|
|
6
|
+
|
|
7
|
+
-if(?OTP_RELEASE >= 27).
|
|
8
|
+
-define(MODULEDOC(Str), -moduledoc(Str)).
|
|
9
|
+
-define(DOC(Str), -doc(Str)).
|
|
10
|
+
-else.
|
|
11
|
+
-define(MODULEDOC(Str), -compile([])).
|
|
12
|
+
-define(DOC(Str), -compile([])).
|
|
13
|
+
-endif.
|
|
14
|
+
|
|
15
|
+
-type atom_() :: any().
|
|
16
|
+
|
|
17
|
+
-type encoding() :: utf8.
|
|
18
|
+
|
|
19
|
+
-type report_module_name() :: gleeunit_progress.
|
|
20
|
+
|
|
21
|
+
-type gleeunit_progress_option() :: {colored, boolean()}.
|
|
22
|
+
|
|
23
|
+
-type eunit_option() :: verbose |
|
|
24
|
+
no_tty |
|
|
25
|
+
{report, {report_module_name(), list(gleeunit_progress_option())}} |
|
|
26
|
+
{scale_timeouts, integer()}.
|
|
27
|
+
|
|
28
|
+
-file("src/gleeunit.gleam", 42).
|
|
29
|
+
-spec gleam_to_erlang_module_name(binary()) -> binary().
|
|
30
|
+
gleam_to_erlang_module_name(Path) ->
|
|
31
|
+
case gleam_stdlib:string_ends_with(Path, <<".gleam"/utf8>>) of
|
|
32
|
+
true ->
|
|
33
|
+
_pipe = Path,
|
|
34
|
+
_pipe@1 = gleam@string:replace(
|
|
35
|
+
_pipe,
|
|
36
|
+
<<".gleam"/utf8>>,
|
|
37
|
+
<<""/utf8>>
|
|
38
|
+
),
|
|
39
|
+
gleam@string:replace(_pipe@1, <<"/"/utf8>>, <<"@"/utf8>>);
|
|
40
|
+
|
|
41
|
+
false ->
|
|
42
|
+
_pipe@2 = Path,
|
|
43
|
+
_pipe@3 = gleam@string:split(_pipe@2, <<"/"/utf8>>),
|
|
44
|
+
_pipe@4 = gleam@list:last(_pipe@3),
|
|
45
|
+
_pipe@5 = gleam@result:unwrap(_pipe@4, Path),
|
|
46
|
+
gleam@string:replace(_pipe@5, <<".erl"/utf8>>, <<""/utf8>>)
|
|
47
|
+
end.
|
|
48
|
+
|
|
49
|
+
-file("src/gleeunit.gleam", 18).
|
|
50
|
+
-spec do_main() -> nil.
|
|
51
|
+
do_main() ->
|
|
52
|
+
Options = [verbose,
|
|
53
|
+
no_tty,
|
|
54
|
+
{report, {gleeunit_progress, [{colored, true}]}},
|
|
55
|
+
{scale_timeouts, 10}],
|
|
56
|
+
Result = begin
|
|
57
|
+
_pipe = gleeunit_ffi:find_files(
|
|
58
|
+
<<"**/*.{erl,gleam}"/utf8>>,
|
|
59
|
+
<<"test"/utf8>>
|
|
60
|
+
),
|
|
61
|
+
_pipe@1 = gleam@list:map(_pipe, fun gleam_to_erlang_module_name/1),
|
|
62
|
+
_pipe@2 = gleam@list:map(
|
|
63
|
+
_pipe@1,
|
|
64
|
+
fun(_capture) -> erlang:binary_to_atom(_capture, utf8) end
|
|
65
|
+
),
|
|
66
|
+
gleeunit_ffi:run_eunit(_pipe@2, Options)
|
|
67
|
+
end,
|
|
68
|
+
Code = case Result of
|
|
69
|
+
{ok, _} ->
|
|
70
|
+
0;
|
|
71
|
+
|
|
72
|
+
{error, _} ->
|
|
73
|
+
1
|
|
74
|
+
end,
|
|
75
|
+
erlang:halt(Code).
|
|
76
|
+
|
|
77
|
+
-file("src/gleeunit.gleam", 13).
|
|
78
|
+
?DOC(
|
|
79
|
+
" Find and run all test functions for the current project using Erlang's EUnit\n"
|
|
80
|
+
" test framework, or a custom JavaScript test runner.\n"
|
|
81
|
+
"\n"
|
|
82
|
+
" Any Erlang or Gleam function in the `test` directory with a name ending in\n"
|
|
83
|
+
" `_test` is considered a test function and will be run.\n"
|
|
84
|
+
"\n"
|
|
85
|
+
" A test that panics is considered a failure.\n"
|
|
86
|
+
).
|
|
87
|
+
-spec main() -> nil.
|
|
88
|
+
main() ->
|
|
89
|
+
do_main().
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as $list from "../gleam_stdlib/gleam/list.mjs";
|
|
2
|
+
import * as $result from "../gleam_stdlib/gleam/result.mjs";
|
|
3
|
+
import * as $string from "../gleam_stdlib/gleam/string.mjs";
|
|
4
|
+
import { CustomType as $CustomType } from "./gleam.mjs";
|
|
5
|
+
import { main as do_main } from "./gleeunit_ffi.mjs";
|
|
6
|
+
|
|
7
|
+
class Utf8 extends $CustomType {}
|
|
8
|
+
|
|
9
|
+
class GleeunitProgress extends $CustomType {}
|
|
10
|
+
|
|
11
|
+
class Colored extends $CustomType {
|
|
12
|
+
constructor($0) {
|
|
13
|
+
super();
|
|
14
|
+
this[0] = $0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class Verbose extends $CustomType {}
|
|
19
|
+
|
|
20
|
+
class NoTty extends $CustomType {}
|
|
21
|
+
|
|
22
|
+
class Report extends $CustomType {
|
|
23
|
+
constructor($0) {
|
|
24
|
+
super();
|
|
25
|
+
this[0] = $0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
class ScaleTimeouts extends $CustomType {
|
|
30
|
+
constructor($0) {
|
|
31
|
+
super();
|
|
32
|
+
this[0] = $0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function gleam_to_erlang_module_name(path) {
|
|
37
|
+
let $ = $string.ends_with(path, ".gleam");
|
|
38
|
+
if ($) {
|
|
39
|
+
let _pipe = path;
|
|
40
|
+
let _pipe$1 = $string.replace(_pipe, ".gleam", "");
|
|
41
|
+
return $string.replace(_pipe$1, "/", "@");
|
|
42
|
+
} else {
|
|
43
|
+
let _pipe = path;
|
|
44
|
+
let _pipe$1 = $string.split(_pipe, "/");
|
|
45
|
+
let _pipe$2 = $list.last(_pipe$1);
|
|
46
|
+
let _pipe$3 = $result.unwrap(_pipe$2, path);
|
|
47
|
+
return $string.replace(_pipe$3, ".erl", "");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Find and run all test functions for the current project using Erlang's EUnit
|
|
53
|
+
* test framework, or a custom JavaScript test runner.
|
|
54
|
+
*
|
|
55
|
+
* Any Erlang or Gleam function in the `test` directory with a name ending in
|
|
56
|
+
* `_test` is considered a test function and will be run.
|
|
57
|
+
*
|
|
58
|
+
* A test that panics is considered a failure.
|
|
59
|
+
*/
|
|
60
|
+
export function main() {
|
|
61
|
+
return do_main();
|
|
62
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
-module(gleeunit@internal@gleam_panic).
|
|
2
|
+
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
|
|
3
|
+
-define(FILEPATH, "src/gleeunit/internal/gleam_panic.gleam").
|
|
4
|
+
-export([from_dynamic/1]).
|
|
5
|
+
-export_type([gleam_panic/0, panic_kind/0, assert_kind/0, asserted_expression/0, expression_kind/0]).
|
|
6
|
+
|
|
7
|
+
-if(?OTP_RELEASE >= 27).
|
|
8
|
+
-define(MODULEDOC(Str), -moduledoc(Str)).
|
|
9
|
+
-define(DOC(Str), -doc(Str)).
|
|
10
|
+
-else.
|
|
11
|
+
-define(MODULEDOC(Str), -compile([])).
|
|
12
|
+
-define(DOC(Str), -compile([])).
|
|
13
|
+
-endif.
|
|
14
|
+
|
|
15
|
+
?MODULEDOC(false).
|
|
16
|
+
|
|
17
|
+
-type gleam_panic() :: {gleam_panic,
|
|
18
|
+
binary(),
|
|
19
|
+
binary(),
|
|
20
|
+
binary(),
|
|
21
|
+
binary(),
|
|
22
|
+
integer(),
|
|
23
|
+
panic_kind()}.
|
|
24
|
+
|
|
25
|
+
-type panic_kind() :: todo |
|
|
26
|
+
panic |
|
|
27
|
+
{let_assert,
|
|
28
|
+
integer(),
|
|
29
|
+
integer(),
|
|
30
|
+
integer(),
|
|
31
|
+
integer(),
|
|
32
|
+
gleam@dynamic:dynamic_()} |
|
|
33
|
+
{assert, integer(), integer(), integer(), assert_kind()}.
|
|
34
|
+
|
|
35
|
+
-type assert_kind() :: {binary_operator,
|
|
36
|
+
binary(),
|
|
37
|
+
asserted_expression(),
|
|
38
|
+
asserted_expression()} |
|
|
39
|
+
{function_call, list(asserted_expression())} |
|
|
40
|
+
{other_expression, asserted_expression()}.
|
|
41
|
+
|
|
42
|
+
-type asserted_expression() :: {asserted_expression,
|
|
43
|
+
integer(),
|
|
44
|
+
integer(),
|
|
45
|
+
expression_kind()}.
|
|
46
|
+
|
|
47
|
+
-type expression_kind() :: {literal, gleam@dynamic:dynamic_()} |
|
|
48
|
+
{expression, gleam@dynamic:dynamic_()} |
|
|
49
|
+
unevaluated.
|
|
50
|
+
|
|
51
|
+
-file("src/gleeunit/internal/gleam_panic.gleam", 49).
|
|
52
|
+
?DOC(false).
|
|
53
|
+
-spec from_dynamic(gleam@dynamic:dynamic_()) -> {ok, gleam_panic()} |
|
|
54
|
+
{error, nil}.
|
|
55
|
+
from_dynamic(Data) ->
|
|
56
|
+
gleeunit_gleam_panic_ffi:from_dynamic(Data).
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
-module(gleeunit@internal@reporting).
|
|
2
|
+
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
|
|
3
|
+
-define(FILEPATH, "src/gleeunit/internal/reporting.gleam").
|
|
4
|
+
-export([new_state/0, test_skipped/3, test_passed/1, finished/1, eunit_missing/0, test_failed/4]).
|
|
5
|
+
-export_type([state/0]).
|
|
6
|
+
|
|
7
|
+
-if(?OTP_RELEASE >= 27).
|
|
8
|
+
-define(MODULEDOC(Str), -moduledoc(Str)).
|
|
9
|
+
-define(DOC(Str), -doc(Str)).
|
|
10
|
+
-else.
|
|
11
|
+
-define(MODULEDOC(Str), -compile([])).
|
|
12
|
+
-define(DOC(Str), -compile([])).
|
|
13
|
+
-endif.
|
|
14
|
+
|
|
15
|
+
?MODULEDOC(false).
|
|
16
|
+
|
|
17
|
+
-type state() :: {state, integer(), integer(), integer()}.
|
|
18
|
+
|
|
19
|
+
-file("src/gleeunit/internal/reporting.gleam", 15).
|
|
20
|
+
?DOC(false).
|
|
21
|
+
-spec new_state() -> state().
|
|
22
|
+
new_state() ->
|
|
23
|
+
{state, 0, 0, 0}.
|
|
24
|
+
|
|
25
|
+
-file("src/gleeunit/internal/reporting.gleam", 207).
|
|
26
|
+
?DOC(false).
|
|
27
|
+
-spec bold(binary()) -> binary().
|
|
28
|
+
bold(Text) ->
|
|
29
|
+
<<<<"\x{001b}[1m"/utf8, Text/binary>>/binary, "\x{001b}[22m"/utf8>>.
|
|
30
|
+
|
|
31
|
+
-file("src/gleeunit/internal/reporting.gleam", 211).
|
|
32
|
+
?DOC(false).
|
|
33
|
+
-spec cyan(binary()) -> binary().
|
|
34
|
+
cyan(Text) ->
|
|
35
|
+
<<<<"\x{001b}[36m"/utf8, Text/binary>>/binary, "\x{001b}[39m"/utf8>>.
|
|
36
|
+
|
|
37
|
+
-file("src/gleeunit/internal/reporting.gleam", 191).
|
|
38
|
+
?DOC(false).
|
|
39
|
+
-spec code_snippet(gleam@option:option(bitstring()), integer(), integer()) -> binary().
|
|
40
|
+
code_snippet(Src, Start, End) ->
|
|
41
|
+
_pipe = begin
|
|
42
|
+
gleam@result:'try'(
|
|
43
|
+
gleam@option:to_result(Src, nil),
|
|
44
|
+
fun(Src@1) ->
|
|
45
|
+
gleam@result:'try'(
|
|
46
|
+
gleam_stdlib:bit_array_slice(Src@1, Start, End - Start),
|
|
47
|
+
fun(Snippet) ->
|
|
48
|
+
gleam@result:'try'(
|
|
49
|
+
gleam@bit_array:to_string(Snippet),
|
|
50
|
+
fun(Snippet@1) ->
|
|
51
|
+
Snippet@2 = <<<<<<(cyan(<<" code"/utf8>>))/binary,
|
|
52
|
+
": "/utf8>>/binary,
|
|
53
|
+
Snippet@1/binary>>/binary,
|
|
54
|
+
"\n"/utf8>>,
|
|
55
|
+
{ok, Snippet@2}
|
|
56
|
+
end
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
)
|
|
62
|
+
end,
|
|
63
|
+
gleam@result:unwrap(_pipe, <<""/utf8>>).
|
|
64
|
+
|
|
65
|
+
-file("src/gleeunit/internal/reporting.gleam", 215).
|
|
66
|
+
?DOC(false).
|
|
67
|
+
-spec yellow(binary()) -> binary().
|
|
68
|
+
yellow(Text) ->
|
|
69
|
+
<<<<"\x{001b}[33m"/utf8, Text/binary>>/binary, "\x{001b}[39m"/utf8>>.
|
|
70
|
+
|
|
71
|
+
-file("src/gleeunit/internal/reporting.gleam", 202).
|
|
72
|
+
?DOC(false).
|
|
73
|
+
-spec test_skipped(state(), binary(), binary()) -> state().
|
|
74
|
+
test_skipped(State, Module, Function) ->
|
|
75
|
+
gleam_stdlib:print(
|
|
76
|
+
<<<<<<<<"\n"/utf8, Module/binary>>/binary, "."/utf8>>/binary,
|
|
77
|
+
Function/binary>>/binary,
|
|
78
|
+
(yellow(<<" skipped"/utf8>>))/binary>>
|
|
79
|
+
),
|
|
80
|
+
{state,
|
|
81
|
+
erlang:element(2, State),
|
|
82
|
+
erlang:element(3, State),
|
|
83
|
+
erlang:element(4, State) + 1}.
|
|
84
|
+
|
|
85
|
+
-file("src/gleeunit/internal/reporting.gleam", 219).
|
|
86
|
+
?DOC(false).
|
|
87
|
+
-spec green(binary()) -> binary().
|
|
88
|
+
green(Text) ->
|
|
89
|
+
<<<<"\x{001b}[32m"/utf8, Text/binary>>/binary, "\x{001b}[39m"/utf8>>.
|
|
90
|
+
|
|
91
|
+
-file("src/gleeunit/internal/reporting.gleam", 66).
|
|
92
|
+
?DOC(false).
|
|
93
|
+
-spec test_passed(state()) -> state().
|
|
94
|
+
test_passed(State) ->
|
|
95
|
+
gleam_stdlib:print(green(<<"."/utf8>>)),
|
|
96
|
+
{state,
|
|
97
|
+
erlang:element(2, State) + 1,
|
|
98
|
+
erlang:element(3, State),
|
|
99
|
+
erlang:element(4, State)}.
|
|
100
|
+
|
|
101
|
+
-file("src/gleeunit/internal/reporting.gleam", 223).
|
|
102
|
+
?DOC(false).
|
|
103
|
+
-spec red(binary()) -> binary().
|
|
104
|
+
red(Text) ->
|
|
105
|
+
<<<<"\x{001b}[31m"/utf8, Text/binary>>/binary, "\x{001b}[39m"/utf8>>.
|
|
106
|
+
|
|
107
|
+
-file("src/gleeunit/internal/reporting.gleam", 19).
|
|
108
|
+
?DOC(false).
|
|
109
|
+
-spec finished(state()) -> integer().
|
|
110
|
+
finished(State) ->
|
|
111
|
+
case State of
|
|
112
|
+
{state, 0, 0, 0} ->
|
|
113
|
+
gleam_stdlib:println(<<"\nNo tests found!"/utf8>>),
|
|
114
|
+
1;
|
|
115
|
+
|
|
116
|
+
{state, _, 0, 0} ->
|
|
117
|
+
Message = <<<<"\n"/utf8,
|
|
118
|
+
(erlang:integer_to_binary(erlang:element(2, State)))/binary>>/binary,
|
|
119
|
+
" passed, no failures"/utf8>>,
|
|
120
|
+
gleam_stdlib:println(green(Message)),
|
|
121
|
+
0;
|
|
122
|
+
|
|
123
|
+
{state, _, _, 0} ->
|
|
124
|
+
Message@1 = <<<<<<<<"\n"/utf8,
|
|
125
|
+
(erlang:integer_to_binary(erlang:element(2, State)))/binary>>/binary,
|
|
126
|
+
" passed, "/utf8>>/binary,
|
|
127
|
+
(erlang:integer_to_binary(erlang:element(3, State)))/binary>>/binary,
|
|
128
|
+
" failures"/utf8>>,
|
|
129
|
+
gleam_stdlib:println(red(Message@1)),
|
|
130
|
+
1;
|
|
131
|
+
|
|
132
|
+
{state, _, 0, _} ->
|
|
133
|
+
Message@2 = <<<<<<<<"\n"/utf8,
|
|
134
|
+
(erlang:integer_to_binary(erlang:element(2, State)))/binary>>/binary,
|
|
135
|
+
" passed, 0 failures, "/utf8>>/binary,
|
|
136
|
+
(erlang:integer_to_binary(erlang:element(4, State)))/binary>>/binary,
|
|
137
|
+
" skipped"/utf8>>,
|
|
138
|
+
gleam_stdlib:println(yellow(Message@2)),
|
|
139
|
+
1;
|
|
140
|
+
|
|
141
|
+
{state, _, _, _} ->
|
|
142
|
+
Message@3 = <<<<<<<<<<<<"\n"/utf8,
|
|
143
|
+
(erlang:integer_to_binary(
|
|
144
|
+
erlang:element(2, State)
|
|
145
|
+
))/binary>>/binary,
|
|
146
|
+
" passed, "/utf8>>/binary,
|
|
147
|
+
(erlang:integer_to_binary(erlang:element(3, State)))/binary>>/binary,
|
|
148
|
+
" failures, "/utf8>>/binary,
|
|
149
|
+
(erlang:integer_to_binary(erlang:element(4, State)))/binary>>/binary,
|
|
150
|
+
" skipped"/utf8>>,
|
|
151
|
+
gleam_stdlib:println(red(Message@3)),
|
|
152
|
+
1
|
|
153
|
+
end.
|
|
154
|
+
|
|
155
|
+
-file("src/gleeunit/internal/reporting.gleam", 89).
|
|
156
|
+
?DOC(false).
|
|
157
|
+
-spec eunit_missing() -> {ok, any()} | {error, nil}.
|
|
158
|
+
eunit_missing() ->
|
|
159
|
+
Message = <<(bold(red(<<"Error"/utf8>>)))/binary,
|
|
160
|
+
": EUnit libraries not found.
|
|
161
|
+
|
|
162
|
+
Your Erlang installation seems to be incomplete. If you installed Erlang using
|
|
163
|
+
a package manager ensure that you have installed the full Erlang
|
|
164
|
+
distribution instead of a stripped-down version.
|
|
165
|
+
"/utf8>>,
|
|
166
|
+
gleam_stdlib:print_error(Message),
|
|
167
|
+
{error, nil}.
|
|
168
|
+
|
|
169
|
+
-file("src/gleeunit/internal/reporting.gleam", 227).
|
|
170
|
+
?DOC(false).
|
|
171
|
+
-spec grey(binary()) -> binary().
|
|
172
|
+
grey(Text) ->
|
|
173
|
+
<<<<"\x{001b}[90m"/utf8, Text/binary>>/binary, "\x{001b}[39m"/utf8>>.
|
|
174
|
+
|
|
175
|
+
-file("src/gleeunit/internal/reporting.gleam", 100).
|
|
176
|
+
?DOC(false).
|
|
177
|
+
-spec format_unknown(binary(), binary(), gleam@dynamic:dynamic_()) -> binary().
|
|
178
|
+
format_unknown(Module, Function, Error) ->
|
|
179
|
+
erlang:list_to_binary(
|
|
180
|
+
[<<(grey(<<<<Module/binary, "."/utf8>>/binary, Function/binary>>))/binary,
|
|
181
|
+
"\n"/utf8>>,
|
|
182
|
+
<<"An unexpected error occurred:\n"/utf8>>,
|
|
183
|
+
<<"\n"/utf8>>,
|
|
184
|
+
<<<<" "/utf8, (gleam@string:inspect(Error))/binary>>/binary,
|
|
185
|
+
"\n"/utf8>>]
|
|
186
|
+
).
|
|
187
|
+
|
|
188
|
+
-file("src/gleeunit/internal/reporting.gleam", 183).
|
|
189
|
+
?DOC(false).
|
|
190
|
+
-spec inspect_value(gleeunit@internal@gleam_panic:asserted_expression()) -> binary().
|
|
191
|
+
inspect_value(Value) ->
|
|
192
|
+
case erlang:element(4, Value) of
|
|
193
|
+
unevaluated ->
|
|
194
|
+
grey(<<"unevaluated"/utf8>>);
|
|
195
|
+
|
|
196
|
+
{literal, _} ->
|
|
197
|
+
grey(<<"literal"/utf8>>);
|
|
198
|
+
|
|
199
|
+
{expression, Value@1} ->
|
|
200
|
+
gleam@string:inspect(Value@1)
|
|
201
|
+
end.
|
|
202
|
+
|
|
203
|
+
-file("src/gleeunit/internal/reporting.gleam", 179).
|
|
204
|
+
?DOC(false).
|
|
205
|
+
-spec assert_value(
|
|
206
|
+
binary(),
|
|
207
|
+
gleeunit@internal@gleam_panic:asserted_expression()
|
|
208
|
+
) -> binary().
|
|
209
|
+
assert_value(Name, Value) ->
|
|
210
|
+
<<<<<<(cyan(Name))/binary, ": "/utf8>>/binary,
|
|
211
|
+
(inspect_value(Value))/binary>>/binary,
|
|
212
|
+
"\n"/utf8>>.
|
|
213
|
+
|
|
214
|
+
-file("src/gleeunit/internal/reporting.gleam", 160).
|
|
215
|
+
?DOC(false).
|
|
216
|
+
-spec assert_info(gleeunit@internal@gleam_panic:assert_kind()) -> binary().
|
|
217
|
+
assert_info(Kind) ->
|
|
218
|
+
case Kind of
|
|
219
|
+
{binary_operator, _, Left, Right} ->
|
|
220
|
+
erlang:list_to_binary(
|
|
221
|
+
[assert_value(<<" left"/utf8>>, Left),
|
|
222
|
+
assert_value(<<"right"/utf8>>, Right)]
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
{function_call, Arguments} ->
|
|
226
|
+
_pipe = Arguments,
|
|
227
|
+
_pipe@1 = gleam@list:index_map(
|
|
228
|
+
_pipe,
|
|
229
|
+
fun(E, I) ->
|
|
230
|
+
Number = gleam@string:pad_start(
|
|
231
|
+
erlang:integer_to_binary(I),
|
|
232
|
+
5,
|
|
233
|
+
<<" "/utf8>>
|
|
234
|
+
),
|
|
235
|
+
assert_value(Number, E)
|
|
236
|
+
end
|
|
237
|
+
),
|
|
238
|
+
erlang:list_to_binary(_pipe@1);
|
|
239
|
+
|
|
240
|
+
{other_expression, _} ->
|
|
241
|
+
<<""/utf8>>
|
|
242
|
+
end.
|
|
243
|
+
|
|
244
|
+
-file("src/gleeunit/internal/reporting.gleam", 113).
|
|
245
|
+
?DOC(false).
|
|
246
|
+
-spec format_gleam_error(
|
|
247
|
+
gleeunit@internal@gleam_panic:gleam_panic(),
|
|
248
|
+
binary(),
|
|
249
|
+
binary(),
|
|
250
|
+
gleam@option:option(bitstring())
|
|
251
|
+
) -> binary().
|
|
252
|
+
format_gleam_error(Error, Module, Function, Src) ->
|
|
253
|
+
Location = grey(
|
|
254
|
+
<<<<(erlang:element(3, Error))/binary, ":"/utf8>>/binary,
|
|
255
|
+
(erlang:integer_to_binary(erlang:element(6, Error)))/binary>>
|
|
256
|
+
),
|
|
257
|
+
case erlang:element(7, Error) of
|
|
258
|
+
panic ->
|
|
259
|
+
erlang:list_to_binary(
|
|
260
|
+
[<<<<<<(bold(red(<<"panic"/utf8>>)))/binary, " "/utf8>>/binary,
|
|
261
|
+
Location/binary>>/binary,
|
|
262
|
+
"\n"/utf8>>,
|
|
263
|
+
<<<<<<<<<<(cyan(<<" test"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
264
|
+
Module/binary>>/binary,
|
|
265
|
+
"."/utf8>>/binary,
|
|
266
|
+
Function/binary>>/binary,
|
|
267
|
+
"\n"/utf8>>,
|
|
268
|
+
<<<<<<(cyan(<<" info"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
269
|
+
(erlang:element(2, Error))/binary>>/binary,
|
|
270
|
+
"\n"/utf8>>]
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
todo ->
|
|
274
|
+
erlang:list_to_binary(
|
|
275
|
+
[<<<<<<(bold(yellow(<<"todo"/utf8>>)))/binary, " "/utf8>>/binary,
|
|
276
|
+
Location/binary>>/binary,
|
|
277
|
+
"\n"/utf8>>,
|
|
278
|
+
<<<<<<<<<<(cyan(<<" test"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
279
|
+
Module/binary>>/binary,
|
|
280
|
+
"."/utf8>>/binary,
|
|
281
|
+
Function/binary>>/binary,
|
|
282
|
+
"\n"/utf8>>,
|
|
283
|
+
<<<<<<(cyan(<<" info"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
284
|
+
(erlang:element(2, Error))/binary>>/binary,
|
|
285
|
+
"\n"/utf8>>]
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
{assert, Start, End, _, Kind} ->
|
|
289
|
+
erlang:list_to_binary(
|
|
290
|
+
[<<<<<<(bold(red(<<"assert"/utf8>>)))/binary, " "/utf8>>/binary,
|
|
291
|
+
Location/binary>>/binary,
|
|
292
|
+
"\n"/utf8>>,
|
|
293
|
+
<<<<<<<<<<(cyan(<<" test"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
294
|
+
Module/binary>>/binary,
|
|
295
|
+
"."/utf8>>/binary,
|
|
296
|
+
Function/binary>>/binary,
|
|
297
|
+
"\n"/utf8>>,
|
|
298
|
+
code_snippet(Src, Start, End),
|
|
299
|
+
assert_info(Kind),
|
|
300
|
+
<<<<<<(cyan(<<" info"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
301
|
+
(erlang:element(2, Error))/binary>>/binary,
|
|
302
|
+
"\n"/utf8>>]
|
|
303
|
+
);
|
|
304
|
+
|
|
305
|
+
{let_assert, Start@1, End@1, _, _, Value} ->
|
|
306
|
+
erlang:list_to_binary(
|
|
307
|
+
[<<<<<<(bold(red(<<"let assert"/utf8>>)))/binary, " "/utf8>>/binary,
|
|
308
|
+
Location/binary>>/binary,
|
|
309
|
+
"\n"/utf8>>,
|
|
310
|
+
<<<<<<<<<<(cyan(<<" test"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
311
|
+
Module/binary>>/binary,
|
|
312
|
+
"."/utf8>>/binary,
|
|
313
|
+
Function/binary>>/binary,
|
|
314
|
+
"\n"/utf8>>,
|
|
315
|
+
code_snippet(Src, Start@1, End@1),
|
|
316
|
+
<<<<<<(cyan(<<"value"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
317
|
+
(gleam@string:inspect(Value))/binary>>/binary,
|
|
318
|
+
"\n"/utf8>>,
|
|
319
|
+
<<<<<<(cyan(<<" info"/utf8>>))/binary, ": "/utf8>>/binary,
|
|
320
|
+
(erlang:element(2, Error))/binary>>/binary,
|
|
321
|
+
"\n"/utf8>>]
|
|
322
|
+
)
|
|
323
|
+
end.
|
|
324
|
+
|
|
325
|
+
-file("src/gleeunit/internal/reporting.gleam", 71).
|
|
326
|
+
?DOC(false).
|
|
327
|
+
-spec test_failed(state(), binary(), binary(), gleam@dynamic:dynamic_()) -> state().
|
|
328
|
+
test_failed(State, Module, Function, Error) ->
|
|
329
|
+
Message = case gleeunit_gleam_panic_ffi:from_dynamic(Error) of
|
|
330
|
+
{ok, Error@1} ->
|
|
331
|
+
Src = gleam@option:from_result(
|
|
332
|
+
file:read_file(erlang:element(3, Error@1))
|
|
333
|
+
),
|
|
334
|
+
format_gleam_error(Error@1, Module, Function, Src);
|
|
335
|
+
|
|
336
|
+
{error, _} ->
|
|
337
|
+
format_unknown(Module, Function, Error)
|
|
338
|
+
end,
|
|
339
|
+
gleam_stdlib:print(<<"\n"/utf8, Message/binary>>),
|
|
340
|
+
{state,
|
|
341
|
+
erlang:element(2, State),
|
|
342
|
+
erlang:element(3, State) + 1,
|
|
343
|
+
erlang:element(4, State)}.
|