Ops.source_ext: def of near-v-framework@0.4.0.0 Import: import near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend as Ops Lines 208-216 of near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend: https://jend.leeeet.dev/read.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend&start_line=208&end_line=216 import Base # The source extension of a repository path, or "" when it is not source: generated files, and files # under node_modules, _generated or .next. def source_ext(+path: String) -> String: +parts = String.split(path, '/') +name = last(parts) +ext = "." ++ last(String.split(name, '.')) Bool.pick(String, String.contains(name, ".") && Bool.not(String.contains(name, ".generated.")) && known(ext) && Bool.not(List.contains(~String, ~String.eq, parts, "node_modules") || List.contains(~String, ~String.eq, parts, "_generated") || List.contains(~String, ~String.eq, parts, ".next")), ext, "") Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.split https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend&name=known https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/container/ops.bend&name=last