...

Text file src/cuelang.org/go/cue/load/moduleschema.cue

Documentation: cuelang.org/go/cue/load

     1// module indicates the module's import path.
     2// For legacy reasons, we allow a missing module
     3// directory and an empty module directive.
     4module?: #Module | ""
     5
     6// deps holds dependency information for modules, keyed by module path.
     7deps?: [#Module]: {
     8	// TODO numexist(<=1, replace, replaceAll)
     9	// TODO numexist(>=1, v, exclude, replace, replaceAll)
    10
    11	// v indicates the required version of the module.
    12	// It is usually a #Semver but it can also name a branch
    13	// of the module. cue mod tidy will rewrite such branch
    14	// names to their canonical versions.
    15	v?: string
    16}
    17
    18// #Module constraints a module path.
    19// TODO encode the module path rules as regexp:
    20// WIP: (([\-_~a-zA-Z0-9][.\-_~a-zA-Z0-9]*[\-_~a-zA-Z0-9])|([\-_~a-zA-Z0-9]))(/([\-_~a-zA-Z0-9][.\-_~a-zA-Z0-9]*[\-_~a-zA-Z0-9])|([\-_~a-zA-Z0-9]))*
    21#Module:            =~"^[^@]+$"
    22
    23// TODO add the rest of the module schema definition.

View as plain text