From bb8ce0f0c3d3a16706270798a6fdc5e7260de527 Mon Sep 17 00:00:00 2001 From: Schemas update bot Date: Sun, 30 Jun 2024 00:52:18 +0000 Subject: [PATCH] Re-generate the schema files --- main.ncl | 7 + out/Any.ncl | 910 +++++++ out/Argo Workflows.ncl | 2 +- ...GS Custom Card Game (CardGameDef.json).ncl | 1 + out/CMake Presets.ncl | 2093 ++++++++++++++--- out/CodeRabbit.ncl | 9 + out/Cycle Stack File.ncl | 8 +- out/DashLord Configuration.ncl | 244 +- out/Data Contract Specification.ncl | 79 +- out/Datahub Ingestion Recipe.ncl | 10 +- ...oice TTS Toolkit Aligner Configuration.ncl | 941 ++++++++ ...ryVoice TTS Toolkit Data Configuration.ncl | 932 ++++++++ ...eryVoice TTS Toolkit E2E Configuration.ncl | 941 ++++++++ ...olkit Feature Prediction Configuration.ncl | 945 ++++++++ ...ryVoice TTS Toolkit Text Configuration.ncl | 913 +++++++ ...oice TTS Toolkit Vocoder Configuration.ncl | 935 ++++++++ out/Firebase.ncl | 7 +- out/GraphQL Mesh.ncl | 1 + out/Haystack Pipeline.ncl | 7 + out/KSP-CKAN.ncl | 1 + out/Madness (madness.yml).ncl | 49 +- out/MetricsHub Configuration.ncl | 321 ++- out/MetricsHub Connector Configuration.ncl | 121 +- out/Network-as-Code Data Model.ncl | 14 +- out/Nuitka.yaml.ncl | 12 + out/Quali Torque Blueprint Spec 2.ncl | 10 +- out/Renovate.ncl | 8 +- out/Ruff.ncl | 86 +- out/SauceCTL Configuration.ncl | 12 +- out/Semantic Data Fabric (SDF) file.ncl | 110 +- out/StackHawk Scanner Configuration.ncl | 14 + out/UET BuildConfig.json.ncl | 6 + out/UI5 Manifest.ncl | 49 +- out/Uplift.ncl | 14 +- out/Vela Pipeline Configuration.ncl | 16 + out/Woodpecker pipeline config.ncl | 25 + out/beef-entity-v5-codegen.ncl | 4 +- out/kustomization.yaml.ncl | 31 + out/lazygit.ncl | 36 +- 39 files changed, 9193 insertions(+), 731 deletions(-) create mode 100644 out/Any.ncl create mode 100644 out/EveryVoice TTS Toolkit Aligner Configuration.ncl create mode 100644 out/EveryVoice TTS Toolkit Data Configuration.ncl create mode 100644 out/EveryVoice TTS Toolkit E2E Configuration.ncl create mode 100644 out/EveryVoice TTS Toolkit Feature Prediction Configuration.ncl create mode 100644 out/EveryVoice TTS Toolkit Text Configuration.ncl create mode 100644 out/EveryVoice TTS Toolkit Vocoder Configuration.ncl diff --git a/main.ncl b/main.ncl index c718aa1..665235a 100644 --- a/main.ncl +++ b/main.ncl @@ -268,6 +268,12 @@ "Error pages" = import "out/Error pages.ncl", "electron-builder configuration file" = import "out/electron-builder configuration file.ncl", "evcc.yaml" = import "out/evcc.yaml.ncl", +"EveryVoice TTS Toolkit Aligner Configuration" = import "out/EveryVoice TTS Toolkit Aligner Configuration.ncl", +"EveryVoice TTS Toolkit Data Configuration" = import "out/EveryVoice TTS Toolkit Data Configuration.ncl", +"EveryVoice TTS Toolkit Text Configuration" = import "out/EveryVoice TTS Toolkit Text Configuration.ncl", +"EveryVoice TTS Toolkit Vocoder Configuration" = import "out/EveryVoice TTS Toolkit Vocoder Configuration.ncl", +"EveryVoice TTS Toolkit Feature Prediction Configuration" = import "out/EveryVoice TTS Toolkit Feature Prediction Configuration.ncl", +"EveryVoice TTS Toolkit E2E Configuration" = import "out/EveryVoice TTS Toolkit E2E Configuration.ncl", "Expo SDK" = import "out/Expo SDK.ncl", "EAS config" = import "out/EAS config.ncl", "ezd task runner" = import "out/ezd task runner.ncl", @@ -886,4 +892,5 @@ "Configu .configu file" = import "out/Configu .configu file.ncl", "Qt Creator workspace file" = import "out/Qt Creator workspace file.ncl", "mprocs Configuration file" = import "out/mprocs Configuration file.ncl", +"Any" = import "out/Any.ncl", } diff --git a/out/Any.ncl b/out/Any.ncl new file mode 100644 index 0000000..0a44aca --- /dev/null +++ b/out/Any.ncl @@ -0,0 +1,910 @@ +# DO NOT EDIT +# This file was automatically generated using json-schema-to-nickel +let _js2n__-prdslib + = { + allOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `allOf preds` succeeds if all of the predicates in `preds` succeed + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1] + "% + = fun + preds + x + => + std.array.fold_right + (fun pred acc => (match { 'Ok => acc, 'Err s => 'Err s, }) (pred x)) + 'Ok preds, + always : Dyn -> [| 'Ok, 'Err String |] = std.function.const 'Ok, + anyOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `anyOf preds` succeeds if at least one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2] + "% + = fun + preds + x + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + anyOf: none of the options matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + pred + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) preds), + arrays = + { + additionalItems + : (Dyn -> [| 'Ok, 'Err String |]) + -> Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2]" + = fun + pred + start + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let value_length + = std.array.length x + in + if start >= value_length then + 'Ok + else + arrayOf pred + ((std.array.slice start value_length x) + | Dyn), + arrayOf + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Apply a predicate to all elements of an array, succeeding if all + applications succeed. + "% + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + std.array.fold_right + (fun + x + acc + => + (match { 'Ok => acc, 'Err msg => 'Err msg, }) (pred x)) + 'Ok x, + contains + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6]" + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + contains: no elements matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + x + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) x), + items + : Array (Dyn -> [| 'Ok, 'Err String |]) + -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1]" + = fun + preds + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let length_to_check + = std.number.min (std.array.length preds) + (std.array.length x) + in + std.array.fold_right + (fun + i + acc + => + (match { 'Err msg => 'Err msg, 'Ok => acc, }) + (std.array.at i preds (std.array.at i x))) 'Ok + (std.array.range 0 length_to_check), + maxItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxItems n x` fails if `x` is an array of length strictly greater than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.3] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) > n then + 'Err + "array is longer than %{std.string.from_number n} items" + else + 'Ok, + minItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minItems n x` fails if `x` is an array of length strictly smaller than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.4] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) < n then + 'Err + "array is shorter than %{std.string.from_number n} items" + else + 'Ok, + uniqueItems + : Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Succeeds for any array if its elements are pairwise distinct. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.5] + "% + = let find_duplicate + : Array Dyn + -> { + has_duplicate : Bool, + duplicate : Dyn, + seen : { _ : Bool } + } + = std.array.fold_right + (fun + elt + acc + => + if acc.has_duplicate then + acc + else + let index + = std.serialize 'Json elt + in + if std.record.has_field index acc.seen then + { + duplicate = elt, + has_duplicate = true, + seen = acc.seen, + } + else + { + duplicate = null, + has_duplicate = false, + seen = std.record.insert index true acc.seen, + }) + { duplicate = null, has_duplicate = false, seen = {}, } + in + fun + x + => + if !(std.is_array x) then + 'Ok + else + let { has_duplicate, duplicate, .. } + = find_duplicate (x | Array Dyn) + in + if has_duplicate then + 'Err "duplicate found: %{std.serialize 'Json duplicate}" + else + 'Ok, + }, + const + : Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `const value x` succeeds if and only if `x` is equal to `value` + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.3] + "% + = fun + value + x + => + if x == value then + 'Ok + else + 'Err "expected %{std.serialize 'Json value}", + contract_from_predicate + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> Dyn -> Dyn + = fun + predicate + label + value + => + (match { + 'Ok => + value, + 'Err + msg => + (std.contract.blame_with_message msg label) + | Dyn, + }) (predicate value), + enum + : Array Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `enum values x` succeeds if and only if `x` is equal to one of the elements of `values`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.2] + "% + = let checkEqual + = fun + input + variant + => + (input == variant) + || ((std.is_enum input) + && (((std.string.from_enum input) == variant) + | Bool)) + in + fun + values + x + => + std.array.fold_right + (fun value acc => if checkEqual x value then 'Ok else acc) + ('Err "expected one of %{std.serialize 'Json (values | Dyn)}") + values, + from_simple_predicate + : String -> (Dyn -> Bool) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Convert a simple boolean predicate into a predicate supporting error messages" + = fun error' pred x => if pred x then 'Ok else 'Err error', + ifThenElse + : (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `ifThenElse i t e` first checks if the predicate `i` succeeds. If it does, it's equivalent to `t`, otherwise it's equivalent to `e`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6] + "% + = fun i t e x => (match { 'Ok => t x, 'Err msg => e x, }) (i x), + isType + : [| '"Array", '"Bool", 'Integer, 'Null, '"Number", 'Record, '"String" |] + -> Dyn -> [| 'Ok, 'Err String |] + = fun + t + => + (match { + 'Null => + from_simple_predicate "expected `null`" (fun x => x == null), + 'Integer => + from_simple_predicate "expected an integer" + (fun + x + => + (std.is_number x) && (std.number.is_integer (x | Number))), + _ => + from_simple_predicate + "value is not of type %{std.string.from_enum t}" + (fun x => (std.typeof x) == t), + }) t, + never : Dyn -> [| 'Ok, 'Err String |] = std.function.const ('Err "never"), + not + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `not pred` succeeds if and only if `pred` fails + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4] + "% + = fun + pred + x + => + (match { + 'Ok => + 'Err "Inverted predicate succeeded unexpectedly", + 'Err + msg => + 'Ok, + }) (pred x), + numbers = + { + exclusiveMaximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) < limit then + 'Ok + else + 'Err + "expected an exclusive maximum of %{std.string.from_number + limit}", + exclusiveMinimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.5]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) > limit then + 'Ok + else + 'Err + "expected an exclusive minimum of %{std.string.from_number + limit}", + maximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.2]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) <= limit then + 'Ok + else + 'Err + "expected a maximum of %{std.string.from_number limit}", + minimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.4]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) >= limit then + 'Ok + else + 'Err + "expected a minimum of %{std.string.from_number limit}", + multipleOf + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.1]" + = fun + mult + x + => + if !(std.is_number x) then + 'Ok + else + if std.number.is_integer ((x | Number) / mult) then + 'Ok + else + 'Err + "expected a multiple of %{std.string.from_number mult}", + }, + oneOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `oneOf preds` succeeds if precisely one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3] + "% + = fun + preds + x + => + let count_ok + : Array [| 'Ok, 'Err String |] -> Number + = fun + results + => + std.array.fold_left (fun n b => if b == 'Ok then n + 1 else n) 0 + results + in + let results + = std.array.map (fun pred => pred x) preds + in + let count + = count_ok results + in + if count == 0 then + let errors + = std.array.flat_map + (fun + result + => + (match { 'Ok => [ ], 'Err s => [ " - %{s}" ], }) + result) results + in + 'Err + m%" + oneOf: none of the options matched + %{std.string.join + m%" + + + "% errors} + "% + else + if count > 1 then + 'Err "oneOf: more than one of the options matched" + else + 'Ok, + records = + { + dependencies + : { _ : Dyn } -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7]" + = let mustHaveFields + : Array String -> { _ : Dyn } -> [| 'Ok, 'Err String |] + = fun + fields + x + => + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field x) then + 'Err "expected field `%{field}`" + else + acc) 'Ok fields + in + fun + deps + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + let result + = if std.is_array value then + mustHaveFields (value | Array String) x + else + let pred + | Dyn -> [| 'Ok, 'Err String |] + = value + in + pred (x | Dyn) + in + (match { + 'Err + msg => + 'Err + "dependency of `%{field}` failed: %{msg}", + 'Ok => + acc, + }) result) 'Ok (std.record.to_array deps), + maxProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxProperties n x` fails if `x` is a record containing stricly more than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) > n then + 'Err + "record contains more than %{std.string.from_number + n} fields" + else + 'Ok, + minProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minProperties n x` fails if `x` is a record containing stricly less than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) < n then + 'Err + "record contains fewer than %{std.string.from_number + n} fields" + else + 'Ok, + propertyNames + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8]" + = fun + pred + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` did not validate against `propertyNames` schema", + 'Ok => + acc, + }) (pred (field | Dyn))) 'Ok + (std.record.fields (x | { _ : Dyn })), + record + : { _ : Dyn -> [| 'Ok, 'Err String |] } + -> { _ : Dyn -> [| 'Ok, 'Err String |] } + -> Bool + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `record properties patternProperties additionalAllowed + additionalProperties x` is a combination of the `properties`, + `patternProperties` and `additionalProperties` validation keywords in + JSON schema. + + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5] + "% + = fun + properties + patternProperties + additionalAllowed + additionalProperties + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + let check_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true acc.checked, + result = acc.result, + }, + }) (value x."%{field}")) + { checked = {}, result = 'Ok, } + (std.record.to_array properties) + in + let matching_fields + : String -> { _ : Dyn } + = fun + pattern + => + let matcher + = std.string.is_match pattern + in + std.array.fold_left + (fun + acc + => + fun + { field, value, } + => + if matcher field then + std.record.insert field value acc + else + acc) {} (std.record.to_array x) + in + let check_pattern_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field = pattern, value = pred, } + => + fun + acc + => + (match { + r @ { result = 'Err msg, .. } => + r, + { result = 'Ok, checked = ch, } => + { + checked = + std.array.fold_left + (fun + r + field + => + if !(std.record.has_field field + r) then + std.record.insert field true r + else + r) acc.checked + (std.record.fields ch), + result = acc.result, + }, + }) + (std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true + acc.checked, + result = acc.result, + }, + }) (pred value)) + { + checked : { _ : Bool } = {}, + result = 'Ok, + } + (std.record.to_array + (matching_fields pattern)))) + { checked : { _ : Bool } = {}, result = 'Ok, } + (std.record.to_array patternProperties) + in + let remaining_fields + = std.array.fold_left + (fun + acc + field + => + if !(std.record.has_field field acc) then + acc + else + std.record.remove field acc) x + ((std.record.fields check_properties.checked) + @ (std.record.fields + check_pattern_properties.checked)) + in + let check_additional_properties + : [| 'Ok, 'Err String |] + = if (!additionalAllowed) + && (!(std.record.is_empty remaining_fields)) then + 'Err + "extra fields %{std.serialize 'Json + ((std.record.fields remaining_fields) + | Dyn)}" + else + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` didn't validate: %{msg}", + 'Ok => + acc, + }) (additionalProperties value)) 'Ok + (std.record.to_array remaining_fields) + in + (match { + 'Err + msg => + check_properties.result, + 'Ok => + (match { + 'Err + msg => + check_pattern_properties.result, + 'Ok => + check_additional_properties, + }) check_pattern_properties.result, + }) check_properties.result, + required + : Array String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3]" + = fun + fields + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field (x | { _ : Dyn })) then + 'Err "missing required field %{field}" + else + acc) 'Ok fields, + }, + strings = + { + maxLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.1]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) <= limit then + 'Ok + else + 'Err + "expected a string of length no larger than %{std.string.from_number + limit}", + minLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.2]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) >= limit then + 'Ok + else + 'Err + "expected a string of length no smaller than %{std.string.from_number + limit}", + pattern + : String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.3]" + = fun + pattern + x + => + if !(std.is_string x) then + 'Ok + else + if std.string.is_match pattern (x | String) then + 'Ok + else + 'Err "expected a string matching the pattern `%{pattern}`", + }, + } + in +let rec _js2n__-refsenv + = {} + in + _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.isType '"Number", + _js2n__-prdslib.isType '"Bool", + _js2n__-prdslib.isType 'Null + ]) \ No newline at end of file diff --git a/out/Argo Workflows.ncl b/out/Argo Workflows.ncl index 21a9a0a..173468d 100644 --- a/out/Argo Workflows.ncl +++ b/out/Argo Workflows.ncl @@ -2639,7 +2639,7 @@ let rec _js2n__-refsenv } {} true _js2n__-prdslib.always ], "_js2n__-:definitions/io.argoproj.workflow.v1alpha1.StopStrategy!predicate" - | doc "StopStrategy defines if the cron workflow will stop being triggered once a certain condition has been reached, involving a number of runs of the workflow" + | doc "v3.6 and after: StopStrategy defines if the CronWorkflow should stop scheduling based on a condition" = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, diff --git a/out/CGS Custom Card Game (CardGameDef.json).ncl b/out/CGS Custom Card Game (CardGameDef.json).ncl index bcf9246..30c9cde 100644 --- a/out/CGS Custom Card Game (CardGameDef.json).ncl +++ b/out/CGS Custom Card Game (CardGameDef.json).ncl @@ -1041,6 +1041,7 @@ let rec _js2n__-refsenv [ _js2n__-refsenv."_js2n__-:definitions/Float2!predicate" ], + rotation = _js2n__-prdslib.isType 'Integer, size = _js2n__-prdslib.oneOf [ diff --git a/out/CMake Presets.ncl b/out/CMake Presets.ncl index 5a33d86..2ba93f3 100644 --- a/out/CMake Presets.ncl +++ b/out/CMake Presets.ncl @@ -897,9 +897,37 @@ let _js2n__-prdslib in let rec _js2n__-refsenv = { + "_js2n__-:definitions/$comment!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String"), + _js2n__-prdslib.arrays.minItems 1 + ] + ], "_js2n__-:definitions/$schema!predicate" | doc "The schema against which to verify this document." = _js2n__-prdslib.isType '"String", + "_js2n__-:definitions/buildPresetsItemsV10!predicate" + | doc "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ]) + ], "_js2n__-:definitions/buildPresetsItemsV2!predicate" | doc "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 2 and higher." = _js2n__-prdslib.allOf @@ -909,7 +937,6 @@ let rec _js2n__-refsenv (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { cleanFirst = _js2n__-prdslib.isType '"Bool", @@ -989,6 +1016,9 @@ let rec _js2n__-refsenv ], "_js2n__-:definitions/buildPresetsItemsV3!predicate" | doc "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 3 and higher." + = _js2n__-prdslib.isType '"Array", + "_js2n__-:definitions/buildPresetsItemsV4!predicate" + | doc "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 4 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", @@ -998,29 +1028,54 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { - condition = - _js2n__-refsenv."_js2n__-:definitions/topCondition!predicate", + resolvePackageReferences = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "on", "off", "only" ] + ], } {} true _js2n__-prdslib.always ]) ], - "_js2n__-:definitions/buildPresetsItemsV4!predicate" - | doc "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 4 and higher." + "_js2n__-:definitions/buildPresetsV10!predicate" + | doc "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 10 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/buildPresetsItemsV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/buildPresetsItemsV4!predicate", + _js2n__-refsenv."_js2n__-:definitions/buildPresetsItemsV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/buildPresetsItemsV2!predicate" + ], _js2n__-prdslib.arrays.arrayOf (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - resolvePackageReferences = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.enum [ "on", "off", "only" ] - ], - } {} true _js2n__-prdslib.always + "$comment" = _js2n__-prdslib.always, + cleanFirst = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV10!predicate", + configuration = _js2n__-prdslib.always, + configurePreset = _js2n__-prdslib.always, + description = _js2n__-prdslib.always, + displayName = _js2n__-prdslib.always, + environment = _js2n__-prdslib.always, + hidden = _js2n__-prdslib.always, + inheritConfigureEnvironment = _js2n__-prdslib.always, + inherits = _js2n__-prdslib.always, + jobs = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + nativeToolOptions = _js2n__-prdslib.always, + resolvePackageReferences = _js2n__-prdslib.always, + targets = _js2n__-prdslib.always, + vendor = _js2n__-prdslib.always, + verbose = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never ]) ], "_js2n__-:definitions/buildPresetsV2!predicate" @@ -1072,7 +1127,8 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.record { cleanFirst = _js2n__-prdslib.always, - condition = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", configuration = _js2n__-prdslib.always, configurePreset = _js2n__-prdslib.always, description = _js2n__-prdslib.always, @@ -1109,7 +1165,8 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.record { cleanFirst = _js2n__-prdslib.always, - condition = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", configuration = _js2n__-prdslib.always, configurePreset = _js2n__-prdslib.always, description = _js2n__-prdslib.always, @@ -1128,8 +1185,8 @@ let rec _js2n__-refsenv } {} false _js2n__-prdslib.never ]) ], - "_js2n__-:definitions/cmakeMinimumRequired!predicate" - | doc "An optional object representing the minimum version of CMake needed to build this project." + "_js2n__-:definitions/cmakeMinimumRequiredPropertiesV1!predicate" + | doc "An optional object representing the minimum version of CMake needed to build this project. Available in version 1 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, @@ -1138,161 +1195,379 @@ let rec _js2n__-refsenv major = _js2n__-prdslib.isType 'Integer, minor = _js2n__-prdslib.isType 'Integer, patch = _js2n__-prdslib.isType 'Integer, + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/cmakeMinimumRequiredPropertiesV10!predicate" + | doc "An optional object representing the minimum version of CMake needed to build this project. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/cmakeMinimumRequiredV1!predicate" + | doc "An optional object representing the minimum version of CMake needed to build this project. Available in version 1 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredPropertiesV1!predicate", + _js2n__-prdslib.records.record + { + major = _js2n__-prdslib.always, + minor = _js2n__-prdslib.always, + patch = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + "_js2n__-:definitions/cmakeMinimumRequiredV10!predicate" + | doc "An optional object representing the minimum version of CMake needed to build this project. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredPropertiesV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredPropertiesV1!predicate" + ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + major = _js2n__-prdslib.always, + minor = _js2n__-prdslib.always, + patch = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], - "_js2n__-:definitions/condition!predicate" = + "_js2n__-:definitions/conditionAsBooleanV3!predicate" + | doc "A boolean which provides a constant value for the condition's evaluation." + = _js2n__-prdslib.isType '"Bool", + "_js2n__-:definitions/conditionAsObjectAggregationV10!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectAggregationV3!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + conditions = _js2n__-prdslib.isType '"Array", + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "anyOf", "allOf" ] + ], + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectConstV10!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectConstV3!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.const "const" + ], + value = _js2n__-prdslib.isType '"Bool", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectEqualsV10!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectEqualsV3!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + lhs = _js2n__-prdslib.isType '"String", + rhs = _js2n__-prdslib.isType '"String", + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "equals", "notEquals" ] + ], + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectInListV10!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectInListV3!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + list = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], + string = _js2n__-prdslib.isType '"String", + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "inList", "notInList" ] + ], + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectMatchesV10!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectMatchesV3!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + regex = _js2n__-prdslib.isType '"String", + string = _js2n__-prdslib.isType '"String", + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "matches", "notMatches" ] + ], + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectNotV10!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionAsObjectNotV3!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.const "not" + ], + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/conditionV10!predicate" = _js2n__-prdslib.anyOf [ - _js2n__-prdslib.isType '"Bool", + _js2n__-refsenv."_js2n__-:definitions/conditionAsBooleanV3!predicate", _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectConstV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectConstV3!predicate" + ], _js2n__-prdslib.records.required [ "type", "value" ], _js2n__-prdslib.records.record { - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "const" - ], - value = _js2n__-prdslib.isType '"Bool", + "$comment" = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectEqualsV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectEqualsV3!predicate" + ], _js2n__-prdslib.records.required [ "lhs", "rhs", "type" ], _js2n__-prdslib.records.record { - lhs = _js2n__-prdslib.isType '"String", - rhs = _js2n__-prdslib.isType '"String", - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "equals" - ], + "$comment" = _js2n__-prdslib.always, + lhs = _js2n__-prdslib.always, + rhs = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "lhs", "rhs", "type" ], + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectInListV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectInListV3!predicate" + ], + _js2n__-prdslib.records.required [ "list", "string", "type" ], _js2n__-prdslib.records.record { - lhs = _js2n__-prdslib.isType '"String", - rhs = _js2n__-prdslib.isType '"String", - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "notEquals" - ], + "$comment" = _js2n__-prdslib.always, + list = _js2n__-prdslib.always, + string = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "list", "string", "type" ], + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectMatchesV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectMatchesV3!predicate" + ], + _js2n__-prdslib.records.required + [ "regex", "string", "type" ], _js2n__-prdslib.records.record { - list = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - (_js2n__-prdslib.isType '"String") - ], - string = _js2n__-prdslib.isType '"String", - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "inList" - ], + "$comment" = _js2n__-prdslib.always, + regex = _js2n__-prdslib.always, + string = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "list", "string", "type" ], + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectAggregationV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectAggregationV3!predicate" + ], + _js2n__-prdslib.records.required [ "conditions", "type" ], _js2n__-prdslib.records.record { - list = + "$comment" = _js2n__-prdslib.always, + conditions = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", _js2n__-prdslib.arrays.arrayOf - (_js2n__-prdslib.isType '"String") - ], - string = _js2n__-prdslib.isType '"String", - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "notInList" + _js2n__-refsenv."_js2n__-:definitions/conditionV10!predicate" ], + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required - [ "regex", "string", "type" ], + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectNotV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectNotV3!predicate" + ], + _js2n__-prdslib.records.required [ "condition", "type" ], _js2n__-prdslib.records.record { - regex = _js2n__-prdslib.isType '"String", - string = _js2n__-prdslib.isType '"String", - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "matches" - ], + "$comment" = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/conditionV10!predicate", + type = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/conditionV3!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionAsBooleanV3!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectConstV3!predicate", + _js2n__-prdslib.records.required [ "type", "value" ], + _js2n__-prdslib.records.record + { + type = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required - [ "regex", "string", "type" ], + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectEqualsV3!predicate", + _js2n__-prdslib.records.required [ "lhs", "rhs", "type" ], _js2n__-prdslib.records.record { - regex = _js2n__-prdslib.isType '"String", - string = _js2n__-prdslib.isType '"String", - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "notMatches" - ], + lhs = _js2n__-prdslib.always, + rhs = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "conditions", "type" ], + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectInListV3!predicate", + _js2n__-prdslib.records.required [ "list", "string", "type" ], _js2n__-prdslib.records.record { - conditions = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/condition!predicate" - ], - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "anyOf" - ], + list = _js2n__-prdslib.always, + string = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectMatchesV3!predicate", + _js2n__-prdslib.records.required + [ "regex", "string", "type" ], + _js2n__-prdslib.records.record + { + regex = _js2n__-prdslib.always, + string = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectAggregationV3!predicate", _js2n__-prdslib.records.required [ "conditions", "type" ], _js2n__-prdslib.records.record { @@ -1301,100 +1576,186 @@ let rec _js2n__-refsenv [ _js2n__-prdslib.isType '"Array", _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/condition!predicate" - ], - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "allOf" + _js2n__-refsenv."_js2n__-:definitions/conditionV3!predicate" ], + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/conditionAsObjectNotV3!predicate", _js2n__-prdslib.records.required [ "condition", "type" ], _js2n__-prdslib.records.record { condition = - _js2n__-refsenv."_js2n__-:definitions/condition!predicate", - type = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.const "not" - ], + _js2n__-refsenv."_js2n__-:definitions/conditionV3!predicate", + type = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ] ], - "_js2n__-:definitions/configurePresetsItemsV1!predicate" - | doc "An optional array of configure preset objects." + "_js2n__-:definitions/configurePresetsArchitectureAsObjectV1!predicate" + | doc "An optional object representing the platform for generators that support it. Available in version 1 and higher." = _js2n__-prdslib.allOf [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - (_js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.record - { - architecture = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.record - { - strategy = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType - '"String", - _js2n__-prdslib.enum - [ "set", "external" ] - ], - value = - _js2n__-prdslib.isType '"String", - } {} false _js2n__-prdslib.never - ] - ], - binaryDir = _js2n__-prdslib.isType '"String", - cacheVariables = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.propertyNames - (_js2n__-prdslib.strings.pattern "^.+$"), - _js2n__-prdslib.records.record {} {} true - (_js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType 'Null, - _js2n__-prdslib.isType '"Bool", - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required - [ "value" ], - _js2n__-prdslib.records.record - { - type = - _js2n__-prdslib.isType - '"String", - value = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType - '"Bool", - _js2n__-prdslib.isType - '"String" - ], - } {} false _js2n__-prdslib.never - ] - ]) + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + strategy = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "set", "external" ] + ], + value = _js2n__-prdslib.isType '"String", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/configurePresetsArchitectureAsObjectV10!predicate" + | doc "An optional object representing the platform for generators that support it. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/configurePresetsArchitectureAsStringV1!predicate" + | doc "An optional string representing the platform for generators that support it." + = _js2n__-prdslib.isType '"String", + "_js2n__-:definitions/configurePresetsArchitectureV1!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureAsStringV1!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureAsObjectV1!predicate", + _js2n__-prdslib.records.record + { + strategy = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/configurePresetsArchitectureV10!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureAsStringV1!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureAsObjectV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureAsObjectV1!predicate" + ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + strategy = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsBooleanV1!predicate" + | doc "A boolean representing the value of the variable. Equivalent to \"TRUE\" or \"FALSE\"." + = _js2n__-prdslib.isType '"Bool", + "_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsNullV1!predicate" + | doc "Setting a variable to null causes it to not be set, even if a value was inherited from another preset." + = _js2n__-prdslib.isType 'Null, + "_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsObjectV1!predicate" + | doc "An optional object representing the cache variables for generators that support it. Available in version 1 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + type = _js2n__-prdslib.isType '"String", + value = + _js2n__-prdslib.anyOf + [ + _js2n__-prdslib.isType '"Bool", + _js2n__-prdslib.isType '"String" + ], + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsObjectV10!predicate" + | doc "An optional object representing the cache variables for generators that support it. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsStringV1!predicate" + | doc "A string representing the value of the variable (which supports macro expansion)." + = _js2n__-prdslib.isType '"String", + "_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesV1!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsNullV1!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsBooleanV1!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsStringV1!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsObjectV1!predicate", + _js2n__-prdslib.records.required [ "value" ], + _js2n__-prdslib.records.record + { + type = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesV10!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsNullV1!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsBooleanV1!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsStringV1!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsObjectV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesAsObjectV1!predicate" + ], + _js2n__-prdslib.records.required [ "value" ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/configurePresetsItemsV1!predicate" + | doc "An optional array of configure preset objects. Available in version 1 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + binaryDir = _js2n__-prdslib.isType '"String", + cacheVariables = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.propertyNames + (_js2n__-prdslib.strings.pattern "^.+$"), + _js2n__-prdslib.records.record {} {} true + _js2n__-prdslib.always ], cmakeExecutable = _js2n__-prdslib.isType '"String", debug = @@ -1406,7 +1767,7 @@ let rec _js2n__-refsenv find = _js2n__-prdslib.isType '"Bool", output = _js2n__-prdslib.isType '"Bool", tryCompile = _js2n__-prdslib.isType '"Bool", - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], description = _js2n__-prdslib.isType '"String", displayName = _js2n__-prdslib.isType '"String", @@ -1431,7 +1792,7 @@ let rec _js2n__-refsenv { deprecated = _js2n__-prdslib.isType '"Bool", dev = _js2n__-prdslib.isType '"Bool", - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], generator = _js2n__-prdslib.isType '"String", hidden = _js2n__-prdslib.isType '"Bool", @@ -1460,28 +1821,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", _js2n__-prdslib.strings.minLength 1 ], - toolset = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.record - { - strategy = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType - '"String", - _js2n__-prdslib.enum - [ "set", "external" ] - ], - value = - _js2n__-prdslib.isType '"String", - } {} false _js2n__-prdslib.never - ] - ], vendor = _js2n__-prdslib.isType 'Record, warnings = _js2n__-prdslib.allOf @@ -1495,13 +1834,53 @@ let rec _js2n__-refsenv uninitialized = _js2n__-prdslib.isType '"Bool", unusedCli = _js2n__-prdslib.isType '"Bool", - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], } {} true _js2n__-prdslib.always ]) ], + "_js2n__-:definitions/configurePresetsItemsV10!predicate" + | doc "An optional array of configure preset objects. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + debug = + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always, + errors = + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always, + trace = + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always, + warnings = + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always, + } {} true _js2n__-prdslib.always + ]) + ], "_js2n__-:definitions/configurePresetsItemsV3!predicate" - | doc "A configure preset object." + | doc "An optional array of configure preset objects. Available in version 3 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", @@ -1512,8 +1891,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.record { binaryDir = _js2n__-prdslib.isType '"String", - condition = - _js2n__-refsenv."_js2n__-:definitions/topCondition!predicate", generator = _js2n__-prdslib.isType '"String", installDir = _js2n__-prdslib.isType '"String", toolchainFile = _js2n__-prdslib.isType '"String", @@ -1521,7 +1898,7 @@ let rec _js2n__-refsenv ]) ], "_js2n__-:definitions/configurePresetsItemsV7!predicate" - | doc "A configure preset object." + | doc "An optional array of configure preset objects. Available in version 7 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", @@ -1575,13 +1952,78 @@ let rec _js2n__-refsenv ]) ] ], - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], } {} true _js2n__-prdslib.always ]) ], + "_js2n__-:definitions/configurePresetsToolsetAsObjectV1!predicate" + | doc "An optional object representing the toolset for generators that support it. Available in version 1 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + strategy = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "set", "external" ] + ], + value = _js2n__-prdslib.isType '"String", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/configurePresetsToolsetAsObjectV10!predicate" + | doc "An optional object representing the toolset for generators that support it. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/configurePresetsToolsetAsStringV1!predicate" + | doc "An optional string representing the toolset for generators that support it." + = _js2n__-prdslib.isType '"String", + "_js2n__-:definitions/configurePresetsToolsetV1!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetAsStringV1!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetAsObjectV1!predicate", + _js2n__-prdslib.records.record + { + strategy = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/configurePresetsToolsetV10!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetAsStringV1!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetAsObjectV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetAsObjectV1!predicate" + ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + strategy = _js2n__-prdslib.always, + value = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], "_js2n__-:definitions/configurePresetsV1!predicate" - | doc "An optional array of configure preset objects." + | doc "An optional array of configure preset objects. Available in version 1 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", @@ -1592,34 +2034,134 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - architecture = _js2n__-prdslib.always, + architecture = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureV1!predicate", + binaryDir = _js2n__-prdslib.always, + cacheVariables = + _js2n__-prdslib.records.record {} {} true + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesV1!predicate", + cmakeExecutable = _js2n__-prdslib.always, + debug = + _js2n__-prdslib.records.record + { + find = _js2n__-prdslib.always, + output = _js2n__-prdslib.always, + tryCompile = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, + description = _js2n__-prdslib.always, + displayName = _js2n__-prdslib.always, + environment = _js2n__-prdslib.always, + errors = + _js2n__-prdslib.records.record + { + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, + generator = _js2n__-prdslib.always, + hidden = _js2n__-prdslib.always, + inherits = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + toolset = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetV1!predicate", + vendor = _js2n__-prdslib.always, + warnings = + _js2n__-prdslib.records.record + { + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + systemVars = _js2n__-prdslib.always, + uninitialized = _js2n__-prdslib.always, + unusedCli = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, + } {} false _js2n__-prdslib.never + ]) + ], + "_js2n__-:definitions/configurePresetsV10!predicate" + | doc "An optional array of configure preset objects. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV7!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV1!predicate" + ], + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.records.required [ "name" ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + architecture = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureV10!predicate", binaryDir = _js2n__-prdslib.always, - cacheVariables = _js2n__-prdslib.always, + cacheVariables = + _js2n__-prdslib.records.record {} {} true + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesV10!predicate", cmakeExecutable = _js2n__-prdslib.always, - debug = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV10!predicate", + debug = + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + find = _js2n__-prdslib.always, + output = _js2n__-prdslib.always, + tryCompile = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, description = _js2n__-prdslib.always, displayName = _js2n__-prdslib.always, environment = _js2n__-prdslib.always, - errors = _js2n__-prdslib.always, + errors = + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, generator = _js2n__-prdslib.always, hidden = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, + installDir = _js2n__-prdslib.always, name = _js2n__-prdslib.always, - toolset = _js2n__-prdslib.always, + toolchainFile = _js2n__-prdslib.always, + toolset = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetV10!predicate", + trace = + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + format = _js2n__-prdslib.always, + mode = _js2n__-prdslib.always, + redirect = _js2n__-prdslib.always, + source = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, vendor = _js2n__-prdslib.always, - warnings = _js2n__-prdslib.always, + warnings = + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + systemVars = _js2n__-prdslib.always, + uninitialized = _js2n__-prdslib.always, + unusedCli = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, } {} false _js2n__-prdslib.never ]) ], "_js2n__-:definitions/configurePresetsV3!predicate" - | doc "An optional array of configure preset objects." + | doc "An optional array of configure preset objects. Available in version 3 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", _js2n__-prdslib.allOf [ - _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV1!predicate", - _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV3!predicate" + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV1!predicate" ], _js2n__-prdslib.arrays.arrayOf (_js2n__-prdslib.allOf @@ -1627,38 +2169,62 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - architecture = _js2n__-prdslib.always, + architecture = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureV1!predicate", binaryDir = _js2n__-prdslib.always, - cacheVariables = _js2n__-prdslib.always, + cacheVariables = + _js2n__-prdslib.records.record {} {} true + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesV1!predicate", cmakeExecutable = _js2n__-prdslib.always, - condition = _js2n__-prdslib.always, - debug = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", + debug = + _js2n__-prdslib.records.record + { + find = _js2n__-prdslib.always, + output = _js2n__-prdslib.always, + tryCompile = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, description = _js2n__-prdslib.always, displayName = _js2n__-prdslib.always, environment = _js2n__-prdslib.always, - errors = _js2n__-prdslib.always, + errors = + _js2n__-prdslib.records.record + { + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, generator = _js2n__-prdslib.always, hidden = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, installDir = _js2n__-prdslib.always, name = _js2n__-prdslib.always, toolchainFile = _js2n__-prdslib.always, - toolset = _js2n__-prdslib.always, + toolset = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetV1!predicate", vendor = _js2n__-prdslib.always, - warnings = _js2n__-prdslib.always, + warnings = + _js2n__-prdslib.records.record + { + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + systemVars = _js2n__-prdslib.always, + uninitialized = _js2n__-prdslib.always, + unusedCli = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, } {} false _js2n__-prdslib.never ]) ], "_js2n__-:definitions/configurePresetsV7!predicate" - | doc "An optional array of configure preset objects." + | doc "An optional array of configure preset objects. Available in version 7 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", _js2n__-prdslib.allOf [ - _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV1!predicate", + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV7!predicate", _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV3!predicate", - _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV7!predicate" + _js2n__-refsenv."_js2n__-:definitions/configurePresetsItemsV1!predicate" ], _js2n__-prdslib.arrays.arrayOf (_js2n__-prdslib.allOf @@ -1666,26 +2232,57 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - architecture = _js2n__-prdslib.always, + architecture = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsArchitectureV1!predicate", binaryDir = _js2n__-prdslib.always, - cacheVariables = _js2n__-prdslib.always, + cacheVariables = + _js2n__-prdslib.records.record {} {} true + _js2n__-refsenv."_js2n__-:definitions/configurePresetsCacheVariablesAdditionalPropertiesV1!predicate", cmakeExecutable = _js2n__-prdslib.always, - condition = _js2n__-prdslib.always, - debug = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", + debug = + _js2n__-prdslib.records.record + { + find = _js2n__-prdslib.always, + output = _js2n__-prdslib.always, + tryCompile = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, description = _js2n__-prdslib.always, displayName = _js2n__-prdslib.always, environment = _js2n__-prdslib.always, - errors = _js2n__-prdslib.always, + errors = + _js2n__-prdslib.records.record + { + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, generator = _js2n__-prdslib.always, hidden = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, installDir = _js2n__-prdslib.always, name = _js2n__-prdslib.always, toolchainFile = _js2n__-prdslib.always, - toolset = _js2n__-prdslib.always, - trace = _js2n__-prdslib.always, + toolset = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsToolsetV1!predicate", + trace = + _js2n__-prdslib.records.record + { + format = _js2n__-prdslib.always, + mode = _js2n__-prdslib.always, + redirect = _js2n__-prdslib.always, + source = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, vendor = _js2n__-prdslib.always, - warnings = _js2n__-prdslib.always, + warnings = + _js2n__-prdslib.records.record + { + deprecated = _js2n__-prdslib.always, + dev = _js2n__-prdslib.always, + systemVars = _js2n__-prdslib.always, + uninitialized = _js2n__-prdslib.always, + unusedCli = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never, } {} false _js2n__-prdslib.never ]) ], @@ -1696,6 +2293,32 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"Array", _js2n__-prdslib.arrays.arrayOf (_js2n__-prdslib.isType '"String") ], + "_js2n__-:definitions/packagePresetsItemsV10!predicate" + | doc "An optional array of package preset objects. Used to specify arguments to cpack. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + output = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + } {} true _js2n__-prdslib.always + ]) + ], "_js2n__-:definitions/packagePresetsItemsV6!predicate" | doc "An optional array of package preset objects. Used to specify arguments to cpack. Available in version 6 and higher." = _js2n__-prdslib.allOf @@ -1705,11 +2328,8 @@ let rec _js2n__-refsenv (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - condition = - _js2n__-refsenv."_js2n__-:definitions/topCondition!predicate", configFile = _js2n__-prdslib.isType '"String", configurations = _js2n__-prdslib.allOf @@ -1782,7 +2402,7 @@ let rec _js2n__-refsenv { debug = _js2n__-prdslib.isType '"Bool", verbose = _js2n__-prdslib.isType '"Bool", - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], packageDirectory = _js2n__-prdslib.isType '"String", packageName = _js2n__-prdslib.isType '"String", @@ -1799,12 +2419,16 @@ let rec _js2n__-refsenv } {} true _js2n__-prdslib.always ]) ], - "_js2n__-:definitions/packagePresetsV6!predicate" - | doc "An optional array of package preset objects. Used to specify arguments to cpack. Available in version 6 and higher." + "_js2n__-:definitions/packagePresetsV10!predicate" + | doc "An optional array of package preset objects. Used to specify arguments to cpack. Available in version 10 and higher." = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType '"Array", - _js2n__-refsenv."_js2n__-:definitions/packagePresetsItemsV6!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/packagePresetsItemsV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/packagePresetsItemsV6!predicate" + ], _js2n__-prdslib.arrays.arrayOf (_js2n__-prdslib.allOf [ @@ -1812,7 +2436,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - condition = _js2n__-prdslib.always, + "$comment" = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV10!predicate", configFile = _js2n__-prdslib.always, configurations = _js2n__-prdslib.always, configurePreset = _js2n__-prdslib.always, @@ -1824,9 +2450,64 @@ let rec _js2n__-refsenv inheritConfigureEnvironment = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, name = _js2n__-prdslib.always, - output = _js2n__-prdslib.always, - packageDirectory = _js2n__-prdslib.always, - packageName = _js2n__-prdslib.always, + output = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + debug = _js2n__-prdslib.always, + verbose = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + packageDirectory = _js2n__-prdslib.always, + packageName = _js2n__-prdslib.always, + packageVersion = _js2n__-prdslib.always, + variables = _js2n__-prdslib.always, + vendor = _js2n__-prdslib.always, + vendorName = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ]) + ], + "_js2n__-:definitions/packagePresetsV6!predicate" + | doc "An optional array of package preset objects. Used to specify arguments to cpack. Available in version 6 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-refsenv."_js2n__-:definitions/packagePresetsItemsV6!predicate", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required [ "name" ], + _js2n__-prdslib.records.record + { + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", + configFile = _js2n__-prdslib.always, + configurations = _js2n__-prdslib.always, + configurePreset = _js2n__-prdslib.always, + description = _js2n__-prdslib.always, + displayName = _js2n__-prdslib.always, + environment = _js2n__-prdslib.always, + generators = _js2n__-prdslib.always, + hidden = _js2n__-prdslib.always, + inheritConfigureEnvironment = _js2n__-prdslib.always, + inherits = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + output = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + debug = _js2n__-prdslib.always, + verbose = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + packageDirectory = _js2n__-prdslib.always, + packageName = _js2n__-prdslib.always, packageVersion = _js2n__-prdslib.always, variables = _js2n__-prdslib.always, vendor = _js2n__-prdslib.always, @@ -1834,6 +2515,156 @@ let rec _js2n__-refsenv } {} false _js2n__-prdslib.never ]) ], + "_js2n__-:definitions/testPresetsFilterIncludeIndexAsObjectV10!predicate" + | doc "An optional object specifying tests to include by test index. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/testPresetsFilterIncludeIndexAsObjectV2!predicate" + | doc "An optional object specifying tests to include by test index. Available in version 2 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + end = _js2n__-prdslib.isType 'Integer, + specificTests = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType 'Integer) + ], + start = _js2n__-prdslib.isType 'Integer, + stride = _js2n__-prdslib.isType 'Integer, + } {} true _js2n__-prdslib.always + ], + "_js2n__-:definitions/testPresetsFilterIncludeIndexAsStringV2!predicate" + | doc "An optional string specifying a file with the command line syntax for --tests-information. Available in version 2 and higher." + = _js2n__-prdslib.isType '"String", + "_js2n__-:definitions/testPresetsFilterIncludeIndexV10!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexAsStringV2!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexAsObjectV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexAsObjectV2!predicate" + ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + end = _js2n__-prdslib.always, + specificTests = _js2n__-prdslib.always, + start = _js2n__-prdslib.always, + stride = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/testPresetsFilterIncludeIndexV2!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexAsStringV2!predicate", + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexAsObjectV2!predicate", + _js2n__-prdslib.records.record + { + end = _js2n__-prdslib.always, + specificTests = _js2n__-prdslib.always, + start = _js2n__-prdslib.always, + stride = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ] + ], + "_js2n__-:definitions/testPresetsItemsV10!predicate" + | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + execution = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + repeat = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + } {} true _js2n__-prdslib.always + ], + filter = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + exclude = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + fixtures = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true + _js2n__-prdslib.always + ], + } {} true _js2n__-prdslib.always + ], + include = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ], + } {} true _js2n__-prdslib.always + ], + } {} true _js2n__-prdslib.always + ]) + ], "_js2n__-:definitions/testPresetsItemsV2!predicate" | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 2 and higher." = _js2n__-prdslib.allOf @@ -1843,7 +2674,6 @@ let rec _js2n__-refsenv (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { configuration = _js2n__-prdslib.isType '"String", @@ -1890,8 +2720,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required - [ "count", "mode" ], _js2n__-prdslib.records.record { count = @@ -1909,7 +2737,7 @@ let rec _js2n__-refsenv "after-timeout" ] ], - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], resourceSpecFile = _js2n__-prdslib.isType '"String", @@ -1926,7 +2754,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"Bool", testLoad = _js2n__-prdslib.isType 'Integer, timeout = _js2n__-prdslib.isType 'Integer, - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], filter = _js2n__-prdslib.allOf @@ -1956,8 +2784,8 @@ let rec _js2n__-refsenv setup = _js2n__-prdslib.isType '"String", - } {} false - _js2n__-prdslib.never + } {} true + _js2n__-prdslib.always ], label = _js2n__-prdslib.isType @@ -1973,39 +2801,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { - index = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType - 'Record, - _js2n__-prdslib.records.record - { - end = - _js2n__-prdslib.isType - 'Integer, - specificTests = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType - '"Array", - _js2n__-prdslib.arrays.arrayOf - (_js2n__-prdslib.isType - 'Integer) - ], - start = - _js2n__-prdslib.isType - 'Integer, - stride = - _js2n__-prdslib.isType - 'Integer, - } {} false - _js2n__-prdslib.never - ], - _js2n__-prdslib.isType - '"String" - ], label = _js2n__-prdslib.isType '"String", @@ -2015,9 +2810,9 @@ let rec _js2n__-refsenv useUnion = _js2n__-prdslib.isType '"Bool", - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ], hidden = _js2n__-prdslib.isType '"Bool", inheritConfigureEnvironment = @@ -2093,20 +2888,7 @@ let rec _js2n__-refsenv ], "_js2n__-:definitions/testPresetsItemsV3!predicate" | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 3 and higher." - = _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - (_js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.record - { - condition = - _js2n__-refsenv."_js2n__-:definitions/topCondition!predicate", - } {} true _js2n__-prdslib.always - ]) - ], + = _js2n__-prdslib.isType '"Array", "_js2n__-:definitions/testPresetsItemsV5!predicate" | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 5 and higher." = _js2n__-prdslib.allOf @@ -2160,6 +2942,156 @@ let rec _js2n__-refsenv } {} true _js2n__-prdslib.always ]) ], + "_js2n__-:definitions/testPresetsV10!predicate" + | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV6!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV5!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV2!predicate" + ], + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required [ "name" ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV10!predicate", + configuration = _js2n__-prdslib.always, + configurePreset = _js2n__-prdslib.always, + description = _js2n__-prdslib.always, + displayName = _js2n__-prdslib.always, + environment = _js2n__-prdslib.always, + execution = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + enableFailover = _js2n__-prdslib.always, + interactiveDebugging = + _js2n__-prdslib.always, + jobs = _js2n__-prdslib.always, + noTestsAction = _js2n__-prdslib.always, + repeat = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "count", "mode" ], + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-prdslib.always, + count = _js2n__-prdslib.always, + mode = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + resourceSpecFile = _js2n__-prdslib.always, + scheduleRandom = _js2n__-prdslib.always, + showOnly = _js2n__-prdslib.always, + stopOnFailure = _js2n__-prdslib.always, + testLoad = _js2n__-prdslib.always, + timeout = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + filter = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + exclude = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-prdslib.always, + fixtures = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-prdslib.always, + any = + _js2n__-prdslib.always, + cleanup = + _js2n__-prdslib.always, + setup = + _js2n__-prdslib.always, + } {} false + _js2n__-prdslib.never + ], + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + include = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-prdslib.always, + index = + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexV10!predicate", + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + useUnion = + _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + } {} false _js2n__-prdslib.never + ], + hidden = _js2n__-prdslib.always, + inheritConfigureEnvironment = _js2n__-prdslib.always, + inherits = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + output = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + debug = _js2n__-prdslib.always, + labelSummary = _js2n__-prdslib.always, + maxFailedTestOutputSize = + _js2n__-prdslib.always, + maxPassedTestOutputSize = + _js2n__-prdslib.always, + maxTestNameWidth = _js2n__-prdslib.always, + outputJUnitFile = _js2n__-prdslib.always, + outputLogFile = _js2n__-prdslib.always, + outputOnFailure = _js2n__-prdslib.always, + quiet = _js2n__-prdslib.always, + shortProgress = _js2n__-prdslib.always, + subprojectSummary = _js2n__-prdslib.always, + testOutputTruncation = + _js2n__-prdslib.always, + verbosity = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + overwriteConfigurationFile = _js2n__-prdslib.always, + vendor = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ]) + ], "_js2n__-:definitions/testPresetsV2!predicate" | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 2 and higher." = _js2n__-prdslib.allOf @@ -2178,8 +3110,85 @@ let rec _js2n__-refsenv description = _js2n__-prdslib.always, displayName = _js2n__-prdslib.always, environment = _js2n__-prdslib.always, - execution = _js2n__-prdslib.always, - filter = _js2n__-prdslib.always, + execution = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + enableFailover = _js2n__-prdslib.always, + interactiveDebugging = + _js2n__-prdslib.always, + jobs = _js2n__-prdslib.always, + noTestsAction = _js2n__-prdslib.always, + repeat = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "count", "mode" ], + _js2n__-prdslib.records.record + { + count = _js2n__-prdslib.always, + mode = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + resourceSpecFile = _js2n__-prdslib.always, + scheduleRandom = _js2n__-prdslib.always, + showOnly = _js2n__-prdslib.always, + stopOnFailure = _js2n__-prdslib.always, + testLoad = _js2n__-prdslib.always, + timeout = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + filter = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + exclude = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + fixtures = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + any = + _js2n__-prdslib.always, + cleanup = + _js2n__-prdslib.always, + setup = + _js2n__-prdslib.always, + } {} false + _js2n__-prdslib.never + ], + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + include = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + index = + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexV2!predicate", + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + useUnion = + _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + } {} false _js2n__-prdslib.never + ], hidden = _js2n__-prdslib.always, inheritConfigureEnvironment = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, @@ -2205,36 +3214,114 @@ let rec _js2n__-refsenv verbosity = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ], - overwriteConfigurationFile = _js2n__-prdslib.always, - vendor = _js2n__-prdslib.always, - } {} false _js2n__-prdslib.never - ]) - ], - "_js2n__-:definitions/testPresetsV3!predicate" - | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 3 and higher." - = _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.allOf - [ - _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV2!predicate", - _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV3!predicate" - ], - _js2n__-prdslib.arrays.arrayOf - (_js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "name" ], - _js2n__-prdslib.records.record - { - condition = _js2n__-prdslib.always, - configuration = _js2n__-prdslib.always, - configurePreset = _js2n__-prdslib.always, - description = _js2n__-prdslib.always, - displayName = _js2n__-prdslib.always, - environment = _js2n__-prdslib.always, - execution = _js2n__-prdslib.always, - filter = _js2n__-prdslib.always, + overwriteConfigurationFile = _js2n__-prdslib.always, + vendor = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ]) + ], + "_js2n__-:definitions/testPresetsV3!predicate" + | doc "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 3 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV2!predicate" + ], + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required [ "name" ], + _js2n__-prdslib.records.record + { + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", + configuration = _js2n__-prdslib.always, + configurePreset = _js2n__-prdslib.always, + description = _js2n__-prdslib.always, + displayName = _js2n__-prdslib.always, + environment = _js2n__-prdslib.always, + execution = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + enableFailover = _js2n__-prdslib.always, + interactiveDebugging = + _js2n__-prdslib.always, + jobs = _js2n__-prdslib.always, + noTestsAction = _js2n__-prdslib.always, + repeat = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "count", "mode" ], + _js2n__-prdslib.records.record + { + count = _js2n__-prdslib.always, + mode = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + resourceSpecFile = _js2n__-prdslib.always, + scheduleRandom = _js2n__-prdslib.always, + showOnly = _js2n__-prdslib.always, + stopOnFailure = _js2n__-prdslib.always, + testLoad = _js2n__-prdslib.always, + timeout = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + filter = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + exclude = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + fixtures = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + any = + _js2n__-prdslib.always, + cleanup = + _js2n__-prdslib.always, + setup = + _js2n__-prdslib.always, + } {} false + _js2n__-prdslib.never + ], + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + include = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + index = + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexV2!predicate", + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + useUnion = + _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + } {} false _js2n__-prdslib.never + ], hidden = _js2n__-prdslib.always, inheritConfigureEnvironment = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, @@ -2272,9 +3359,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"Array", _js2n__-prdslib.allOf [ - _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV2!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV5!predicate", _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV3!predicate", - _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV5!predicate" + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV2!predicate" ], _js2n__-prdslib.arrays.arrayOf (_js2n__-prdslib.allOf @@ -2283,14 +3370,92 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - condition = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", configuration = _js2n__-prdslib.always, configurePreset = _js2n__-prdslib.always, description = _js2n__-prdslib.always, displayName = _js2n__-prdslib.always, environment = _js2n__-prdslib.always, - execution = _js2n__-prdslib.always, - filter = _js2n__-prdslib.always, + execution = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + enableFailover = _js2n__-prdslib.always, + interactiveDebugging = + _js2n__-prdslib.always, + jobs = _js2n__-prdslib.always, + noTestsAction = _js2n__-prdslib.always, + repeat = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "count", "mode" ], + _js2n__-prdslib.records.record + { + count = _js2n__-prdslib.always, + mode = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + resourceSpecFile = _js2n__-prdslib.always, + scheduleRandom = _js2n__-prdslib.always, + showOnly = _js2n__-prdslib.always, + stopOnFailure = _js2n__-prdslib.always, + testLoad = _js2n__-prdslib.always, + timeout = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + filter = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + exclude = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + fixtures = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + any = + _js2n__-prdslib.always, + cleanup = + _js2n__-prdslib.always, + setup = + _js2n__-prdslib.always, + } {} false + _js2n__-prdslib.never + ], + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + include = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + index = + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexV2!predicate", + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + useUnion = + _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + } {} false _js2n__-prdslib.never + ], hidden = _js2n__-prdslib.always, inheritConfigureEnvironment = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, @@ -2330,10 +3495,10 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"Array", _js2n__-prdslib.allOf [ - _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV2!predicate", - _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV6!predicate", _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV5!predicate", - _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV6!predicate" + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/testPresetsItemsV2!predicate" ], _js2n__-prdslib.arrays.arrayOf (_js2n__-prdslib.allOf @@ -2342,14 +3507,92 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - condition = _js2n__-prdslib.always, + condition = + _js2n__-refsenv."_js2n__-:definitions/topConditionV3!predicate", configuration = _js2n__-prdslib.always, configurePreset = _js2n__-prdslib.always, description = _js2n__-prdslib.always, displayName = _js2n__-prdslib.always, environment = _js2n__-prdslib.always, - execution = _js2n__-prdslib.always, - filter = _js2n__-prdslib.always, + execution = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + enableFailover = _js2n__-prdslib.always, + interactiveDebugging = + _js2n__-prdslib.always, + jobs = _js2n__-prdslib.always, + noTestsAction = _js2n__-prdslib.always, + repeat = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "count", "mode" ], + _js2n__-prdslib.records.record + { + count = _js2n__-prdslib.always, + mode = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + resourceSpecFile = _js2n__-prdslib.always, + scheduleRandom = _js2n__-prdslib.always, + showOnly = _js2n__-prdslib.always, + stopOnFailure = _js2n__-prdslib.always, + testLoad = _js2n__-prdslib.always, + timeout = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + filter = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + exclude = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + fixtures = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + any = + _js2n__-prdslib.always, + cleanup = + _js2n__-prdslib.always, + setup = + _js2n__-prdslib.always, + } {} false + _js2n__-prdslib.never + ], + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + include = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + index = + _js2n__-refsenv."_js2n__-:definitions/testPresetsFilterIncludeIndexV2!predicate", + label = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + useUnion = + _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ], + } {} false _js2n__-prdslib.never + ], hidden = _js2n__-prdslib.always, inheritConfigureEnvironment = _js2n__-prdslib.always, inherits = _js2n__-prdslib.always, @@ -2383,15 +3626,55 @@ let rec _js2n__-refsenv } {} false _js2n__-prdslib.never ]) ], - "_js2n__-:definitions/topCondition!predicate" = + "_js2n__-:definitions/topConditionAsNullV3!predicate" + | doc "Null indicates that the condition always evaluates to true and is not inherited." + = _js2n__-prdslib.isType 'Null, + "_js2n__-:definitions/topConditionV10!predicate" = _js2n__-prdslib.anyOf [ - _js2n__-refsenv."_js2n__-:definitions/condition!predicate", - _js2n__-prdslib.isType 'Null + _js2n__-refsenv."_js2n__-:definitions/conditionV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/topConditionAsNullV3!predicate" + ], + "_js2n__-:definitions/topConditionV3!predicate" = + _js2n__-prdslib.anyOf + [ + _js2n__-refsenv."_js2n__-:definitions/conditionV3!predicate", + _js2n__-refsenv."_js2n__-:definitions/topConditionAsNullV3!predicate" ], "_js2n__-:definitions/vendor!predicate" | doc "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, the keys should be a vendor-specific domain name followed by a /-separated path. For example, the Example IDE 1.0 could use example.com/ExampleIDE/1.0. The value of each field can be anything desired by the vendor, though will typically be a map." = _js2n__-prdslib.isType 'Record, + "_js2n__-:definitions/workflowPresetsItemsV10!predicate" + | doc "An optional array of workflow preset objects. Used to execute configure, build, test, and package presets in order. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + steps = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + } {} true _js2n__-prdslib.always + ]) + ], + } {} true _js2n__-prdslib.always + ]) + ], "_js2n__-:definitions/workflowPresetsItemsV6!predicate" | doc "An optional array of workflow preset objects. Used to execute configure, build, test, and package presets in order. Available in version 6 and higher." = _js2n__-prdslib.allOf @@ -2401,7 +3684,6 @@ let rec _js2n__-refsenv (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "name", "steps" ], _js2n__-prdslib.records.record { description = _js2n__-prdslib.isType '"String", @@ -2420,8 +3702,6 @@ let rec _js2n__-refsenv (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required - [ "name", "type" ], _js2n__-prdslib.records.record { name = @@ -2445,10 +3725,53 @@ let rec _js2n__-refsenv "package" ] ], - } {} false _js2n__-prdslib.never + } {} true _js2n__-prdslib.always ]) ], vendor = _js2n__-prdslib.isType 'Record, + } {} true _js2n__-prdslib.always + ]) + ], + "_js2n__-:definitions/workflowPresetsV10!predicate" + | doc "An optional array of workflow preset objects. Used to execute configure, build, test, and package presets in order. Available in version 10 and higher." + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.allOf + [ + _js2n__-refsenv."_js2n__-:definitions/workflowPresetsItemsV10!predicate", + _js2n__-refsenv."_js2n__-:definitions/workflowPresetsItemsV6!predicate" + ], + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required [ "name", "steps" ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + description = _js2n__-prdslib.always, + displayName = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + steps = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "name", "type" ], + _js2n__-prdslib.records.record + { + "$comment" = _js2n__-prdslib.always, + name = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ]) + ], + vendor = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ]) ], @@ -2468,7 +3791,23 @@ let rec _js2n__-refsenv description = _js2n__-prdslib.always, displayName = _js2n__-prdslib.always, name = _js2n__-prdslib.always, - steps = _js2n__-prdslib.always, + steps = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "name", "type" ], + _js2n__-prdslib.records.record + { + name = _js2n__-prdslib.always, + type = _js2n__-prdslib.always, + } {} false _js2n__-prdslib.never + ]) + ], vendor = _js2n__-prdslib.always, } {} false _js2n__-prdslib.never ]) @@ -2484,7 +3823,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.record { cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV1!predicate", vendor = @@ -2496,7 +3835,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV2!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV1!predicate", testPresets = @@ -2510,7 +3849,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV3!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV3!predicate", testPresets = @@ -2524,7 +3863,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV4!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV3!predicate", include = @@ -2540,7 +3879,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV4!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV3!predicate", include = @@ -2556,7 +3895,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV4!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV3!predicate", include = @@ -2576,7 +3915,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV4!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV7!predicate", include = @@ -2598,7 +3937,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV4!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV7!predicate", include = @@ -2620,7 +3959,7 @@ let rec _js2n__-refsenv buildPresets = _js2n__-refsenv."_js2n__-:definitions/buildPresetsV4!predicate", cmakeMinimumRequired = - _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequired!predicate", + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV1!predicate", configurePresets = _js2n__-refsenv."_js2n__-:definitions/configurePresetsV7!predicate", include = @@ -2634,6 +3973,30 @@ let rec _js2n__-refsenv version = _js2n__-prdslib.const 9, workflowPresets = _js2n__-refsenv."_js2n__-:definitions/workflowPresetsV6!predicate", + } {} false _js2n__-prdslib.never, + _js2n__-prdslib.records.record + { + "$comment" = + _js2n__-refsenv."_js2n__-:definitions/$comment!predicate", + "$schema" = + _js2n__-refsenv."_js2n__-:definitions/$schema!predicate", + buildPresets = + _js2n__-refsenv."_js2n__-:definitions/buildPresetsV10!predicate", + cmakeMinimumRequired = + _js2n__-refsenv."_js2n__-:definitions/cmakeMinimumRequiredV10!predicate", + configurePresets = + _js2n__-refsenv."_js2n__-:definitions/configurePresetsV10!predicate", + include = + _js2n__-refsenv."_js2n__-:definitions/include!predicate", + packagePresets = + _js2n__-refsenv."_js2n__-:definitions/packagePresetsV10!predicate", + testPresets = + _js2n__-refsenv."_js2n__-:definitions/testPresetsV10!predicate", + vendor = + _js2n__-refsenv."_js2n__-:definitions/vendor!predicate", + version = _js2n__-prdslib.const 10, + workflowPresets = + _js2n__-refsenv."_js2n__-:definitions/workflowPresetsV10!predicate", } {} false _js2n__-prdslib.never ], _js2n__-prdslib.records.required [ "version" ], diff --git a/out/CodeRabbit.ncl b/out/CodeRabbit.ncl index 93f8374..f07ff2b 100644 --- a/out/CodeRabbit.ncl +++ b/out/CodeRabbit.ncl @@ -1161,6 +1161,15 @@ let rec _js2n__-refsenv } | doc "Biome is a fast formatter, linter, and analyzer for web projects." | optional, + checkov + | { + enabled + | Bool + | doc "Enable Checkov | Checkov is a static code analysis tool for infrastructure-as-code files." + | optional, + } + | doc "Checkov is a static code analysis tool for infrastructure-as-code files." + | optional, github-checks | { enabled diff --git a/out/Cycle Stack File.ncl b/out/Cycle Stack File.ncl index beeea64..d28bce3 100644 --- a/out/Cycle Stack File.ncl +++ b/out/Cycle Stack File.ncl @@ -4588,16 +4588,12 @@ let rec _js2n__-refsenv 'Record, _js2n__-prdslib.records.required [ - "delta", "max", "max_server", "min_ttl" ], _js2n__-prdslib.records.record { - delta = - _js2n__-prdslib.isType - 'Integer, max = _js2n__-prdslib.isType 'Integer, @@ -4639,11 +4635,11 @@ let rec _js2n__-refsenv 'Record, _js2n__-prdslib.records.required [ - "used" + "usage" ], _js2n__-prdslib.records.record { - used = + usage = _js2n__-prdslib.isType '"String", } diff --git a/out/DashLord Configuration.ncl b/out/DashLord Configuration.ncl index 68b63b0..c626a82 100644 --- a/out/DashLord Configuration.ncl +++ b/out/DashLord Configuration.ncl @@ -897,112 +897,158 @@ let _js2n__-prdslib in let rec _js2n__-refsenv = { - "_js2n__-:definitions/tools!contract" = - { - "404" | Bool | doc "Enable 404 detection" | optional, - betagouv | Bool | doc "Enable betagouv API data" | optional, - budget_page | Bool | doc "Enable budget page detection" | optional, - codescan | Bool | doc "Enable codescan alerts" | optional, - declaration-a11y - | Bool - | doc "Enable declaration a11y scan" - | optional, - declaration-rgpd - | Bool - | doc "Enable declaration RGPD scan" - | optional, - dependabot | Bool | doc "Enable dependabot alerts" | optional, - dsfr | Bool | doc "Enable DSFR detection" | optional, - ecoindex | Bool | doc "Enable ecoindex scan" | optional, - github_repository - | Bool - | doc "Enable GitHub repository detection (from betagouv data)" - | optional, - http | Bool | doc "Enable Mozilla HTTP Observatory scan" | optional, - lighthouse | Bool | doc "Enable Lighthouse" | optional, - nmap | Bool | doc "Enable nmapvuln scan" | optional, - nuclei | Bool | doc "Enable nuclei scan" | optional, - screenshot | Bool | doc "Enable screenshots" | optional, - sonarcloud | Bool | doc "Enable sonarcloud API results" | optional, - stats | Bool | doc "Enable /stats page check" | optional, - testssl | Bool | doc "Enable testssl.sh" | optional, - thirdparties | Bool | doc "Enable thirdparties scan" | optional, - trivy | Bool | doc "Enable trivy docker scans" | optional, - updownio | Bool | doc "Enable updown.io metrics" | optional, - wappalyzer | Bool | doc "Enable wappalyzer scan" | optional, - zap | Bool | doc "Enable ZaProxy baseline scan" | optional, - }, + "_js2n__-:definitions/tools!predicate" = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + "404" = _js2n__-prdslib.isType '"Bool", + betagouv = _js2n__-prdslib.isType '"Bool", + budget_page = _js2n__-prdslib.isType '"Bool", + codescan = _js2n__-prdslib.isType '"Bool", + declaration-a11y = _js2n__-prdslib.isType '"Bool", + declaration-rgpd = _js2n__-prdslib.isType '"Bool", + dependabot = _js2n__-prdslib.isType '"Bool", + dsfr = _js2n__-prdslib.isType '"Bool", + ecoindex = _js2n__-prdslib.isType '"Bool", + github_repository = _js2n__-prdslib.isType '"Bool", + http = _js2n__-prdslib.isType '"Bool", + lighthouse = _js2n__-prdslib.isType '"Bool", + nmap = _js2n__-prdslib.isType '"Bool", + nuclei = _js2n__-prdslib.isType '"Bool", + screenshot = _js2n__-prdslib.isType '"Bool", + sonarcloud = _js2n__-prdslib.isType '"Bool", + stats = _js2n__-prdslib.isType '"Bool", + testssl = _js2n__-prdslib.isType '"Bool", + thirdparties = _js2n__-prdslib.isType '"Bool", + trivy = _js2n__-prdslib.isType '"Bool", + updownio = _js2n__-prdslib.isType '"Bool", + wappalyzer = _js2n__-prdslib.isType '"Bool", + zap = _js2n__-prdslib.isType '"Bool", + } {} false _js2n__-prdslib.never + ], } in - { - colmuns - | _js2n__-refsenv."_js2n__-:definitions/tools!contract" - | optional, - description | String | doc "Sous-titre du dashlord", - entity | String | doc "Nom de votre entité", - footer | String | doc "Message dans le footer" | optional, - loginUrl | String | optional, - marianne | Bool | doc "Affiche ou pas la Marianne" | optional, - matomoId | Number | optional, - matomoUrl | String | optional, - operator - | { - logo - | _js2n__-prdslib.contract_from_predicate - (_js2n__-prdslib.oneOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.allOf + _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "description", "entity", "title", "tools", "urls" ], + _js2n__-prdslib.records.record + { + columns = _js2n__-refsenv."_js2n__-:definitions/tools!predicate", + description = _js2n__-prdslib.isType '"String", + entity = _js2n__-prdslib.isType '"String", + footer = _js2n__-prdslib.isType '"String", + loginUrl = _js2n__-prdslib.isType '"String", + marianne = _js2n__-prdslib.isType '"Bool", + matomoId = _js2n__-prdslib.isType '"Number", + matomoUrl = _js2n__-prdslib.isType '"String", + operator = + _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "src" ], + _js2n__-prdslib.records.required [ "logo", "name" ], _js2n__-prdslib.records.record { - direction = - _js2n__-prdslib.allOf + logo = + _js2n__-prdslib.oneOf [ _js2n__-prdslib.isType '"String", - _js2n__-prdslib.enum - [ "horizontal", "vertical" ] + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "src" ], + _js2n__-prdslib.records.record + { + direction = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"String", + _js2n__-prdslib.enum + [ "horizontal", "vertical" ] + ], + src = + _js2n__-prdslib.isType '"String", + } {} true _js2n__-prdslib.always + ] ], - src = _js2n__-prdslib.isType '"String", + name = _js2n__-prdslib.isType '"String", } {} true _js2n__-prdslib.always - ] - ]), - name | String, - .. - } - | doc "Ajoute un logo d'opérateur. Soit une URL, soit un objet avec src et direction" - | optional, - title | String | doc "Titre du DashLord", - tools | _js2n__-refsenv."_js2n__-:definitions/tools!contract", - updownioRecipients - | Array (String) - | doc "Notifications pour les nouvelles alertes updown.io (action updown-init)" - | optional, - updownioStatusPage - | String - | doc "URL de la page de status updown.io" - | optional, - urls - | Array - { - betaId | String | optional, - category | String | optional, - docker | Array (String) | doc "Docker images to scan" | optional, - pages - | Array (String) - | doc "Additionnal URLs to scan with LightHouse" - | optional, - repositories - | Array (String) - | doc "Repositories no GitHub" - | optional, - tags | Array (String) | optional, - title | String | optional, - tools - | _js2n__-refsenv."_js2n__-:definitions/tools!contract" - | optional, - url | String, - }, - } \ No newline at end of file + ], + title = _js2n__-prdslib.isType '"String", + tools = _js2n__-refsenv."_js2n__-:definitions/tools!predicate", + updownioRecipients = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], + updownioStatusPage = _js2n__-prdslib.isType '"String", + urls = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required [ "url" ], + _js2n__-prdslib.records.record + { + betaId = _js2n__-prdslib.isType '"String", + category = _js2n__-prdslib.isType '"String", + docker = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], + pages = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], + repositories = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], + tags = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], + title = _js2n__-prdslib.isType '"String", + tools = + _js2n__-refsenv."_js2n__-:definitions/tools!predicate", + url = _js2n__-prdslib.isType '"String", + } {} false _js2n__-prdslib.never + ]) + ], + } + { + "^_.*" = + _js2n__-prdslib.anyOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.isType '"Number", + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.isType '"Bool", + _js2n__-prdslib.isType 'Null + ], + } false _js2n__-prdslib.never + ]) \ No newline at end of file diff --git a/out/Data Contract Specification.ncl b/out/Data Contract Specification.ncl index a4bd99d..78b7bf5 100644 --- a/out/Data Contract Specification.ncl +++ b/out/Data Contract Specification.ncl @@ -953,6 +953,17 @@ let rec _js2n__-refsenv format = _js2n__-prdslib.isType '"String", items = _js2n__-refsenv."_js2n__-:properties/models/additionalProperties/properties/fields/additionalProperties!predicate", + links = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.minProperties 1, + _js2n__-prdslib.records.propertyNames + (_js2n__-prdslib.strings.pattern + "^[a-zA-Z0-9_-]+$"), + _js2n__-prdslib.records.record {} {} true + (_js2n__-prdslib.isType '"String") + ], maxLength = _js2n__-prdslib.isType 'Integer, maximum = _js2n__-prdslib.isType '"Number", minLength = _js2n__-prdslib.isType 'Integer, @@ -1004,6 +1015,17 @@ let rec _js2n__-refsenv exclusiveMaximum = _js2n__-prdslib.isType '"Number", exclusiveMinimum = _js2n__-prdslib.isType '"Number", format = _js2n__-prdslib.isType '"String", + links = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.minProperties 1, + _js2n__-prdslib.records.propertyNames + (_js2n__-prdslib.strings.pattern + "^[a-zA-Z0-9_-]+$"), + _js2n__-prdslib.records.record {} {} true + (_js2n__-prdslib.isType '"String") + ], maxLength = _js2n__-prdslib.isType 'Integer, maximum = _js2n__-prdslib.isType '"Number", minLength = _js2n__-prdslib.isType 'Integer, @@ -1094,6 +1116,19 @@ let rec _js2n__-refsenv .. } | doc "Metadata and life cycle information about the data contract.", + links + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.minProperties 1, + _js2n__-prdslib.records.propertyNames + (_js2n__-prdslib.strings.pattern "^[a-zA-Z0-9_-]+$"), + _js2n__-prdslib.records.record {} {} true + (_js2n__-prdslib.isType '"String") + ]) + | doc "Links to external resources." + | optional, models | _js2n__-prdslib.contract_from_predicate (_js2n__-prdslib.allOf @@ -1221,6 +1256,21 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", items = _js2n__-refsenv."_js2n__-:properties/models/additionalProperties/properties/fields/additionalProperties!predicate", + links = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.minProperties + 1, + _js2n__-prdslib.records.propertyNames + (_js2n__-prdslib.strings.pattern + "^[a-zA-Z0-9_-]+$"), + _js2n__-prdslib.records.record + {} {} true + (_js2n__-prdslib.isType + '"String") + ], maxLength = _js2n__-prdslib.isType 'Integer, maximum = @@ -1319,7 +1369,11 @@ let rec _js2n__-refsenv (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.record {} {} true + _js2n__-prdslib.records.record + { + description = _js2n__-prdslib.isType '"String", + environment = _js2n__-prdslib.isType '"String", + } {} true (_js2n__-prdslib.oneOf [ _js2n__-prdslib.allOf @@ -1621,6 +1675,25 @@ let rec _js2n__-refsenv ], } {} true _js2n__-prdslib.always ], + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.required + [ "catalog", "host", "port", "schema", "type" ], + _js2n__-prdslib.records.record + { + catalog = _js2n__-prdslib.isType '"String", + host = _js2n__-prdslib.isType '"String", + port = _js2n__-prdslib.isType 'Integer, + schema = _js2n__-prdslib.isType '"String", + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.const "trino" + ], + } {} true _js2n__-prdslib.always + ], _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, @@ -1819,6 +1892,10 @@ let rec _js2n__-refsenv } | doc "Specifies the service level agreements for the provided data, including availability, data retention policies, latency requirements, data freshness, update frequency, support availability, and backup policies." | optional, + tags + | Array (String) + | doc "Tags to facilitate searching and filtering." + | optional, terms | { billing diff --git a/out/Datahub Ingestion Recipe.ncl b/out/Datahub Ingestion Recipe.ncl index c2c34c0..95223d9 100644 --- a/out/Datahub Ingestion Recipe.ncl +++ b/out/Datahub Ingestion Recipe.ncl @@ -3663,12 +3663,7 @@ let rec _js2n__-refsenv [ _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record {} {} true - (_js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.record {} {} true - (_js2n__-prdslib.isType '"String") - ]) + (_js2n__-prdslib.isType 'Record) ], env = _js2n__-prdslib.isType '"String", group_ownership_property = _js2n__-prdslib.isType '"String", @@ -5656,7 +5651,9 @@ let rec _js2n__-refsenv include_assertion_results = _js2n__-prdslib.isType '"Bool", include_column_lineage = _js2n__-prdslib.isType '"Bool", include_external_url = _js2n__-prdslib.isType '"Bool", + include_foreign_keys = _js2n__-prdslib.isType '"Bool", include_operational_stats = _js2n__-prdslib.isType '"Bool", + include_primary_keys = _js2n__-prdslib.isType '"Bool", include_read_operational_stats = _js2n__-prdslib.isType '"Bool", include_table_lineage = _js2n__-prdslib.isType '"Bool", @@ -5670,6 +5667,7 @@ let rec _js2n__-refsenv include_view_lineage = _js2n__-prdslib.isType '"Bool", include_views = _js2n__-prdslib.isType '"Bool", incremental_lineage = _js2n__-prdslib.isType '"Bool", + lazy_schema_resolver = _js2n__-prdslib.isType '"Bool", match_fully_qualified_names = _js2n__-prdslib.isType '"Bool", oauth_config = _js2n__-refsenv."_js2n__-:definitions/OAuthConfiguration!predicate", diff --git a/out/EveryVoice TTS Toolkit Aligner Configuration.ncl b/out/EveryVoice TTS Toolkit Aligner Configuration.ncl new file mode 100644 index 0000000..e8a6eb1 --- /dev/null +++ b/out/EveryVoice TTS Toolkit Aligner Configuration.ncl @@ -0,0 +1,941 @@ +# DO NOT EDIT +# This file was automatically generated using json-schema-to-nickel +let _js2n__-prdslib + = { + allOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `allOf preds` succeeds if all of the predicates in `preds` succeed + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1] + "% + = fun + preds + x + => + std.array.fold_right + (fun pred acc => (match { 'Ok => acc, 'Err s => 'Err s, }) (pred x)) + 'Ok preds, + always : Dyn -> [| 'Ok, 'Err String |] = std.function.const 'Ok, + anyOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `anyOf preds` succeeds if at least one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2] + "% + = fun + preds + x + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + anyOf: none of the options matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + pred + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) preds), + arrays = + { + additionalItems + : (Dyn -> [| 'Ok, 'Err String |]) + -> Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2]" + = fun + pred + start + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let value_length + = std.array.length x + in + if start >= value_length then + 'Ok + else + arrayOf pred + ((std.array.slice start value_length x) + | Dyn), + arrayOf + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Apply a predicate to all elements of an array, succeeding if all + applications succeed. + "% + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + std.array.fold_right + (fun + x + acc + => + (match { 'Ok => acc, 'Err msg => 'Err msg, }) (pred x)) + 'Ok x, + contains + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6]" + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + contains: no elements matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + x + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) x), + items + : Array (Dyn -> [| 'Ok, 'Err String |]) + -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1]" + = fun + preds + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let length_to_check + = std.number.min (std.array.length preds) + (std.array.length x) + in + std.array.fold_right + (fun + i + acc + => + (match { 'Err msg => 'Err msg, 'Ok => acc, }) + (std.array.at i preds (std.array.at i x))) 'Ok + (std.array.range 0 length_to_check), + maxItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxItems n x` fails if `x` is an array of length strictly greater than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.3] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) > n then + 'Err + "array is longer than %{std.string.from_number n} items" + else + 'Ok, + minItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minItems n x` fails if `x` is an array of length strictly smaller than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.4] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) < n then + 'Err + "array is shorter than %{std.string.from_number n} items" + else + 'Ok, + uniqueItems + : Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Succeeds for any array if its elements are pairwise distinct. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.5] + "% + = let find_duplicate + : Array Dyn + -> { + has_duplicate : Bool, + duplicate : Dyn, + seen : { _ : Bool } + } + = std.array.fold_right + (fun + elt + acc + => + if acc.has_duplicate then + acc + else + let index + = std.serialize 'Json elt + in + if std.record.has_field index acc.seen then + { + duplicate = elt, + has_duplicate = true, + seen = acc.seen, + } + else + { + duplicate = null, + has_duplicate = false, + seen = std.record.insert index true acc.seen, + }) + { duplicate = null, has_duplicate = false, seen = {}, } + in + fun + x + => + if !(std.is_array x) then + 'Ok + else + let { has_duplicate, duplicate, .. } + = find_duplicate (x | Array Dyn) + in + if has_duplicate then + 'Err "duplicate found: %{std.serialize 'Json duplicate}" + else + 'Ok, + }, + const + : Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `const value x` succeeds if and only if `x` is equal to `value` + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.3] + "% + = fun + value + x + => + if x == value then + 'Ok + else + 'Err "expected %{std.serialize 'Json value}", + contract_from_predicate + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> Dyn -> Dyn + = fun + predicate + label + value + => + (match { + 'Ok => + value, + 'Err + msg => + (std.contract.blame_with_message msg label) + | Dyn, + }) (predicate value), + enum + : Array Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `enum values x` succeeds if and only if `x` is equal to one of the elements of `values`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.2] + "% + = let checkEqual + = fun + input + variant + => + (input == variant) + || ((std.is_enum input) + && (((std.string.from_enum input) == variant) + | Bool)) + in + fun + values + x + => + std.array.fold_right + (fun value acc => if checkEqual x value then 'Ok else acc) + ('Err "expected one of %{std.serialize 'Json (values | Dyn)}") + values, + from_simple_predicate + : String -> (Dyn -> Bool) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Convert a simple boolean predicate into a predicate supporting error messages" + = fun error' pred x => if pred x then 'Ok else 'Err error', + ifThenElse + : (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `ifThenElse i t e` first checks if the predicate `i` succeeds. If it does, it's equivalent to `t`, otherwise it's equivalent to `e`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6] + "% + = fun i t e x => (match { 'Ok => t x, 'Err msg => e x, }) (i x), + isType + : [| '"Array", '"Bool", 'Integer, 'Null, '"Number", 'Record, '"String" |] + -> Dyn -> [| 'Ok, 'Err String |] + = fun + t + => + (match { + 'Null => + from_simple_predicate "expected `null`" (fun x => x == null), + 'Integer => + from_simple_predicate "expected an integer" + (fun + x + => + (std.is_number x) && (std.number.is_integer (x | Number))), + _ => + from_simple_predicate + "value is not of type %{std.string.from_enum t}" + (fun x => (std.typeof x) == t), + }) t, + never : Dyn -> [| 'Ok, 'Err String |] = std.function.const ('Err "never"), + not + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `not pred` succeeds if and only if `pred` fails + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4] + "% + = fun + pred + x + => + (match { + 'Ok => + 'Err "Inverted predicate succeeded unexpectedly", + 'Err + msg => + 'Ok, + }) (pred x), + numbers = + { + exclusiveMaximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) < limit then + 'Ok + else + 'Err + "expected an exclusive maximum of %{std.string.from_number + limit}", + exclusiveMinimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.5]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) > limit then + 'Ok + else + 'Err + "expected an exclusive minimum of %{std.string.from_number + limit}", + maximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.2]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) <= limit then + 'Ok + else + 'Err + "expected a maximum of %{std.string.from_number limit}", + minimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.4]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) >= limit then + 'Ok + else + 'Err + "expected a minimum of %{std.string.from_number limit}", + multipleOf + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.1]" + = fun + mult + x + => + if !(std.is_number x) then + 'Ok + else + if std.number.is_integer ((x | Number) / mult) then + 'Ok + else + 'Err + "expected a multiple of %{std.string.from_number mult}", + }, + oneOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `oneOf preds` succeeds if precisely one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3] + "% + = fun + preds + x + => + let count_ok + : Array [| 'Ok, 'Err String |] -> Number + = fun + results + => + std.array.fold_left (fun n b => if b == 'Ok then n + 1 else n) 0 + results + in + let results + = std.array.map (fun pred => pred x) preds + in + let count + = count_ok results + in + if count == 0 then + let errors + = std.array.flat_map + (fun + result + => + (match { 'Ok => [ ], 'Err s => [ " - %{s}" ], }) + result) results + in + 'Err + m%" + oneOf: none of the options matched + %{std.string.join + m%" + + + "% errors} + "% + else + if count > 1 then + 'Err "oneOf: more than one of the options matched" + else + 'Ok, + records = + { + dependencies + : { _ : Dyn } -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7]" + = let mustHaveFields + : Array String -> { _ : Dyn } -> [| 'Ok, 'Err String |] + = fun + fields + x + => + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field x) then + 'Err "expected field `%{field}`" + else + acc) 'Ok fields + in + fun + deps + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + let result + = if std.is_array value then + mustHaveFields (value | Array String) x + else + let pred + | Dyn -> [| 'Ok, 'Err String |] + = value + in + pred (x | Dyn) + in + (match { + 'Err + msg => + 'Err + "dependency of `%{field}` failed: %{msg}", + 'Ok => + acc, + }) result) 'Ok (std.record.to_array deps), + maxProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxProperties n x` fails if `x` is a record containing stricly more than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) > n then + 'Err + "record contains more than %{std.string.from_number + n} fields" + else + 'Ok, + minProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minProperties n x` fails if `x` is a record containing stricly less than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) < n then + 'Err + "record contains fewer than %{std.string.from_number + n} fields" + else + 'Ok, + propertyNames + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8]" + = fun + pred + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` did not validate against `propertyNames` schema", + 'Ok => + acc, + }) (pred (field | Dyn))) 'Ok + (std.record.fields (x | { _ : Dyn })), + record + : { _ : Dyn -> [| 'Ok, 'Err String |] } + -> { _ : Dyn -> [| 'Ok, 'Err String |] } + -> Bool + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `record properties patternProperties additionalAllowed + additionalProperties x` is a combination of the `properties`, + `patternProperties` and `additionalProperties` validation keywords in + JSON schema. + + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5] + "% + = fun + properties + patternProperties + additionalAllowed + additionalProperties + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + let check_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true acc.checked, + result = acc.result, + }, + }) (value x."%{field}")) + { checked = {}, result = 'Ok, } + (std.record.to_array properties) + in + let matching_fields + : String -> { _ : Dyn } + = fun + pattern + => + let matcher + = std.string.is_match pattern + in + std.array.fold_left + (fun + acc + => + fun + { field, value, } + => + if matcher field then + std.record.insert field value acc + else + acc) {} (std.record.to_array x) + in + let check_pattern_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field = pattern, value = pred, } + => + fun + acc + => + (match { + r @ { result = 'Err msg, .. } => + r, + { result = 'Ok, checked = ch, } => + { + checked = + std.array.fold_left + (fun + r + field + => + if !(std.record.has_field field + r) then + std.record.insert field true r + else + r) acc.checked + (std.record.fields ch), + result = acc.result, + }, + }) + (std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true + acc.checked, + result = acc.result, + }, + }) (pred value)) + { + checked : { _ : Bool } = {}, + result = 'Ok, + } + (std.record.to_array + (matching_fields pattern)))) + { checked : { _ : Bool } = {}, result = 'Ok, } + (std.record.to_array patternProperties) + in + let remaining_fields + = std.array.fold_left + (fun + acc + field + => + if !(std.record.has_field field acc) then + acc + else + std.record.remove field acc) x + ((std.record.fields check_properties.checked) + @ (std.record.fields + check_pattern_properties.checked)) + in + let check_additional_properties + : [| 'Ok, 'Err String |] + = if (!additionalAllowed) + && (!(std.record.is_empty remaining_fields)) then + 'Err + "extra fields %{std.serialize 'Json + ((std.record.fields remaining_fields) + | Dyn)}" + else + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` didn't validate: %{msg}", + 'Ok => + acc, + }) (additionalProperties value)) 'Ok + (std.record.to_array remaining_fields) + in + (match { + 'Err + msg => + check_properties.result, + 'Ok => + (match { + 'Err + msg => + check_pattern_properties.result, + 'Ok => + check_additional_properties, + }) check_pattern_properties.result, + }) check_properties.result, + required + : Array String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3]" + = fun + fields + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field (x | { _ : Dyn })) then + 'Err "missing required field %{field}" + else + acc) 'Ok fields, + }, + strings = + { + maxLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.1]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) <= limit then + 'Ok + else + 'Err + "expected a string of length no larger than %{std.string.from_number + limit}", + minLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.2]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) >= limit then + 'Ok + else + 'Err + "expected a string of length no smaller than %{std.string.from_number + limit}", + pattern + : String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.3]" + = fun + pattern + x + => + if !(std.is_string x) then + 'Ok + else + if std.string.is_match pattern (x | String) then + 'Ok + else + 'Err "expected a string matching the pattern `%{pattern}`", + }, + } + in +let rec _js2n__-refsenv + = {} + in + { + contact + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "EveryVoice requires a contact name and email to help prevent misuse. Please read our Guide to understand more about the importance of misuse prevention with TTS.", + model + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The model configuration settings." + | optional, + path_to_model_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a preprocessing configuration file." + | optional, + path_to_preprocessing_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a preprocessing configuration file." + | optional, + path_to_text_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | optional, + path_to_training_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a preprocessing configuration file." + | optional, + preprocessing + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The preprocessing configuration, including information about audio settings." + | optional, + text | Dyn | optional, + training + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The training configuration hyperparameters." + | optional, + } \ No newline at end of file diff --git a/out/EveryVoice TTS Toolkit Data Configuration.ncl b/out/EveryVoice TTS Toolkit Data Configuration.ncl new file mode 100644 index 0000000..36efca6 --- /dev/null +++ b/out/EveryVoice TTS Toolkit Data Configuration.ncl @@ -0,0 +1,932 @@ +# DO NOT EDIT +# This file was automatically generated using json-schema-to-nickel +let _js2n__-prdslib + = { + allOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `allOf preds` succeeds if all of the predicates in `preds` succeed + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1] + "% + = fun + preds + x + => + std.array.fold_right + (fun pred acc => (match { 'Ok => acc, 'Err s => 'Err s, }) (pred x)) + 'Ok preds, + always : Dyn -> [| 'Ok, 'Err String |] = std.function.const 'Ok, + anyOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `anyOf preds` succeeds if at least one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2] + "% + = fun + preds + x + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + anyOf: none of the options matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + pred + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) preds), + arrays = + { + additionalItems + : (Dyn -> [| 'Ok, 'Err String |]) + -> Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2]" + = fun + pred + start + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let value_length + = std.array.length x + in + if start >= value_length then + 'Ok + else + arrayOf pred + ((std.array.slice start value_length x) + | Dyn), + arrayOf + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Apply a predicate to all elements of an array, succeeding if all + applications succeed. + "% + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + std.array.fold_right + (fun + x + acc + => + (match { 'Ok => acc, 'Err msg => 'Err msg, }) (pred x)) + 'Ok x, + contains + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6]" + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + contains: no elements matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + x + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) x), + items + : Array (Dyn -> [| 'Ok, 'Err String |]) + -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1]" + = fun + preds + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let length_to_check + = std.number.min (std.array.length preds) + (std.array.length x) + in + std.array.fold_right + (fun + i + acc + => + (match { 'Err msg => 'Err msg, 'Ok => acc, }) + (std.array.at i preds (std.array.at i x))) 'Ok + (std.array.range 0 length_to_check), + maxItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxItems n x` fails if `x` is an array of length strictly greater than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.3] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) > n then + 'Err + "array is longer than %{std.string.from_number n} items" + else + 'Ok, + minItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minItems n x` fails if `x` is an array of length strictly smaller than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.4] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) < n then + 'Err + "array is shorter than %{std.string.from_number n} items" + else + 'Ok, + uniqueItems + : Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Succeeds for any array if its elements are pairwise distinct. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.5] + "% + = let find_duplicate + : Array Dyn + -> { + has_duplicate : Bool, + duplicate : Dyn, + seen : { _ : Bool } + } + = std.array.fold_right + (fun + elt + acc + => + if acc.has_duplicate then + acc + else + let index + = std.serialize 'Json elt + in + if std.record.has_field index acc.seen then + { + duplicate = elt, + has_duplicate = true, + seen = acc.seen, + } + else + { + duplicate = null, + has_duplicate = false, + seen = std.record.insert index true acc.seen, + }) + { duplicate = null, has_duplicate = false, seen = {}, } + in + fun + x + => + if !(std.is_array x) then + 'Ok + else + let { has_duplicate, duplicate, .. } + = find_duplicate (x | Array Dyn) + in + if has_duplicate then + 'Err "duplicate found: %{std.serialize 'Json duplicate}" + else + 'Ok, + }, + const + : Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `const value x` succeeds if and only if `x` is equal to `value` + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.3] + "% + = fun + value + x + => + if x == value then + 'Ok + else + 'Err "expected %{std.serialize 'Json value}", + contract_from_predicate + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> Dyn -> Dyn + = fun + predicate + label + value + => + (match { + 'Ok => + value, + 'Err + msg => + (std.contract.blame_with_message msg label) + | Dyn, + }) (predicate value), + enum + : Array Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `enum values x` succeeds if and only if `x` is equal to one of the elements of `values`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.2] + "% + = let checkEqual + = fun + input + variant + => + (input == variant) + || ((std.is_enum input) + && (((std.string.from_enum input) == variant) + | Bool)) + in + fun + values + x + => + std.array.fold_right + (fun value acc => if checkEqual x value then 'Ok else acc) + ('Err "expected one of %{std.serialize 'Json (values | Dyn)}") + values, + from_simple_predicate + : String -> (Dyn -> Bool) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Convert a simple boolean predicate into a predicate supporting error messages" + = fun error' pred x => if pred x then 'Ok else 'Err error', + ifThenElse + : (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `ifThenElse i t e` first checks if the predicate `i` succeeds. If it does, it's equivalent to `t`, otherwise it's equivalent to `e`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6] + "% + = fun i t e x => (match { 'Ok => t x, 'Err msg => e x, }) (i x), + isType + : [| '"Array", '"Bool", 'Integer, 'Null, '"Number", 'Record, '"String" |] + -> Dyn -> [| 'Ok, 'Err String |] + = fun + t + => + (match { + 'Null => + from_simple_predicate "expected `null`" (fun x => x == null), + 'Integer => + from_simple_predicate "expected an integer" + (fun + x + => + (std.is_number x) && (std.number.is_integer (x | Number))), + _ => + from_simple_predicate + "value is not of type %{std.string.from_enum t}" + (fun x => (std.typeof x) == t), + }) t, + never : Dyn -> [| 'Ok, 'Err String |] = std.function.const ('Err "never"), + not + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `not pred` succeeds if and only if `pred` fails + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4] + "% + = fun + pred + x + => + (match { + 'Ok => + 'Err "Inverted predicate succeeded unexpectedly", + 'Err + msg => + 'Ok, + }) (pred x), + numbers = + { + exclusiveMaximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) < limit then + 'Ok + else + 'Err + "expected an exclusive maximum of %{std.string.from_number + limit}", + exclusiveMinimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.5]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) > limit then + 'Ok + else + 'Err + "expected an exclusive minimum of %{std.string.from_number + limit}", + maximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.2]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) <= limit then + 'Ok + else + 'Err + "expected a maximum of %{std.string.from_number limit}", + minimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.4]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) >= limit then + 'Ok + else + 'Err + "expected a minimum of %{std.string.from_number limit}", + multipleOf + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.1]" + = fun + mult + x + => + if !(std.is_number x) then + 'Ok + else + if std.number.is_integer ((x | Number) / mult) then + 'Ok + else + 'Err + "expected a multiple of %{std.string.from_number mult}", + }, + oneOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `oneOf preds` succeeds if precisely one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3] + "% + = fun + preds + x + => + let count_ok + : Array [| 'Ok, 'Err String |] -> Number + = fun + results + => + std.array.fold_left (fun n b => if b == 'Ok then n + 1 else n) 0 + results + in + let results + = std.array.map (fun pred => pred x) preds + in + let count + = count_ok results + in + if count == 0 then + let errors + = std.array.flat_map + (fun + result + => + (match { 'Ok => [ ], 'Err s => [ " - %{s}" ], }) + result) results + in + 'Err + m%" + oneOf: none of the options matched + %{std.string.join + m%" + + + "% errors} + "% + else + if count > 1 then + 'Err "oneOf: more than one of the options matched" + else + 'Ok, + records = + { + dependencies + : { _ : Dyn } -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7]" + = let mustHaveFields + : Array String -> { _ : Dyn } -> [| 'Ok, 'Err String |] + = fun + fields + x + => + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field x) then + 'Err "expected field `%{field}`" + else + acc) 'Ok fields + in + fun + deps + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + let result + = if std.is_array value then + mustHaveFields (value | Array String) x + else + let pred + | Dyn -> [| 'Ok, 'Err String |] + = value + in + pred (x | Dyn) + in + (match { + 'Err + msg => + 'Err + "dependency of `%{field}` failed: %{msg}", + 'Ok => + acc, + }) result) 'Ok (std.record.to_array deps), + maxProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxProperties n x` fails if `x` is a record containing stricly more than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) > n then + 'Err + "record contains more than %{std.string.from_number + n} fields" + else + 'Ok, + minProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minProperties n x` fails if `x` is a record containing stricly less than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) < n then + 'Err + "record contains fewer than %{std.string.from_number + n} fields" + else + 'Ok, + propertyNames + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8]" + = fun + pred + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` did not validate against `propertyNames` schema", + 'Ok => + acc, + }) (pred (field | Dyn))) 'Ok + (std.record.fields (x | { _ : Dyn })), + record + : { _ : Dyn -> [| 'Ok, 'Err String |] } + -> { _ : Dyn -> [| 'Ok, 'Err String |] } + -> Bool + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `record properties patternProperties additionalAllowed + additionalProperties x` is a combination of the `properties`, + `patternProperties` and `additionalProperties` validation keywords in + JSON schema. + + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5] + "% + = fun + properties + patternProperties + additionalAllowed + additionalProperties + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + let check_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true acc.checked, + result = acc.result, + }, + }) (value x."%{field}")) + { checked = {}, result = 'Ok, } + (std.record.to_array properties) + in + let matching_fields + : String -> { _ : Dyn } + = fun + pattern + => + let matcher + = std.string.is_match pattern + in + std.array.fold_left + (fun + acc + => + fun + { field, value, } + => + if matcher field then + std.record.insert field value acc + else + acc) {} (std.record.to_array x) + in + let check_pattern_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field = pattern, value = pred, } + => + fun + acc + => + (match { + r @ { result = 'Err msg, .. } => + r, + { result = 'Ok, checked = ch, } => + { + checked = + std.array.fold_left + (fun + r + field + => + if !(std.record.has_field field + r) then + std.record.insert field true r + else + r) acc.checked + (std.record.fields ch), + result = acc.result, + }, + }) + (std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true + acc.checked, + result = acc.result, + }, + }) (pred value)) + { + checked : { _ : Bool } = {}, + result = 'Ok, + } + (std.record.to_array + (matching_fields pattern)))) + { checked : { _ : Bool } = {}, result = 'Ok, } + (std.record.to_array patternProperties) + in + let remaining_fields + = std.array.fold_left + (fun + acc + field + => + if !(std.record.has_field field acc) then + acc + else + std.record.remove field acc) x + ((std.record.fields check_properties.checked) + @ (std.record.fields + check_pattern_properties.checked)) + in + let check_additional_properties + : [| 'Ok, 'Err String |] + = if (!additionalAllowed) + && (!(std.record.is_empty remaining_fields)) then + 'Err + "extra fields %{std.serialize 'Json + ((std.record.fields remaining_fields) + | Dyn)}" + else + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` didn't validate: %{msg}", + 'Ok => + acc, + }) (additionalProperties value)) 'Ok + (std.record.to_array remaining_fields) + in + (match { + 'Err + msg => + check_properties.result, + 'Ok => + (match { + 'Err + msg => + check_pattern_properties.result, + 'Ok => + check_additional_properties, + }) check_pattern_properties.result, + }) check_properties.result, + required + : Array String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3]" + = fun + fields + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field (x | { _ : Dyn })) then + 'Err "missing required field %{field}" + else + acc) 'Ok fields, + }, + strings = + { + maxLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.1]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) <= limit then + 'Ok + else + 'Err + "expected a string of length no larger than %{std.string.from_number + limit}", + minLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.2]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) >= limit then + 'Ok + else + 'Err + "expected a string of length no smaller than %{std.string.from_number + limit}", + pattern + : String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.3]" + = fun + pattern + x + => + if !(std.is_string x) then + 'Ok + else + if std.string.is_match pattern (x | String) then + 'Ok + else + 'Err "expected a string matching the pattern `%{pattern}`", + }, + } + in +let rec _js2n__-refsenv + = {} + in + { + audio + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "Configuration settings for audio." + | optional, + dataset | String | doc "The name of the dataset." | optional, + dataset_split_seed + | std.number.Integer + | doc "The seed to use when splitting the dataset into train and validation sets." + | optional, + path_to_audio_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path to an audio configuration file." + | optional, + save_dir + | String + | doc "The directory to save preprocessed files to." + | optional, + source_data | Array (Dyn) | doc "A list of datasets." | optional, + train_split + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Number", + _js2n__-prdslib.numbers.maximum 1, + _js2n__-prdslib.numbers.minimum 0 + ]) + | doc "The amount of the dataset to use for training. The rest will be used as validation. Hold some of the validation set out for a test set if you are performing experiments." + | optional, + } \ No newline at end of file diff --git a/out/EveryVoice TTS Toolkit E2E Configuration.ncl b/out/EveryVoice TTS Toolkit E2E Configuration.ncl new file mode 100644 index 0000000..7d44648 --- /dev/null +++ b/out/EveryVoice TTS Toolkit E2E Configuration.ncl @@ -0,0 +1,941 @@ +# DO NOT EDIT +# This file was automatically generated using json-schema-to-nickel +let _js2n__-prdslib + = { + allOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `allOf preds` succeeds if all of the predicates in `preds` succeed + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1] + "% + = fun + preds + x + => + std.array.fold_right + (fun pred acc => (match { 'Ok => acc, 'Err s => 'Err s, }) (pred x)) + 'Ok preds, + always : Dyn -> [| 'Ok, 'Err String |] = std.function.const 'Ok, + anyOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `anyOf preds` succeeds if at least one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2] + "% + = fun + preds + x + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + anyOf: none of the options matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + pred + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) preds), + arrays = + { + additionalItems + : (Dyn -> [| 'Ok, 'Err String |]) + -> Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2]" + = fun + pred + start + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let value_length + = std.array.length x + in + if start >= value_length then + 'Ok + else + arrayOf pred + ((std.array.slice start value_length x) + | Dyn), + arrayOf + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Apply a predicate to all elements of an array, succeeding if all + applications succeed. + "% + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + std.array.fold_right + (fun + x + acc + => + (match { 'Ok => acc, 'Err msg => 'Err msg, }) (pred x)) + 'Ok x, + contains + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6]" + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + contains: no elements matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + x + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) x), + items + : Array (Dyn -> [| 'Ok, 'Err String |]) + -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1]" + = fun + preds + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let length_to_check + = std.number.min (std.array.length preds) + (std.array.length x) + in + std.array.fold_right + (fun + i + acc + => + (match { 'Err msg => 'Err msg, 'Ok => acc, }) + (std.array.at i preds (std.array.at i x))) 'Ok + (std.array.range 0 length_to_check), + maxItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxItems n x` fails if `x` is an array of length strictly greater than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.3] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) > n then + 'Err + "array is longer than %{std.string.from_number n} items" + else + 'Ok, + minItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minItems n x` fails if `x` is an array of length strictly smaller than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.4] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) < n then + 'Err + "array is shorter than %{std.string.from_number n} items" + else + 'Ok, + uniqueItems + : Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Succeeds for any array if its elements are pairwise distinct. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.5] + "% + = let find_duplicate + : Array Dyn + -> { + has_duplicate : Bool, + duplicate : Dyn, + seen : { _ : Bool } + } + = std.array.fold_right + (fun + elt + acc + => + if acc.has_duplicate then + acc + else + let index + = std.serialize 'Json elt + in + if std.record.has_field index acc.seen then + { + duplicate = elt, + has_duplicate = true, + seen = acc.seen, + } + else + { + duplicate = null, + has_duplicate = false, + seen = std.record.insert index true acc.seen, + }) + { duplicate = null, has_duplicate = false, seen = {}, } + in + fun + x + => + if !(std.is_array x) then + 'Ok + else + let { has_duplicate, duplicate, .. } + = find_duplicate (x | Array Dyn) + in + if has_duplicate then + 'Err "duplicate found: %{std.serialize 'Json duplicate}" + else + 'Ok, + }, + const + : Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `const value x` succeeds if and only if `x` is equal to `value` + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.3] + "% + = fun + value + x + => + if x == value then + 'Ok + else + 'Err "expected %{std.serialize 'Json value}", + contract_from_predicate + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> Dyn -> Dyn + = fun + predicate + label + value + => + (match { + 'Ok => + value, + 'Err + msg => + (std.contract.blame_with_message msg label) + | Dyn, + }) (predicate value), + enum + : Array Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `enum values x` succeeds if and only if `x` is equal to one of the elements of `values`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.2] + "% + = let checkEqual + = fun + input + variant + => + (input == variant) + || ((std.is_enum input) + && (((std.string.from_enum input) == variant) + | Bool)) + in + fun + values + x + => + std.array.fold_right + (fun value acc => if checkEqual x value then 'Ok else acc) + ('Err "expected one of %{std.serialize 'Json (values | Dyn)}") + values, + from_simple_predicate + : String -> (Dyn -> Bool) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Convert a simple boolean predicate into a predicate supporting error messages" + = fun error' pred x => if pred x then 'Ok else 'Err error', + ifThenElse + : (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `ifThenElse i t e` first checks if the predicate `i` succeeds. If it does, it's equivalent to `t`, otherwise it's equivalent to `e`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6] + "% + = fun i t e x => (match { 'Ok => t x, 'Err msg => e x, }) (i x), + isType + : [| '"Array", '"Bool", 'Integer, 'Null, '"Number", 'Record, '"String" |] + -> Dyn -> [| 'Ok, 'Err String |] + = fun + t + => + (match { + 'Null => + from_simple_predicate "expected `null`" (fun x => x == null), + 'Integer => + from_simple_predicate "expected an integer" + (fun + x + => + (std.is_number x) && (std.number.is_integer (x | Number))), + _ => + from_simple_predicate + "value is not of type %{std.string.from_enum t}" + (fun x => (std.typeof x) == t), + }) t, + never : Dyn -> [| 'Ok, 'Err String |] = std.function.const ('Err "never"), + not + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `not pred` succeeds if and only if `pred` fails + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4] + "% + = fun + pred + x + => + (match { + 'Ok => + 'Err "Inverted predicate succeeded unexpectedly", + 'Err + msg => + 'Ok, + }) (pred x), + numbers = + { + exclusiveMaximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) < limit then + 'Ok + else + 'Err + "expected an exclusive maximum of %{std.string.from_number + limit}", + exclusiveMinimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.5]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) > limit then + 'Ok + else + 'Err + "expected an exclusive minimum of %{std.string.from_number + limit}", + maximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.2]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) <= limit then + 'Ok + else + 'Err + "expected a maximum of %{std.string.from_number limit}", + minimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.4]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) >= limit then + 'Ok + else + 'Err + "expected a minimum of %{std.string.from_number limit}", + multipleOf + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.1]" + = fun + mult + x + => + if !(std.is_number x) then + 'Ok + else + if std.number.is_integer ((x | Number) / mult) then + 'Ok + else + 'Err + "expected a multiple of %{std.string.from_number mult}", + }, + oneOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `oneOf preds` succeeds if precisely one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3] + "% + = fun + preds + x + => + let count_ok + : Array [| 'Ok, 'Err String |] -> Number + = fun + results + => + std.array.fold_left (fun n b => if b == 'Ok then n + 1 else n) 0 + results + in + let results + = std.array.map (fun pred => pred x) preds + in + let count + = count_ok results + in + if count == 0 then + let errors + = std.array.flat_map + (fun + result + => + (match { 'Ok => [ ], 'Err s => [ " - %{s}" ], }) + result) results + in + 'Err + m%" + oneOf: none of the options matched + %{std.string.join + m%" + + + "% errors} + "% + else + if count > 1 then + 'Err "oneOf: more than one of the options matched" + else + 'Ok, + records = + { + dependencies + : { _ : Dyn } -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7]" + = let mustHaveFields + : Array String -> { _ : Dyn } -> [| 'Ok, 'Err String |] + = fun + fields + x + => + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field x) then + 'Err "expected field `%{field}`" + else + acc) 'Ok fields + in + fun + deps + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + let result + = if std.is_array value then + mustHaveFields (value | Array String) x + else + let pred + | Dyn -> [| 'Ok, 'Err String |] + = value + in + pred (x | Dyn) + in + (match { + 'Err + msg => + 'Err + "dependency of `%{field}` failed: %{msg}", + 'Ok => + acc, + }) result) 'Ok (std.record.to_array deps), + maxProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxProperties n x` fails if `x` is a record containing stricly more than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) > n then + 'Err + "record contains more than %{std.string.from_number + n} fields" + else + 'Ok, + minProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minProperties n x` fails if `x` is a record containing stricly less than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) < n then + 'Err + "record contains fewer than %{std.string.from_number + n} fields" + else + 'Ok, + propertyNames + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8]" + = fun + pred + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` did not validate against `propertyNames` schema", + 'Ok => + acc, + }) (pred (field | Dyn))) 'Ok + (std.record.fields (x | { _ : Dyn })), + record + : { _ : Dyn -> [| 'Ok, 'Err String |] } + -> { _ : Dyn -> [| 'Ok, 'Err String |] } + -> Bool + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `record properties patternProperties additionalAllowed + additionalProperties x` is a combination of the `properties`, + `patternProperties` and `additionalProperties` validation keywords in + JSON schema. + + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5] + "% + = fun + properties + patternProperties + additionalAllowed + additionalProperties + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + let check_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true acc.checked, + result = acc.result, + }, + }) (value x."%{field}")) + { checked = {}, result = 'Ok, } + (std.record.to_array properties) + in + let matching_fields + : String -> { _ : Dyn } + = fun + pattern + => + let matcher + = std.string.is_match pattern + in + std.array.fold_left + (fun + acc + => + fun + { field, value, } + => + if matcher field then + std.record.insert field value acc + else + acc) {} (std.record.to_array x) + in + let check_pattern_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field = pattern, value = pred, } + => + fun + acc + => + (match { + r @ { result = 'Err msg, .. } => + r, + { result = 'Ok, checked = ch, } => + { + checked = + std.array.fold_left + (fun + r + field + => + if !(std.record.has_field field + r) then + std.record.insert field true r + else + r) acc.checked + (std.record.fields ch), + result = acc.result, + }, + }) + (std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true + acc.checked, + result = acc.result, + }, + }) (pred value)) + { + checked : { _ : Bool } = {}, + result = 'Ok, + } + (std.record.to_array + (matching_fields pattern)))) + { checked : { _ : Bool } = {}, result = 'Ok, } + (std.record.to_array patternProperties) + in + let remaining_fields + = std.array.fold_left + (fun + acc + field + => + if !(std.record.has_field field acc) then + acc + else + std.record.remove field acc) x + ((std.record.fields check_properties.checked) + @ (std.record.fields + check_pattern_properties.checked)) + in + let check_additional_properties + : [| 'Ok, 'Err String |] + = if (!additionalAllowed) + && (!(std.record.is_empty remaining_fields)) then + 'Err + "extra fields %{std.serialize 'Json + ((std.record.fields remaining_fields) + | Dyn)}" + else + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` didn't validate: %{msg}", + 'Ok => + acc, + }) (additionalProperties value)) 'Ok + (std.record.to_array remaining_fields) + in + (match { + 'Err + msg => + check_properties.result, + 'Ok => + (match { + 'Err + msg => + check_pattern_properties.result, + 'Ok => + check_additional_properties, + }) check_pattern_properties.result, + }) check_properties.result, + required + : Array String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3]" + = fun + fields + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field (x | { _ : Dyn })) then + 'Err "missing required field %{field}" + else + acc) 'Ok fields, + }, + strings = + { + maxLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.1]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) <= limit then + 'Ok + else + 'Err + "expected a string of length no larger than %{std.string.from_number + limit}", + minLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.2]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) >= limit then + 'Ok + else + 'Err + "expected a string of length no smaller than %{std.string.from_number + limit}", + pattern + : String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.3]" + = fun + pattern + x + => + if !(std.is_string x) then + 'Ok + else + if std.string.is_match pattern (x | String) then + 'Ok + else + 'Err "expected a string matching the pattern `%{pattern}`", + }, + } + in +let rec _js2n__-refsenv + = {} + in + { + aligner + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.always, _js2n__-prdslib.always ]) + | optional, + contact + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "EveryVoice requires a contact name and email to help prevent misuse. Please read our Guide to understand more about the importance of misuse prevention with TTS.", + feature_prediction + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.always, _js2n__-prdslib.always ]) + | optional, + path_to_aligner_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | optional, + path_to_feature_prediction_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | optional, + path_to_training_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | optional, + path_to_vocoder_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | optional, + training | Dyn | optional, + vocoder + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.always, _js2n__-prdslib.always ]) + | optional, + } \ No newline at end of file diff --git a/out/EveryVoice TTS Toolkit Feature Prediction Configuration.ncl b/out/EveryVoice TTS Toolkit Feature Prediction Configuration.ncl new file mode 100644 index 0000000..1a2acce --- /dev/null +++ b/out/EveryVoice TTS Toolkit Feature Prediction Configuration.ncl @@ -0,0 +1,945 @@ +# DO NOT EDIT +# This file was automatically generated using json-schema-to-nickel +let _js2n__-prdslib + = { + allOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `allOf preds` succeeds if all of the predicates in `preds` succeed + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1] + "% + = fun + preds + x + => + std.array.fold_right + (fun pred acc => (match { 'Ok => acc, 'Err s => 'Err s, }) (pred x)) + 'Ok preds, + always : Dyn -> [| 'Ok, 'Err String |] = std.function.const 'Ok, + anyOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `anyOf preds` succeeds if at least one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2] + "% + = fun + preds + x + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + anyOf: none of the options matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + pred + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) preds), + arrays = + { + additionalItems + : (Dyn -> [| 'Ok, 'Err String |]) + -> Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2]" + = fun + pred + start + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let value_length + = std.array.length x + in + if start >= value_length then + 'Ok + else + arrayOf pred + ((std.array.slice start value_length x) + | Dyn), + arrayOf + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Apply a predicate to all elements of an array, succeeding if all + applications succeed. + "% + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + std.array.fold_right + (fun + x + acc + => + (match { 'Ok => acc, 'Err msg => 'Err msg, }) (pred x)) + 'Ok x, + contains + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6]" + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + contains: no elements matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + x + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) x), + items + : Array (Dyn -> [| 'Ok, 'Err String |]) + -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1]" + = fun + preds + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let length_to_check + = std.number.min (std.array.length preds) + (std.array.length x) + in + std.array.fold_right + (fun + i + acc + => + (match { 'Err msg => 'Err msg, 'Ok => acc, }) + (std.array.at i preds (std.array.at i x))) 'Ok + (std.array.range 0 length_to_check), + maxItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxItems n x` fails if `x` is an array of length strictly greater than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.3] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) > n then + 'Err + "array is longer than %{std.string.from_number n} items" + else + 'Ok, + minItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minItems n x` fails if `x` is an array of length strictly smaller than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.4] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) < n then + 'Err + "array is shorter than %{std.string.from_number n} items" + else + 'Ok, + uniqueItems + : Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Succeeds for any array if its elements are pairwise distinct. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.5] + "% + = let find_duplicate + : Array Dyn + -> { + has_duplicate : Bool, + duplicate : Dyn, + seen : { _ : Bool } + } + = std.array.fold_right + (fun + elt + acc + => + if acc.has_duplicate then + acc + else + let index + = std.serialize 'Json elt + in + if std.record.has_field index acc.seen then + { + duplicate = elt, + has_duplicate = true, + seen = acc.seen, + } + else + { + duplicate = null, + has_duplicate = false, + seen = std.record.insert index true acc.seen, + }) + { duplicate = null, has_duplicate = false, seen = {}, } + in + fun + x + => + if !(std.is_array x) then + 'Ok + else + let { has_duplicate, duplicate, .. } + = find_duplicate (x | Array Dyn) + in + if has_duplicate then + 'Err "duplicate found: %{std.serialize 'Json duplicate}" + else + 'Ok, + }, + const + : Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `const value x` succeeds if and only if `x` is equal to `value` + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.3] + "% + = fun + value + x + => + if x == value then + 'Ok + else + 'Err "expected %{std.serialize 'Json value}", + contract_from_predicate + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> Dyn -> Dyn + = fun + predicate + label + value + => + (match { + 'Ok => + value, + 'Err + msg => + (std.contract.blame_with_message msg label) + | Dyn, + }) (predicate value), + enum + : Array Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `enum values x` succeeds if and only if `x` is equal to one of the elements of `values`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.2] + "% + = let checkEqual + = fun + input + variant + => + (input == variant) + || ((std.is_enum input) + && (((std.string.from_enum input) == variant) + | Bool)) + in + fun + values + x + => + std.array.fold_right + (fun value acc => if checkEqual x value then 'Ok else acc) + ('Err "expected one of %{std.serialize 'Json (values | Dyn)}") + values, + from_simple_predicate + : String -> (Dyn -> Bool) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Convert a simple boolean predicate into a predicate supporting error messages" + = fun error' pred x => if pred x then 'Ok else 'Err error', + ifThenElse + : (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `ifThenElse i t e` first checks if the predicate `i` succeeds. If it does, it's equivalent to `t`, otherwise it's equivalent to `e`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6] + "% + = fun i t e x => (match { 'Ok => t x, 'Err msg => e x, }) (i x), + isType + : [| '"Array", '"Bool", 'Integer, 'Null, '"Number", 'Record, '"String" |] + -> Dyn -> [| 'Ok, 'Err String |] + = fun + t + => + (match { + 'Null => + from_simple_predicate "expected `null`" (fun x => x == null), + 'Integer => + from_simple_predicate "expected an integer" + (fun + x + => + (std.is_number x) && (std.number.is_integer (x | Number))), + _ => + from_simple_predicate + "value is not of type %{std.string.from_enum t}" + (fun x => (std.typeof x) == t), + }) t, + never : Dyn -> [| 'Ok, 'Err String |] = std.function.const ('Err "never"), + not + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `not pred` succeeds if and only if `pred` fails + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4] + "% + = fun + pred + x + => + (match { + 'Ok => + 'Err "Inverted predicate succeeded unexpectedly", + 'Err + msg => + 'Ok, + }) (pred x), + numbers = + { + exclusiveMaximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) < limit then + 'Ok + else + 'Err + "expected an exclusive maximum of %{std.string.from_number + limit}", + exclusiveMinimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.5]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) > limit then + 'Ok + else + 'Err + "expected an exclusive minimum of %{std.string.from_number + limit}", + maximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.2]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) <= limit then + 'Ok + else + 'Err + "expected a maximum of %{std.string.from_number limit}", + minimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.4]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) >= limit then + 'Ok + else + 'Err + "expected a minimum of %{std.string.from_number limit}", + multipleOf + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.1]" + = fun + mult + x + => + if !(std.is_number x) then + 'Ok + else + if std.number.is_integer ((x | Number) / mult) then + 'Ok + else + 'Err + "expected a multiple of %{std.string.from_number mult}", + }, + oneOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `oneOf preds` succeeds if precisely one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3] + "% + = fun + preds + x + => + let count_ok + : Array [| 'Ok, 'Err String |] -> Number + = fun + results + => + std.array.fold_left (fun n b => if b == 'Ok then n + 1 else n) 0 + results + in + let results + = std.array.map (fun pred => pred x) preds + in + let count + = count_ok results + in + if count == 0 then + let errors + = std.array.flat_map + (fun + result + => + (match { 'Ok => [ ], 'Err s => [ " - %{s}" ], }) + result) results + in + 'Err + m%" + oneOf: none of the options matched + %{std.string.join + m%" + + + "% errors} + "% + else + if count > 1 then + 'Err "oneOf: more than one of the options matched" + else + 'Ok, + records = + { + dependencies + : { _ : Dyn } -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7]" + = let mustHaveFields + : Array String -> { _ : Dyn } -> [| 'Ok, 'Err String |] + = fun + fields + x + => + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field x) then + 'Err "expected field `%{field}`" + else + acc) 'Ok fields + in + fun + deps + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + let result + = if std.is_array value then + mustHaveFields (value | Array String) x + else + let pred + | Dyn -> [| 'Ok, 'Err String |] + = value + in + pred (x | Dyn) + in + (match { + 'Err + msg => + 'Err + "dependency of `%{field}` failed: %{msg}", + 'Ok => + acc, + }) result) 'Ok (std.record.to_array deps), + maxProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxProperties n x` fails if `x` is a record containing stricly more than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) > n then + 'Err + "record contains more than %{std.string.from_number + n} fields" + else + 'Ok, + minProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minProperties n x` fails if `x` is a record containing stricly less than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) < n then + 'Err + "record contains fewer than %{std.string.from_number + n} fields" + else + 'Ok, + propertyNames + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8]" + = fun + pred + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` did not validate against `propertyNames` schema", + 'Ok => + acc, + }) (pred (field | Dyn))) 'Ok + (std.record.fields (x | { _ : Dyn })), + record + : { _ : Dyn -> [| 'Ok, 'Err String |] } + -> { _ : Dyn -> [| 'Ok, 'Err String |] } + -> Bool + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `record properties patternProperties additionalAllowed + additionalProperties x` is a combination of the `properties`, + `patternProperties` and `additionalProperties` validation keywords in + JSON schema. + + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5] + "% + = fun + properties + patternProperties + additionalAllowed + additionalProperties + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + let check_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true acc.checked, + result = acc.result, + }, + }) (value x."%{field}")) + { checked = {}, result = 'Ok, } + (std.record.to_array properties) + in + let matching_fields + : String -> { _ : Dyn } + = fun + pattern + => + let matcher + = std.string.is_match pattern + in + std.array.fold_left + (fun + acc + => + fun + { field, value, } + => + if matcher field then + std.record.insert field value acc + else + acc) {} (std.record.to_array x) + in + let check_pattern_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field = pattern, value = pred, } + => + fun + acc + => + (match { + r @ { result = 'Err msg, .. } => + r, + { result = 'Ok, checked = ch, } => + { + checked = + std.array.fold_left + (fun + r + field + => + if !(std.record.has_field field + r) then + std.record.insert field true r + else + r) acc.checked + (std.record.fields ch), + result = acc.result, + }, + }) + (std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true + acc.checked, + result = acc.result, + }, + }) (pred value)) + { + checked : { _ : Bool } = {}, + result = 'Ok, + } + (std.record.to_array + (matching_fields pattern)))) + { checked : { _ : Bool } = {}, result = 'Ok, } + (std.record.to_array patternProperties) + in + let remaining_fields + = std.array.fold_left + (fun + acc + field + => + if !(std.record.has_field field acc) then + acc + else + std.record.remove field acc) x + ((std.record.fields check_properties.checked) + @ (std.record.fields + check_pattern_properties.checked)) + in + let check_additional_properties + : [| 'Ok, 'Err String |] + = if (!additionalAllowed) + && (!(std.record.is_empty remaining_fields)) then + 'Err + "extra fields %{std.serialize 'Json + ((std.record.fields remaining_fields) + | Dyn)}" + else + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` didn't validate: %{msg}", + 'Ok => + acc, + }) (additionalProperties value)) 'Ok + (std.record.to_array remaining_fields) + in + (match { + 'Err + msg => + check_properties.result, + 'Ok => + (match { + 'Err + msg => + check_pattern_properties.result, + 'Ok => + check_additional_properties, + }) check_pattern_properties.result, + }) check_properties.result, + required + : Array String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3]" + = fun + fields + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field (x | { _ : Dyn })) then + 'Err "missing required field %{field}" + else + acc) 'Ok fields, + }, + strings = + { + maxLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.1]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) <= limit then + 'Ok + else + 'Err + "expected a string of length no larger than %{std.string.from_number + limit}", + minLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.2]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) >= limit then + 'Ok + else + 'Err + "expected a string of length no smaller than %{std.string.from_number + limit}", + pattern + : String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.3]" + = fun + pattern + x + => + if !(std.is_string x) then + 'Ok + else + if std.string.is_match pattern (x | String) then + 'Ok + else + 'Err "expected a string matching the pattern `%{pattern}`", + }, + } + in +let rec _js2n__-refsenv + = {} + in + { + contact + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "EveryVoice requires a contact name and email to help prevent misuse. Please read our Guide to understand more about the importance of misuse prevention with TTS.", + model + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The model configuration settings." + | optional, + path_to_model_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a model configuration file." + | optional, + path_to_preprocessing_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a preprocessing configuration file." + | optional, + path_to_text_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a text configuration file." + | optional, + path_to_training_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a training configuration file." + | optional, + preprocessing + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The preprocessing configuration, including information about audio settings." + | optional, + text + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The text configuration." + | optional, + training + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The training configuration hyperparameters." + | optional, + } \ No newline at end of file diff --git a/out/EveryVoice TTS Toolkit Text Configuration.ncl b/out/EveryVoice TTS Toolkit Text Configuration.ncl new file mode 100644 index 0000000..19bb0ed --- /dev/null +++ b/out/EveryVoice TTS Toolkit Text Configuration.ncl @@ -0,0 +1,913 @@ +# DO NOT EDIT +# This file was automatically generated using json-schema-to-nickel +let _js2n__-prdslib + = { + allOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `allOf preds` succeeds if all of the predicates in `preds` succeed + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1] + "% + = fun + preds + x + => + std.array.fold_right + (fun pred acc => (match { 'Ok => acc, 'Err s => 'Err s, }) (pred x)) + 'Ok preds, + always : Dyn -> [| 'Ok, 'Err String |] = std.function.const 'Ok, + anyOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `anyOf preds` succeeds if at least one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2] + "% + = fun + preds + x + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + anyOf: none of the options matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + pred + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) preds), + arrays = + { + additionalItems + : (Dyn -> [| 'Ok, 'Err String |]) + -> Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2]" + = fun + pred + start + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let value_length + = std.array.length x + in + if start >= value_length then + 'Ok + else + arrayOf pred + ((std.array.slice start value_length x) + | Dyn), + arrayOf + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Apply a predicate to all elements of an array, succeeding if all + applications succeed. + "% + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + std.array.fold_right + (fun + x + acc + => + (match { 'Ok => acc, 'Err msg => 'Err msg, }) (pred x)) + 'Ok x, + contains + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6]" + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + contains: no elements matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + x + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) x), + items + : Array (Dyn -> [| 'Ok, 'Err String |]) + -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1]" + = fun + preds + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let length_to_check + = std.number.min (std.array.length preds) + (std.array.length x) + in + std.array.fold_right + (fun + i + acc + => + (match { 'Err msg => 'Err msg, 'Ok => acc, }) + (std.array.at i preds (std.array.at i x))) 'Ok + (std.array.range 0 length_to_check), + maxItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxItems n x` fails if `x` is an array of length strictly greater than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.3] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) > n then + 'Err + "array is longer than %{std.string.from_number n} items" + else + 'Ok, + minItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minItems n x` fails if `x` is an array of length strictly smaller than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.4] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) < n then + 'Err + "array is shorter than %{std.string.from_number n} items" + else + 'Ok, + uniqueItems + : Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Succeeds for any array if its elements are pairwise distinct. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.5] + "% + = let find_duplicate + : Array Dyn + -> { + has_duplicate : Bool, + duplicate : Dyn, + seen : { _ : Bool } + } + = std.array.fold_right + (fun + elt + acc + => + if acc.has_duplicate then + acc + else + let index + = std.serialize 'Json elt + in + if std.record.has_field index acc.seen then + { + duplicate = elt, + has_duplicate = true, + seen = acc.seen, + } + else + { + duplicate = null, + has_duplicate = false, + seen = std.record.insert index true acc.seen, + }) + { duplicate = null, has_duplicate = false, seen = {}, } + in + fun + x + => + if !(std.is_array x) then + 'Ok + else + let { has_duplicate, duplicate, .. } + = find_duplicate (x | Array Dyn) + in + if has_duplicate then + 'Err "duplicate found: %{std.serialize 'Json duplicate}" + else + 'Ok, + }, + const + : Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `const value x` succeeds if and only if `x` is equal to `value` + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.3] + "% + = fun + value + x + => + if x == value then + 'Ok + else + 'Err "expected %{std.serialize 'Json value}", + contract_from_predicate + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> Dyn -> Dyn + = fun + predicate + label + value + => + (match { + 'Ok => + value, + 'Err + msg => + (std.contract.blame_with_message msg label) + | Dyn, + }) (predicate value), + enum + : Array Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `enum values x` succeeds if and only if `x` is equal to one of the elements of `values`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.2] + "% + = let checkEqual + = fun + input + variant + => + (input == variant) + || ((std.is_enum input) + && (((std.string.from_enum input) == variant) + | Bool)) + in + fun + values + x + => + std.array.fold_right + (fun value acc => if checkEqual x value then 'Ok else acc) + ('Err "expected one of %{std.serialize 'Json (values | Dyn)}") + values, + from_simple_predicate + : String -> (Dyn -> Bool) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Convert a simple boolean predicate into a predicate supporting error messages" + = fun error' pred x => if pred x then 'Ok else 'Err error', + ifThenElse + : (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `ifThenElse i t e` first checks if the predicate `i` succeeds. If it does, it's equivalent to `t`, otherwise it's equivalent to `e`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6] + "% + = fun i t e x => (match { 'Ok => t x, 'Err msg => e x, }) (i x), + isType + : [| '"Array", '"Bool", 'Integer, 'Null, '"Number", 'Record, '"String" |] + -> Dyn -> [| 'Ok, 'Err String |] + = fun + t + => + (match { + 'Null => + from_simple_predicate "expected `null`" (fun x => x == null), + 'Integer => + from_simple_predicate "expected an integer" + (fun + x + => + (std.is_number x) && (std.number.is_integer (x | Number))), + _ => + from_simple_predicate + "value is not of type %{std.string.from_enum t}" + (fun x => (std.typeof x) == t), + }) t, + never : Dyn -> [| 'Ok, 'Err String |] = std.function.const ('Err "never"), + not + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `not pred` succeeds if and only if `pred` fails + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4] + "% + = fun + pred + x + => + (match { + 'Ok => + 'Err "Inverted predicate succeeded unexpectedly", + 'Err + msg => + 'Ok, + }) (pred x), + numbers = + { + exclusiveMaximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) < limit then + 'Ok + else + 'Err + "expected an exclusive maximum of %{std.string.from_number + limit}", + exclusiveMinimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.5]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) > limit then + 'Ok + else + 'Err + "expected an exclusive minimum of %{std.string.from_number + limit}", + maximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.2]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) <= limit then + 'Ok + else + 'Err + "expected a maximum of %{std.string.from_number limit}", + minimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.4]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) >= limit then + 'Ok + else + 'Err + "expected a minimum of %{std.string.from_number limit}", + multipleOf + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.1]" + = fun + mult + x + => + if !(std.is_number x) then + 'Ok + else + if std.number.is_integer ((x | Number) / mult) then + 'Ok + else + 'Err + "expected a multiple of %{std.string.from_number mult}", + }, + oneOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `oneOf preds` succeeds if precisely one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3] + "% + = fun + preds + x + => + let count_ok + : Array [| 'Ok, 'Err String |] -> Number + = fun + results + => + std.array.fold_left (fun n b => if b == 'Ok then n + 1 else n) 0 + results + in + let results + = std.array.map (fun pred => pred x) preds + in + let count + = count_ok results + in + if count == 0 then + let errors + = std.array.flat_map + (fun + result + => + (match { 'Ok => [ ], 'Err s => [ " - %{s}" ], }) + result) results + in + 'Err + m%" + oneOf: none of the options matched + %{std.string.join + m%" + + + "% errors} + "% + else + if count > 1 then + 'Err "oneOf: more than one of the options matched" + else + 'Ok, + records = + { + dependencies + : { _ : Dyn } -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7]" + = let mustHaveFields + : Array String -> { _ : Dyn } -> [| 'Ok, 'Err String |] + = fun + fields + x + => + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field x) then + 'Err "expected field `%{field}`" + else + acc) 'Ok fields + in + fun + deps + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + let result + = if std.is_array value then + mustHaveFields (value | Array String) x + else + let pred + | Dyn -> [| 'Ok, 'Err String |] + = value + in + pred (x | Dyn) + in + (match { + 'Err + msg => + 'Err + "dependency of `%{field}` failed: %{msg}", + 'Ok => + acc, + }) result) 'Ok (std.record.to_array deps), + maxProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxProperties n x` fails if `x` is a record containing stricly more than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) > n then + 'Err + "record contains more than %{std.string.from_number + n} fields" + else + 'Ok, + minProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minProperties n x` fails if `x` is a record containing stricly less than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) < n then + 'Err + "record contains fewer than %{std.string.from_number + n} fields" + else + 'Ok, + propertyNames + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8]" + = fun + pred + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` did not validate against `propertyNames` schema", + 'Ok => + acc, + }) (pred (field | Dyn))) 'Ok + (std.record.fields (x | { _ : Dyn })), + record + : { _ : Dyn -> [| 'Ok, 'Err String |] } + -> { _ : Dyn -> [| 'Ok, 'Err String |] } + -> Bool + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `record properties patternProperties additionalAllowed + additionalProperties x` is a combination of the `properties`, + `patternProperties` and `additionalProperties` validation keywords in + JSON schema. + + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5] + "% + = fun + properties + patternProperties + additionalAllowed + additionalProperties + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + let check_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true acc.checked, + result = acc.result, + }, + }) (value x."%{field}")) + { checked = {}, result = 'Ok, } + (std.record.to_array properties) + in + let matching_fields + : String -> { _ : Dyn } + = fun + pattern + => + let matcher + = std.string.is_match pattern + in + std.array.fold_left + (fun + acc + => + fun + { field, value, } + => + if matcher field then + std.record.insert field value acc + else + acc) {} (std.record.to_array x) + in + let check_pattern_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field = pattern, value = pred, } + => + fun + acc + => + (match { + r @ { result = 'Err msg, .. } => + r, + { result = 'Ok, checked = ch, } => + { + checked = + std.array.fold_left + (fun + r + field + => + if !(std.record.has_field field + r) then + std.record.insert field true r + else + r) acc.checked + (std.record.fields ch), + result = acc.result, + }, + }) + (std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true + acc.checked, + result = acc.result, + }, + }) (pred value)) + { + checked : { _ : Bool } = {}, + result = 'Ok, + } + (std.record.to_array + (matching_fields pattern)))) + { checked : { _ : Bool } = {}, result = 'Ok, } + (std.record.to_array patternProperties) + in + let remaining_fields + = std.array.fold_left + (fun + acc + field + => + if !(std.record.has_field field acc) then + acc + else + std.record.remove field acc) x + ((std.record.fields check_properties.checked) + @ (std.record.fields + check_pattern_properties.checked)) + in + let check_additional_properties + : [| 'Ok, 'Err String |] + = if (!additionalAllowed) + && (!(std.record.is_empty remaining_fields)) then + 'Err + "extra fields %{std.serialize 'Json + ((std.record.fields remaining_fields) + | Dyn)}" + else + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` didn't validate: %{msg}", + 'Ok => + acc, + }) (additionalProperties value)) 'Ok + (std.record.to_array remaining_fields) + in + (match { + 'Err + msg => + check_properties.result, + 'Ok => + (match { + 'Err + msg => + check_pattern_properties.result, + 'Ok => + check_additional_properties, + }) check_pattern_properties.result, + }) check_properties.result, + required + : Array String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3]" + = fun + fields + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field (x | { _ : Dyn })) then + 'Err "missing required field %{field}" + else + acc) 'Ok fields, + }, + strings = + { + maxLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.1]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) <= limit then + 'Ok + else + 'Err + "expected a string of length no larger than %{std.string.from_number + limit}", + minLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.2]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) >= limit then + 'Ok + else + 'Err + "expected a string of length no smaller than %{std.string.from_number + limit}", + pattern + : String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.3]" + = fun + pattern + x + => + if !(std.is_string x) then + 'Ok + else + if std.string.is_match pattern (x | String) then + 'Ok + else + 'Err "expected a string matching the pattern `%{pattern}`", + }, + } + in +let rec _js2n__-refsenv + = {} + in + { + cleaners | Array (String) | optional, + symbols | Dyn | optional, + to_replace + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record {} {} true + (_js2n__-prdslib.isType '"String") + ]) + | optional, + } \ No newline at end of file diff --git a/out/EveryVoice TTS Toolkit Vocoder Configuration.ncl b/out/EveryVoice TTS Toolkit Vocoder Configuration.ncl new file mode 100644 index 0000000..e6d5d37 --- /dev/null +++ b/out/EveryVoice TTS Toolkit Vocoder Configuration.ncl @@ -0,0 +1,935 @@ +# DO NOT EDIT +# This file was automatically generated using json-schema-to-nickel +let _js2n__-prdslib + = { + allOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `allOf preds` succeeds if all of the predicates in `preds` succeed + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1] + "% + = fun + preds + x + => + std.array.fold_right + (fun pred acc => (match { 'Ok => acc, 'Err s => 'Err s, }) (pred x)) + 'Ok preds, + always : Dyn -> [| 'Ok, 'Err String |] = std.function.const 'Ok, + anyOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `anyOf preds` succeeds if at least one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2] + "% + = fun + preds + x + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + anyOf: none of the options matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + pred + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) preds), + arrays = + { + additionalItems + : (Dyn -> [| 'Ok, 'Err String |]) + -> Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2]" + = fun + pred + start + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let value_length + = std.array.length x + in + if start >= value_length then + 'Ok + else + arrayOf pred + ((std.array.slice start value_length x) + | Dyn), + arrayOf + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Apply a predicate to all elements of an array, succeeding if all + applications succeed. + "% + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + std.array.fold_right + (fun + x + acc + => + (match { 'Ok => acc, 'Err msg => 'Err msg, }) (pred x)) + 'Ok x, + contains + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6]" + = fun + pred + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + 'Err + m%" + contains: no elements matched + %{std.string.join + m%" + + + "% msgs} + "%, + }) + (std.array.fold_right + (fun + x + acc + => + (match { + 'Ok => + 'Ok, + 'Errs + msgs => + (match { + 'Ok => + 'Ok, + 'Err + msg => + 'Errs ([ " - %{msg}" ] @ msgs), + }) (pred x), + }) acc) ('Errs [ ]) x), + items + : Array (Dyn -> [| 'Ok, 'Err String |]) + -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1]" + = fun + preds + x + => + if !(std.is_array x) then + 'Ok + else + let x + | Array Dyn + = x + in + let length_to_check + = std.number.min (std.array.length preds) + (std.array.length x) + in + std.array.fold_right + (fun + i + acc + => + (match { 'Err msg => 'Err msg, 'Ok => acc, }) + (std.array.at i preds (std.array.at i x))) 'Ok + (std.array.range 0 length_to_check), + maxItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxItems n x` fails if `x` is an array of length strictly greater than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.3] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) > n then + 'Err + "array is longer than %{std.string.from_number n} items" + else + 'Ok, + minItems + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minItems n x` fails if `x` is an array of length strictly smaller than `n` and succeeds otherwise. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.4] + "% + = fun + n + x + => + if !(std.is_array x) then + 'Ok + else + if (std.array.length (x | Array Dyn)) < n then + 'Err + "array is shorter than %{std.string.from_number n} items" + else + 'Ok, + uniqueItems + : Dyn -> [| 'Ok, 'Err String |] + | doc m%" + Succeeds for any array if its elements are pairwise distinct. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.5] + "% + = let find_duplicate + : Array Dyn + -> { + has_duplicate : Bool, + duplicate : Dyn, + seen : { _ : Bool } + } + = std.array.fold_right + (fun + elt + acc + => + if acc.has_duplicate then + acc + else + let index + = std.serialize 'Json elt + in + if std.record.has_field index acc.seen then + { + duplicate = elt, + has_duplicate = true, + seen = acc.seen, + } + else + { + duplicate = null, + has_duplicate = false, + seen = std.record.insert index true acc.seen, + }) + { duplicate = null, has_duplicate = false, seen = {}, } + in + fun + x + => + if !(std.is_array x) then + 'Ok + else + let { has_duplicate, duplicate, .. } + = find_duplicate (x | Array Dyn) + in + if has_duplicate then + 'Err "duplicate found: %{std.serialize 'Json duplicate}" + else + 'Ok, + }, + const + : Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `const value x` succeeds if and only if `x` is equal to `value` + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.3] + "% + = fun + value + x + => + if x == value then + 'Ok + else + 'Err "expected %{std.serialize 'Json value}", + contract_from_predicate + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> Dyn -> Dyn + = fun + predicate + label + value + => + (match { + 'Ok => + value, + 'Err + msg => + (std.contract.blame_with_message msg label) + | Dyn, + }) (predicate value), + enum + : Array Dyn -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `enum values x` succeeds if and only if `x` is equal to one of the elements of `values`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.2] + "% + = let checkEqual + = fun + input + variant + => + (input == variant) + || ((std.is_enum input) + && (((std.string.from_enum input) == variant) + | Bool)) + in + fun + values + x + => + std.array.fold_right + (fun value acc => if checkEqual x value then 'Ok else acc) + ('Err "expected one of %{std.serialize 'Json (values | Dyn)}") + values, + from_simple_predicate + : String -> (Dyn -> Bool) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Convert a simple boolean predicate into a predicate supporting error messages" + = fun error' pred x => if pred x then 'Ok else 'Err error', + ifThenElse + : (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `ifThenElse i t e` first checks if the predicate `i` succeeds. If it does, it's equivalent to `t`, otherwise it's equivalent to `e`. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6] + "% + = fun i t e x => (match { 'Ok => t x, 'Err msg => e x, }) (i x), + isType + : [| '"Array", '"Bool", 'Integer, 'Null, '"Number", 'Record, '"String" |] + -> Dyn -> [| 'Ok, 'Err String |] + = fun + t + => + (match { + 'Null => + from_simple_predicate "expected `null`" (fun x => x == null), + 'Integer => + from_simple_predicate "expected an integer" + (fun + x + => + (std.is_number x) && (std.number.is_integer (x | Number))), + _ => + from_simple_predicate + "value is not of type %{std.string.from_enum t}" + (fun x => (std.typeof x) == t), + }) t, + never : Dyn -> [| 'Ok, 'Err String |] = std.function.const ('Err "never"), + not + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `not pred` succeeds if and only if `pred` fails + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4] + "% + = fun + pred + x + => + (match { + 'Ok => + 'Err "Inverted predicate succeeded unexpectedly", + 'Err + msg => + 'Ok, + }) (pred x), + numbers = + { + exclusiveMaximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) < limit then + 'Ok + else + 'Err + "expected an exclusive maximum of %{std.string.from_number + limit}", + exclusiveMinimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.5]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) > limit then + 'Ok + else + 'Err + "expected an exclusive minimum of %{std.string.from_number + limit}", + maximum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.2]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) <= limit then + 'Ok + else + 'Err + "expected a maximum of %{std.string.from_number limit}", + minimum + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.4]" + = fun + limit + x + => + if !(std.is_number x) then + 'Ok + else + if (x | Number) >= limit then + 'Ok + else + 'Err + "expected a minimum of %{std.string.from_number limit}", + multipleOf + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.1]" + = fun + mult + x + => + if !(std.is_number x) then + 'Ok + else + if std.number.is_integer ((x | Number) / mult) then + 'Ok + else + 'Err + "expected a multiple of %{std.string.from_number mult}", + }, + oneOf + : Array (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `oneOf preds` succeeds if precisely one of the predicates in `preds` succeeds + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3] + "% + = fun + preds + x + => + let count_ok + : Array [| 'Ok, 'Err String |] -> Number + = fun + results + => + std.array.fold_left (fun n b => if b == 'Ok then n + 1 else n) 0 + results + in + let results + = std.array.map (fun pred => pred x) preds + in + let count + = count_ok results + in + if count == 0 then + let errors + = std.array.flat_map + (fun + result + => + (match { 'Ok => [ ], 'Err s => [ " - %{s}" ], }) + result) results + in + 'Err + m%" + oneOf: none of the options matched + %{std.string.join + m%" + + + "% errors} + "% + else + if count > 1 then + 'Err "oneOf: more than one of the options matched" + else + 'Ok, + records = + { + dependencies + : { _ : Dyn } -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7]" + = let mustHaveFields + : Array String -> { _ : Dyn } -> [| 'Ok, 'Err String |] + = fun + fields + x + => + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field x) then + 'Err "expected field `%{field}`" + else + acc) 'Ok fields + in + fun + deps + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + let result + = if std.is_array value then + mustHaveFields (value | Array String) x + else + let pred + | Dyn -> [| 'Ok, 'Err String |] + = value + in + pred (x | Dyn) + in + (match { + 'Err + msg => + 'Err + "dependency of `%{field}` failed: %{msg}", + 'Ok => + acc, + }) result) 'Ok (std.record.to_array deps), + maxProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `maxProperties n x` fails if `x` is a record containing stricly more than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) > n then + 'Err + "record contains more than %{std.string.from_number + n} fields" + else + 'Ok, + minProperties + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `minProperties n x` fails if `x` is a record containing stricly less than `n` fields. + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.1] + "% + = fun + n + x + => + if !(std.is_record x) then + 'Ok + else + if (std.record.length (x | { _ : Dyn })) < n then + 'Err + "record contains fewer than %{std.string.from_number + n} fields" + else + 'Ok, + propertyNames + : (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8]" + = fun + pred + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` did not validate against `propertyNames` schema", + 'Ok => + acc, + }) (pred (field | Dyn))) 'Ok + (std.record.fields (x | { _ : Dyn })), + record + : { _ : Dyn -> [| 'Ok, 'Err String |] } + -> { _ : Dyn -> [| 'Ok, 'Err String |] } + -> Bool + -> (Dyn -> [| 'Ok, 'Err String |]) -> Dyn -> [| 'Ok, 'Err String |] + | doc m%" + `record properties patternProperties additionalAllowed + additionalProperties x` is a combination of the `properties`, + `patternProperties` and `additionalProperties` validation keywords in + JSON schema. + + Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5] + "% + = fun + properties + patternProperties + additionalAllowed + additionalProperties + x + => + if !(std.is_record x) then + 'Ok + else + let x + | { _ : Dyn } + = x + in + let check_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + if !(std.record.has_field field x) then + acc + else + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true acc.checked, + result = acc.result, + }, + }) (value x."%{field}")) + { checked = {}, result = 'Ok, } + (std.record.to_array properties) + in + let matching_fields + : String -> { _ : Dyn } + = fun + pattern + => + let matcher + = std.string.is_match pattern + in + std.array.fold_left + (fun + acc + => + fun + { field, value, } + => + if matcher field then + std.record.insert field value acc + else + acc) {} (std.record.to_array x) + in + let check_pattern_properties + : { + result : [| 'Ok, 'Err String |], + checked : { _ : Bool } + } + = std.array.fold_right + (fun + { field = pattern, value = pred, } + => + fun + acc + => + (match { + r @ { result = 'Err msg, .. } => + r, + { result = 'Ok, checked = ch, } => + { + checked = + std.array.fold_left + (fun + r + field + => + if !(std.record.has_field field + r) then + std.record.insert field true r + else + r) acc.checked + (std.record.fields ch), + result = acc.result, + }, + }) + (std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + { + checked : { _ : Bool } = {}, + result = + 'Err + "field `%{field}` didn't validate: %{msg}", + }, + 'Ok => + { + checked = + std.record.insert field true + acc.checked, + result = acc.result, + }, + }) (pred value)) + { + checked : { _ : Bool } = {}, + result = 'Ok, + } + (std.record.to_array + (matching_fields pattern)))) + { checked : { _ : Bool } = {}, result = 'Ok, } + (std.record.to_array patternProperties) + in + let remaining_fields + = std.array.fold_left + (fun + acc + field + => + if !(std.record.has_field field acc) then + acc + else + std.record.remove field acc) x + ((std.record.fields check_properties.checked) + @ (std.record.fields + check_pattern_properties.checked)) + in + let check_additional_properties + : [| 'Ok, 'Err String |] + = if (!additionalAllowed) + && (!(std.record.is_empty remaining_fields)) then + 'Err + "extra fields %{std.serialize 'Json + ((std.record.fields remaining_fields) + | Dyn)}" + else + std.array.fold_right + (fun + { field, value, } + => + fun + acc + => + (match { + 'Err + msg => + 'Err + "field `%{field}` didn't validate: %{msg}", + 'Ok => + acc, + }) (additionalProperties value)) 'Ok + (std.record.to_array remaining_fields) + in + (match { + 'Err + msg => + check_properties.result, + 'Ok => + (match { + 'Err + msg => + check_pattern_properties.result, + 'Ok => + check_additional_properties, + }) check_pattern_properties.result, + }) check_properties.result, + required + : Array String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3]" + = fun + fields + x + => + if !(std.is_record x) then + 'Ok + else + std.array.fold_right + (fun + field + acc + => + if !(std.record.has_field field (x | { _ : Dyn })) then + 'Err "missing required field %{field}" + else + acc) 'Ok fields, + }, + strings = + { + maxLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.1]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) <= limit then + 'Ok + else + 'Err + "expected a string of length no larger than %{std.string.from_number + limit}", + minLength + : Number -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.2]" + = fun + limit + x + => + if !(std.is_string x) then + 'Ok + else + if (std.string.length (x | String)) >= limit then + 'Ok + else + 'Err + "expected a string of length no smaller than %{std.string.from_number + limit}", + pattern + : String -> Dyn -> [| 'Ok, 'Err String |] + | doc "Cf. [https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.3.3]" + = fun + pattern + x + => + if !(std.is_string x) then + 'Ok + else + if std.string.is_match pattern (x | String) then + 'Ok + else + 'Err "expected a string matching the pattern `%{pattern}`", + }, + } + in +let rec _js2n__-refsenv + = {} + in + { + contact + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "EveryVoice requires a contact name and email to help prevent misuse. Please read our Guide to understand more about the importance of misuse prevention with TTS.", + model + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The model configuration settings." + | optional, + path_to_model_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a model configuration file." + | optional, + path_to_preprocessing_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a preprocessing configuration file." + | optional, + path_to_training_config_file + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.anyOf + [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ]) + | doc "The path of a training configuration file." + | optional, + preprocessing + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The preprocessing configuration, including information about audio settings." + | optional, + training + | _js2n__-prdslib.contract_from_predicate _js2n__-prdslib.always + | doc "The training configuration hyperparameters." + | optional, + } \ No newline at end of file diff --git a/out/Firebase.ncl b/out/Firebase.ncl index 7a6e5e6..421b811 100644 --- a/out/Firebase.ncl +++ b/out/Firebase.ncl @@ -1105,10 +1105,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "location", "source" ], + _js2n__-prdslib.records.required [ "source" ], _js2n__-prdslib.records.record { - location = _js2n__-prdslib.isType '"String", postdeploy = _js2n__-prdslib.anyOf [ @@ -1141,11 +1140,9 @@ let rec _js2n__-refsenv (_js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required - [ "location", "source" ], + _js2n__-prdslib.records.required [ "source" ], _js2n__-prdslib.records.record { - location = _js2n__-prdslib.isType '"String", postdeploy = _js2n__-prdslib.anyOf [ diff --git a/out/GraphQL Mesh.ncl b/out/GraphQL Mesh.ncl index 6cd699e..453e999 100644 --- a/out/GraphQL Mesh.ncl +++ b/out/GraphQL Mesh.ncl @@ -2942,6 +2942,7 @@ let rec _js2n__-refsenv ], commaRoundTrip = _js2n__-prdslib.isType '"Bool", indices = _js2n__-prdslib.isType '"Bool", + jsonStringify = _js2n__-prdslib.isType '"Bool", } {} false _js2n__-prdslib.never ], "_js2n__-:definitions/RAMLHandler!predicate" = diff --git a/out/Haystack Pipeline.ncl b/out/Haystack Pipeline.ncl index 07a52f4..8f281cc 100644 --- a/out/Haystack Pipeline.ncl +++ b/out/Haystack Pipeline.ncl @@ -1274,6 +1274,13 @@ let rec _js2n__-refsenv { version = _js2n__-prdslib.const "1.25.5", } {} true _js2n__-prdslib.always, _js2n__-prdslib.always + ], + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.records.record + { version = _js2n__-prdslib.const "1.26.2", } {} true + _js2n__-prdslib.always, + _js2n__-prdslib.always ] ] ]) \ No newline at end of file diff --git a/out/KSP-CKAN.ncl b/out/KSP-CKAN.ncl index 911ffec..48392dd 100644 --- a/out/KSP-CKAN.ncl +++ b/out/KSP-CKAN.ncl @@ -1352,6 +1352,7 @@ let rec _js2n__-refsenv bugtracker = _js2n__-prdslib.isType '"String", ci = _js2n__-prdslib.isType '"String", curse = _js2n__-prdslib.isType '"String", + discussions = _js2n__-prdslib.isType '"String", homepage = _js2n__-prdslib.isType '"String", license = _js2n__-prdslib.isType '"String", manual = _js2n__-prdslib.isType '"String", diff --git a/out/Madness (madness.yml).ncl b/out/Madness (madness.yml).ncl index e1486d9..e57e68f 100644 --- a/out/Madness (madness.yml).ncl +++ b/out/Madness (madness.yml).ncl @@ -912,35 +912,35 @@ let rec _js2n__-refsenv ] ]) | doc m%" - Whether to provide user:password for basic authentication of the current site + Whether to provide user:password for basic authentication https://madness.dannyb.co/#configuration-file "% | optional, auth_zone | String | doc m%" - An auth realm name of the current site + An auth realm name https://madness.dannyb.co/#configuration-file "% | optional, auto_h1 | Bool | doc m%" - Whether to add H1 title to files that do not have one of the current site + Whether to add H1 title to files that do not have one https://madness.dannyb.co/#configuration-file "% | optional, auto_nav | Bool | doc m%" - Whether to append navigation to directory READMEs of the current site + Whether to append navigation to directory READMEs https://madness.dannyb.co/#configuration-file "% | optional, auto_toc | Bool | doc m%" - Whether to enable table of contents of the current site + Whether to enable table of contents https://madness.dannyb.co/#configuration-file "% | optional, @@ -957,7 +957,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Null ]) | doc m%" - A server root path of the current site + Server root URI https://madness.dannyb.co/#configuration-file "% | optional, @@ -969,14 +969,14 @@ let rec _js2n__-refsenv _js2n__-prdslib.strings.pattern "^\\d+\\.\\d+\\.\\d+\\.\\d+$" ]) | doc m%" - A server listen address of the current site + Server listening address https://madness.dannyb.co/#configuration-file "% | optional, copy_code | Bool | doc m%" - Whether to enable the copy to clipboard icon for code snippets of the current site + Whether to enable the copy to clipboard icon for code snippets https://madness.dannyb.co/#configuration-file "% | optional, @@ -990,7 +990,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.arrays.uniqueItems ]) | doc m%" - Excluded directories of the current site + Excluded directories https://madness.dannyb.co/#configuration-file "% | optional, @@ -1007,21 +1007,28 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Null ]) | doc m%" - Whether to show files with these extensions in the navigation and search of the current site + Show files with these extensions in the navigation https://madness.dannyb.co/#configuration-file "% | optional, highlighter | Bool | doc m%" - Whether to enable syntax highlighter for code snippets of the current site + Whether to enable syntax highlighter for code snippets + https://madness.dannyb.co/#configuration-file + "% + | optional, + mermaid + | Bool + | doc m%" + Whether to enable support for mermaid diagrams https://madness.dannyb.co/#configuration-file "% | optional, open | Bool | doc m%" - Whether to open the server URL in the browser of the current site + Whether to open the server URL in the browser https://madness.dannyb.co/#configuration-file "% | optional, @@ -1033,7 +1040,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.strings.minLength 1 ]) | doc m%" - A path to the documentation root of the current site + Path to the documentation root https://madness.dannyb.co/#configuration-file "% | optional, @@ -1045,7 +1052,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.numbers.minimum 0 ]) | doc m%" - A server port of the current site + Server port https://madness.dannyb.co/#configuration-file "% | optional, @@ -1060,14 +1067,14 @@ let rec _js2n__-refsenv shortlinks | Bool | doc m%" - Whether to convert [[Links]] to [Links](Links) of the current site + Whether to convert [[Links]] to [Links](Links) https://madness.dannyb.co/#configuration-file "% | optional, sidebar | Bool | doc m%" - Whether to enable sidebar of the current site + Whether to enable sidebar https://madness.dannyb.co/#configuration-file "% | optional, @@ -1075,7 +1082,7 @@ let rec _js2n__-refsenv | std.enum.TagOrString | [| 'mixed, 'dirs_first |] | doc m%" - The navigation sort order + Navigation sort order https://madness.dannyb.co/#configuration-file "% | optional, @@ -1091,7 +1098,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Null ]) | doc m%" - A link to the page source code + Template for source code links https://madness.dannyb.co/#configuration-file "% | optional, @@ -1103,7 +1110,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.strings.minLength 1 ]) | doc m%" - A label for the page source code link + Label for the page source code link https://madness.dannyb.co/#configuration-file "% | optional, @@ -1127,7 +1134,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Null ]) | doc m%" - A theme directory of the current site + Theme directory https://madness.dannyb.co/#configuration-file "% | optional, @@ -1143,7 +1150,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Null ]) | doc m%" - Whether to generate a table of contents file with this name of the current site + Whether to generate a table of contents file with this name https://madness.dannyb.co/#configuration-file "% | optional, diff --git a/out/MetricsHub Configuration.ncl b/out/MetricsHub Configuration.ncl index cc3133d..81e00b6 100644 --- a/out/MetricsHub Configuration.ncl +++ b/out/MetricsHub Configuration.ncl @@ -937,7 +937,7 @@ let rec _js2n__-refsenv [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.enum - [ "and", "leftConcat", "rightConcat" ] + [ "and", "prepend", "append" ] ], value = _js2n__-prdslib.isType '"String", } {} true _js2n__-prdslib.always, @@ -1431,6 +1431,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", https = _js2n__-prdslib.isType '"Bool", @@ -1456,6 +1459,9 @@ let rec _js2n__-refsenv bmcKey = _js2n__-prdslib.isType '"String", + hostname = + _js2n__-prdslib.isType + '"String", password = _js2n__-prdslib.isType '"String", @@ -1475,6 +1481,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", sudoCommand = _js2n__-prdslib.isType '"String", @@ -1494,33 +1503,100 @@ let rec _js2n__-refsenv ], } {} true _js2n__-prdslib.always ], + ping = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + hostname = + _js2n__-prdslib.isType + '"String", + timeout = + _js2n__-refsenv."_js2n__-:definitions/duration!predicate", + } {} true _js2n__-prdslib.always + ], snmp = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.oneOf - [ - _js2n__-prdslib.records.record - { - community = - _js2n__-prdslib.isType + _js2n__-prdslib.records.record + { + community = + _js2n__-prdslib.isType + '"String", + hostname = + _js2n__-prdslib.isType + '"String", + port = + _js2n__-prdslib.isType + '"Number", + timeout = + _js2n__-refsenv."_js2n__-:definitions/duration!predicate", + version = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", - port = - _js2n__-prdslib.isType - '"Number", - timeout = - _js2n__-refsenv."_js2n__-:definitions/duration!predicate", - version = - _js2n__-prdslib.allOf + _js2n__-prdslib.enum + [ "v1", "v2c" ] + ], + } {} true _js2n__-prdslib.always + ], + snmpv3 = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + authType = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"String", + _js2n__-prdslib.enum [ - _js2n__-prdslib.isType - '"String", - _js2n__-prdslib.enum - [ "v1", "v2c" ] - ], - } {} true - _js2n__-prdslib.always - ] + "NO_AUTH", + "MD5", + "SHA" + ] + ], + contextName = + _js2n__-prdslib.isType + '"String", + hostname = + _js2n__-prdslib.isType + '"String", + password = + _js2n__-prdslib.isType + '"String", + port = + _js2n__-prdslib.isType + '"Number", + privacy = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"String", + _js2n__-prdslib.enum + [ + "DES", + "AES", + "none" + ] + ], + privacyPassword = + _js2n__-prdslib.isType + '"String", + retryIntervals = + _js2n__-prdslib.isType + '"String", + timeout = + _js2n__-refsenv."_js2n__-:definitions/duration!predicate", + username = + _js2n__-prdslib.isType + '"String", + } {} true _js2n__-prdslib.always ], ssh = _js2n__-prdslib.allOf @@ -1528,6 +1604,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", password = _js2n__-prdslib.isType '"String", @@ -1562,6 +1641,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", namespace = _js2n__-refsenv."_js2n__-:definitions/namespace!predicate", password = @@ -1602,6 +1684,9 @@ let rec _js2n__-refsenv ] ]) ], + hostname = + _js2n__-prdslib.isType + '"String", namespace = _js2n__-refsenv."_js2n__-:definitions/namespace!predicate", password = @@ -1625,6 +1710,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", namespace = _js2n__-refsenv."_js2n__-:definitions/namespace!predicate", password = @@ -1957,6 +2045,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", https = _js2n__-prdslib.isType '"Bool", @@ -1982,6 +2073,9 @@ let rec _js2n__-refsenv bmcKey = _js2n__-prdslib.isType '"String", + hostname = + _js2n__-prdslib.isType + '"String", password = _js2n__-prdslib.isType '"String", @@ -2001,6 +2095,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", sudoCommand = _js2n__-prdslib.isType '"String", @@ -2020,33 +2117,100 @@ let rec _js2n__-refsenv ], } {} true _js2n__-prdslib.always ], + ping = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + hostname = + _js2n__-prdslib.isType + '"String", + timeout = + _js2n__-refsenv."_js2n__-:definitions/duration!predicate", + } {} true _js2n__-prdslib.always + ], snmp = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.oneOf - [ - _js2n__-prdslib.records.record - { - community = - _js2n__-prdslib.isType + _js2n__-prdslib.records.record + { + community = + _js2n__-prdslib.isType + '"String", + hostname = + _js2n__-prdslib.isType + '"String", + port = + _js2n__-prdslib.isType + '"Number", + timeout = + _js2n__-refsenv."_js2n__-:definitions/duration!predicate", + version = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", - port = - _js2n__-prdslib.isType - '"Number", - timeout = - _js2n__-refsenv."_js2n__-:definitions/duration!predicate", - version = - _js2n__-prdslib.allOf + _js2n__-prdslib.enum + [ "v1", "v2c" ] + ], + } {} true _js2n__-prdslib.always + ], + snmpv3 = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + authType = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"String", + _js2n__-prdslib.enum [ - _js2n__-prdslib.isType - '"String", - _js2n__-prdslib.enum - [ "v1", "v2c" ] - ], - } {} true - _js2n__-prdslib.always - ] + "NO_AUTH", + "MD5", + "SHA" + ] + ], + contextName = + _js2n__-prdslib.isType + '"String", + hostname = + _js2n__-prdslib.isType + '"String", + password = + _js2n__-prdslib.isType + '"String", + port = + _js2n__-prdslib.isType + '"Number", + privacy = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"String", + _js2n__-prdslib.enum + [ + "DES", + "AES", + "none" + ] + ], + privacyPassword = + _js2n__-prdslib.isType + '"String", + retryIntervals = + _js2n__-prdslib.isType + '"String", + timeout = + _js2n__-refsenv."_js2n__-:definitions/duration!predicate", + username = + _js2n__-prdslib.isType + '"String", + } {} true _js2n__-prdslib.always ], ssh = _js2n__-prdslib.allOf @@ -2054,6 +2218,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", password = _js2n__-prdslib.isType '"String", @@ -2088,6 +2255,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", namespace = _js2n__-refsenv."_js2n__-:definitions/namespace!predicate", password = @@ -2128,6 +2298,9 @@ let rec _js2n__-refsenv ] ]) ], + hostname = + _js2n__-prdslib.isType + '"String", namespace = _js2n__-refsenv."_js2n__-:definitions/namespace!predicate", password = @@ -2151,6 +2324,9 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + hostname = + _js2n__-prdslib.isType + '"String", namespace = _js2n__-refsenv."_js2n__-:definitions/namespace!predicate", password = @@ -2387,6 +2563,65 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", _js2n__-prdslib.const "wmi" ], + } {} true _js2n__-prdslib.always, + _js2n__-prdslib.records.record + { + computes = + _js2n__-refsenv."_js2n__-:definitions/computes!predicate", + executeForEachEntryOf = + _js2n__-refsenv."_js2n__-:definitions/executeForEachEntryOf!predicate", + forceSerialization = _js2n__-prdslib.isType '"Bool", + query = _js2n__-prdslib.isType '"String", + tables = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + alias = + _js2n__-prdslib.isType + '"String", + columns = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + name = + _js2n__-prdslib.isType + '"String", + number = + _js2n__-prdslib.isType + 'Integer, + type = + _js2n__-prdslib.isType + '"String", + } {} true + _js2n__-prdslib.always + ]) + ], + source = + _js2n__-prdslib.isType + '"String", + } {} true _js2n__-prdslib.always + ]) + ], + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.const "sql" + ], } {} true _js2n__-prdslib.always ] ]) diff --git a/out/MetricsHub Connector Configuration.ncl b/out/MetricsHub Connector Configuration.ncl index a8d1f85..fd68603 100644 --- a/out/MetricsHub Connector Configuration.ncl +++ b/out/MetricsHub Connector Configuration.ncl @@ -937,7 +937,7 @@ let rec _js2n__-refsenv [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.enum - [ "and", "leftConcat", "rightConcat" ] + [ "and", "prepend", "append" ] ], value = _js2n__-prdslib.isType '"String", } {} true _js2n__-prdslib.always, @@ -1362,6 +1362,66 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", _js2n__-prdslib.const "wmi" ], + } {} true _js2n__-prdslib.always, + _js2n__-prdslib.records.record + { + computes = + _js2n__-refsenv."_js2n__-:definitions/computes!predicate", + executeForEachEntryOf = + _js2n__-refsenv."_js2n__-:definitions/executeForEachEntryOf!predicate", + forceSerialization = + _js2n__-prdslib.isType '"Bool", + query = _js2n__-prdslib.isType '"String", + tables = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + alias = + _js2n__-prdslib.isType + '"String", + columns = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + name = + _js2n__-prdslib.isType + '"String", + number = + _js2n__-prdslib.isType + 'Integer, + type = + _js2n__-prdslib.isType + '"String", + } {} true + _js2n__-prdslib.always + ]) + ], + source = + _js2n__-prdslib.isType + '"String", + } {} true _js2n__-prdslib.always + ]) + ], + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.const "sql" + ], } {} true _js2n__-prdslib.always ] ]) @@ -1559,6 +1619,65 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", _js2n__-prdslib.const "wmi" ], + } {} true _js2n__-prdslib.always, + _js2n__-prdslib.records.record + { + computes = + _js2n__-refsenv."_js2n__-:definitions/computes!predicate", + executeForEachEntryOf = + _js2n__-refsenv."_js2n__-:definitions/executeForEachEntryOf!predicate", + forceSerialization = _js2n__-prdslib.isType '"Bool", + query = _js2n__-prdslib.isType '"String", + tables = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + alias = + _js2n__-prdslib.isType + '"String", + columns = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType + 'Record, + _js2n__-prdslib.records.record + { + name = + _js2n__-prdslib.isType + '"String", + number = + _js2n__-prdslib.isType + 'Integer, + type = + _js2n__-prdslib.isType + '"String", + } {} true + _js2n__-prdslib.always + ]) + ], + source = + _js2n__-prdslib.isType + '"String", + } {} true _js2n__-prdslib.always + ]) + ], + type = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.const "sql" + ], } {} true _js2n__-prdslib.always ] ]) diff --git a/out/Network-as-Code Data Model.ncl b/out/Network-as-Code Data Model.ncl index ee3a289..335f6b4 100644 --- a/out/Network-as-Code Data Model.ncl +++ b/out/Network-as-Code Data Model.ncl @@ -74791,17 +74791,16 @@ let rec _js2n__-refsenv | doc m%" Severity (Integer) - Maximum value: 7 - "% - | optional, - vrf | String | doc "VRF (String)" | optional, + "%, + vrf | String | doc "VRF (String)", } | doc m%" Syslog Servers (List - Object) Elements: - ip_address (required) - - vrf - - severity + - vrf (required) + - severity (required) "% | optional, vpc @@ -75533,7 +75532,10 @@ let rec _js2n__-refsenv | optional, vrf_intf_desc | String - | doc "VRF Intf Desc (String)" + | doc m%" + VRF Intf Desc (String) + - Default value: Configured by Ansible NetAsCode + "% | optional, vrf_vlan_name | String diff --git a/out/Nuitka.yaml.ncl b/out/Nuitka.yaml.ncl index ea8066f..516cd82 100644 --- a/out/Nuitka.yaml.ncl +++ b/out/Nuitka.yaml.ncl @@ -903,13 +903,25 @@ let rec _js2n__-refsenv anti-bloat | Array { + annotations + | std.enum.TagOrString + | [| 'no, 'yes, '"default" |] + | optional, append_plain | String | optional, append_result | String | optional, + asserts + | std.enum.TagOrString + | [| 'no, 'yes, '"default" |] + | optional, bloat-mode-overrides | { .. } | optional, change_class | { .. } | optional, change_function | { .. } | optional, context | Array (String) | optional, description | String | optional, + doc_strings + | std.enum.TagOrString + | [| 'no, 'yes, '"default" |] + | optional, module_code | String | optional, no-auto-follow | { .. } | optional, no-follow | { .. } | optional, diff --git a/out/Quali Torque Blueprint Spec 2.ncl b/out/Quali Torque Blueprint Spec 2.ncl index dfa39ef..e9a6049 100644 --- a/out/Quali Torque Blueprint Spec 2.ncl +++ b/out/Quali Torque Blueprint Spec 2.ncl @@ -1440,6 +1440,8 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + branch = _js2n__-prdslib.isType '"String", + commit = _js2n__-prdslib.isType '"String", path = _js2n__-prdslib.isType '"String", source = _js2n__-prdslib.isType '"String", } {} false _js2n__-prdslib.never @@ -1612,7 +1614,9 @@ let rec _js2n__-refsenv [ "Drift Detected", "Updates Detected", - "Approval Request Triggered", + "Approval Request Approved", + "Approval Request Denied", + "Approval Request Cancelled", "Environment Ended", "Environment Launched", "Environment Active With Error", @@ -1623,7 +1627,9 @@ let rec _js2n__-refsenv "Environment Idle", "drift detected", "updates detected", - "approval request triggered", + "approval request approved", + "approval request denied", + "approval request cancelled", "environment ended", "environment launched", "environment active with error", diff --git a/out/Renovate.ncl b/out/Renovate.ncl index 1c8ab89..f1e1b92 100644 --- a/out/Renovate.ncl +++ b/out/Renovate.ncl @@ -3028,6 +3028,12 @@ let rec _js2n__-refsenv [ _js2n__-prdslib.isType 'Record, _js2n__-prdslib.always ]) | doc "Configuration object for the ruby-version manager" | optional, + runtime-version + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.allOf + [ _js2n__-prdslib.isType 'Record, _js2n__-prdslib.always ]) + | doc "Configuration object for the runtime-version manager" + | optional, sbt | _js2n__-prdslib.contract_from_predicate (_js2n__-prdslib.allOf @@ -3129,7 +3135,6 @@ let rec _js2n__-refsenv "branchAutomergeFailure", "configErrorIssue", "dependencyLookupWarnings", - "deprecationWarningIssues", "lockFileErrors", "missingCredentialsError", "onboardingClose", @@ -3291,6 +3296,7 @@ let rec _js2n__-refsenv "rez", "rpm", "ruby", + "same-major", "semver", "semver-coerced", "swift", diff --git a/out/Ruff.ncl b/out/Ruff.ncl index db0a025..3033450 100644 --- a/out/Ruff.ncl +++ b/out/Ruff.ncl @@ -2294,6 +2294,34 @@ let rec _js2n__-refsenv ], } {} false _js2n__-prdslib.never ], + "_js2n__-:definitions/OutputFormat!predicate" = + _js2n__-prdslib.oneOf + [ + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum + [ + "concise", + "full", + "json", + "json-lines", + "junit", + "grouped", + "github", + "gitlab", + "pylint", + "rdjson", + "azure", + "sarif" + ] + ], + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.enum [ "text" ] + ] + ], "_js2n__-:definitions/ParametrizeNameType!predicate" = _js2n__-prdslib.allOf [ @@ -2672,10 +2700,23 @@ let rec _js2n__-refsenv "ASYNC1", "ASYNC10", "ASYNC100", - "ASYNC101", - "ASYNC102", + "ASYNC105", + "ASYNC109", "ASYNC11", + "ASYNC110", + "ASYNC115", "ASYNC116", + "ASYNC2", + "ASYNC21", + "ASYNC210", + "ASYNC22", + "ASYNC220", + "ASYNC221", + "ASYNC222", + "ASYNC23", + "ASYNC230", + "ASYNC25", + "ASYNC251", "B", "B0", "B00", @@ -3351,7 +3392,6 @@ let rec _js2n__-refsenv "PLR1", "PLR17", "PLR170", - "PLR1701", "PLR1702", "PLR1704", "PLR171", @@ -3630,6 +3670,8 @@ let rec _js2n__-refsenv "RUF027", "RUF028", "RUF029", + "RUF03", + "RUF030", "RUF1", "RUF10", "RUF100", @@ -3815,15 +3857,6 @@ let rec _js2n__-refsenv "TID251", "TID252", "TID253", - "TRIO", - "TRIO1", - "TRIO10", - "TRIO100", - "TRIO105", - "TRIO109", - "TRIO11", - "TRIO110", - "TRIO115", "TRY", "TRY0", "TRY00", @@ -3926,27 +3959,6 @@ let rec _js2n__-refsenv "YTT303" ] ], - "_js2n__-:definitions/SerializationFormat!predicate" = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.enum - [ - "text", - "concise", - "full", - "json", - "json-lines", - "junit", - "grouped", - "github", - "gitlab", - "pylint", - "rdjson", - "azure", - "sarif" - ] - ], "_js2n__-:definitions/Strictness!predicate" = _js2n__-prdslib.oneOf [ @@ -4558,7 +4570,7 @@ let rec _js2n__-refsenv | _js2n__-prdslib.contract_from_predicate (_js2n__-prdslib.anyOf [ - _js2n__-refsenv."_js2n__-:definitions/SerializationFormat!predicate", + _js2n__-refsenv."_js2n__-:definitions/OutputFormat!predicate", _js2n__-prdslib.isType 'Null ]) | doc "The style in which violation messages should be formatted: `\"full\"` (shows source),`\"concise\"` (default), `\"grouped\"` (group messages by file), `\"json\"` (machine-readable), `\"junit\"` (machine-readable XML), `\"github\"` (GitHub Actions annotations), `\"gitlab\"` (GitLab CI code quality report), `\"pylint\"` (Pylint text format) or `\"azure\"` (Azure Pipeline logging commands)." @@ -4687,12 +4699,6 @@ let rec _js2n__-refsenv [ _js2n__-prdslib.isType '"Bool", _js2n__-prdslib.isType 'Null ]) | doc "Whether to show an enumeration of all fixed lint violations (overridden by the `--show-fixes` command-line flag)." | optional, - show-source - | _js2n__-prdslib.contract_from_predicate - (_js2n__-prdslib.anyOf - [ _js2n__-prdslib.isType '"Bool", _js2n__-prdslib.isType 'Null ]) - | doc "Whether to show source code snippets when reporting lint violations (overridden by the `--show-source` command-line flag)." - | optional, src | _js2n__-prdslib.contract_from_predicate (_js2n__-prdslib.allOf diff --git a/out/SauceCTL Configuration.ncl b/out/SauceCTL Configuration.ncl index 7cfa4c3..8a24c62 100644 --- a/out/SauceCTL Configuration.ncl +++ b/out/SauceCTL Configuration.ncl @@ -2201,6 +2201,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.enum [ "package.json", + "13.12.0", "13.10.0", "13.7.3", "13.6.6", @@ -2209,8 +2210,7 @@ let rec _js2n__-refsenv "13.4.0", "13.3.0", "12.17.4", - "12.17.2", - "12.14.0" + "12.17.2" ], } {} false _js2n__-prdslib.never ], @@ -2685,6 +2685,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.enum [ "package.json", + "1.45.0", "1.44.0", "1.43.1", "1.41.2", @@ -2693,8 +2694,7 @@ let rec _js2n__-refsenv "1.39.0", "1.38.1", "1.37.1", - "1.36.2", - "1.35.1" + "1.36.2" ], _js2n__-refsenv."_js2n__-:allOf/8/then/properties/playwright/properties/version!predicate" ], @@ -3248,13 +3248,13 @@ let rec _js2n__-refsenv _js2n__-prdslib.enum [ "package.json", + "3.6.1", "3.6.0", "3.5.0", "3.4.0", "3.3.0", "3.2.0", - "3.0.1", - "2.6.2" + "3.0.1" ], _js2n__-refsenv."_js2n__-:allOf/8/then/properties/playwright/properties/version!predicate" ], diff --git a/out/Semantic Data Fabric (SDF) file.ncl b/out/Semantic Data Fabric (SDF) file.ncl index 21aab38..08a7d1e 100644 --- a/out/Semantic Data Fabric (SDF) file.ncl +++ b/out/Semantic Data Fabric (SDF) file.ncl @@ -1042,13 +1042,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.enum [ "none" ] ] ], - "_js2n__-:definitions/ComputeKind!predicate" - | doc "Supported compute platforms" - = _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.enum [ "local", "remote" ] - ], "_js2n__-:definitions/Config!predicate" | doc "A configuration with section name and properties" = _js2n__-prdslib.allOf @@ -1313,12 +1306,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ], - compute = - _js2n__-prdslib.anyOf - [ - _js2n__-refsenv."_js2n__-:definitions/ComputeKind!predicate", - _js2n__-prdslib.isType 'Null - ], creation-flag = _js2n__-prdslib.anyOf [ @@ -1482,7 +1469,7 @@ let rec _js2n__-refsenv [ _js2n__-prdslib.isType '"String", _js2n__-prdslib.enum - [ "snowflake", "presto", "bigquery", "redshift", "spark-lp" ] + [ "snowflake", "trino", "bigquery", "redshift", "spark-lp" ] ], "_js2n__-:definitions/Environment!predicate" | doc "Environments provide a way to override the fields of a workspace, i.e. if an environment has set field X, then the workspace field X will be overridden by the environment field X." @@ -1492,8 +1479,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.required [ "name" ], _js2n__-prdslib.records.record { - compute = - _js2n__-refsenv."_js2n__-:definitions/ComputeKind!predicate", defaults = _js2n__-prdslib.anyOf [ @@ -1536,13 +1521,6 @@ let rec _js2n__-refsenv _js2n__-refsenv."_js2n__-:definitions/Preprocessor!predicate", _js2n__-prdslib.isType 'Null ], - providers = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/TargetProvider!predicate" - ], repository = _js2n__-prdslib.isType '"String", source-locations = _js2n__-prdslib.allOf @@ -1924,6 +1902,12 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", _js2n__-prdslib.isType 'Null ], + output-location = + _js2n__-prdslib.anyOf + [ + _js2n__-prdslib.isType '"String", + _js2n__-prdslib.isType 'Null + ], provider = _js2n__-refsenv."_js2n__-:definitions/ProviderType!predicate", sources = @@ -2363,6 +2347,12 @@ let rec _js2n__-refsenv _js2n__-refsenv."_js2n__-:definitions/TableCreationFlags!predicate", _js2n__-prdslib.isType 'Null ], + cycle-cut-point = + _js2n__-prdslib.anyOf + [ + _js2n__-prdslib.isType '"Bool", + _js2n__-prdslib.isType 'Null + ], delimiter = _js2n__-prdslib.anyOf [ @@ -2465,12 +2455,6 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"Bool", _js2n__-prdslib.isType 'Null ], - seeded = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType '"Bool", - _js2n__-prdslib.isType 'Null - ], severity = _js2n__-prdslib.anyOf [ @@ -2626,67 +2610,6 @@ let rec _js2n__-refsenv ], } {} false _js2n__-prdslib.never ], - "_js2n__-:definitions/TargetProvider!predicate" - | doc "Table providers manage tables in in catalogs (OLD_PROVIDERS)" - = _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.required [ "type" ], - _js2n__-prdslib.records.record - { - batch-size = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType 'Integer, - _js2n__-prdslib.isType 'Null - ], - _js2n__-prdslib.numbers.minimum 0 - ], - buckets = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/DataBucket!predicate" - ], - cluster-identifier = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.isType 'Null - ], - credential = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.isType 'Null - ], - sources = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/SourcePattern!predicate" - ], - targets = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/TargetPattern!predicate" - ], - type = - _js2n__-refsenv."_js2n__-:definitions/ProviderType!predicate", - warehouse = - _js2n__-prdslib.anyOf - [ - _js2n__-prdslib.isType '"String", - _js2n__-prdslib.isType 'Null - ], - } {} false _js2n__-prdslib.never - ], "_js2n__-:definitions/TypeBound!predicate" = _js2n__-prdslib.allOf [ @@ -2794,13 +2717,6 @@ let rec _js2n__-refsenv _js2n__-refsenv."_js2n__-:definitions/Integration!predicate" ], name = _js2n__-prdslib.isType '"String", - providers = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/TargetProvider!predicate" - ], repository = _js2n__-prdslib.isType '"String", source-locations = _js2n__-prdslib.allOf diff --git a/out/StackHawk Scanner Configuration.ncl b/out/StackHawk Scanner Configuration.ncl index 535add4..01cc985 100644 --- a/out/StackHawk Scanner Configuration.ncl +++ b/out/StackHawk Scanner Configuration.ncl @@ -1497,6 +1497,13 @@ let rec _js2n__-refsenv _js2n__-refsenv."_js2n__-:definitions/CustomVariable!predicate" ], filePath = _js2n__-prdslib.isType '"String", + filePaths = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], maxDepth = _js2n__-prdslib.allOf [ @@ -1729,6 +1736,13 @@ let rec _js2n__-refsenv ], fakerEnabled = _js2n__-prdslib.isType '"Bool", filePath = _js2n__-prdslib.isType '"String", + filePaths = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], forbiddenVariables = _js2n__-prdslib.allOf [ diff --git a/out/UET BuildConfig.json.ncl b/out/UET BuildConfig.json.ncl index 6d9c5b5..176f46a 100644 --- a/out/UET BuildConfig.json.ncl +++ b/out/UET BuildConfig.json.ncl @@ -909,6 +909,11 @@ let rec _js2n__-refsenv { UETVersion = _js2n__-prdslib.const "BleedingEdge", } {} true _js2n__-prdslib.always) _js2n__-prdslib.always _js2n__-prdslib.always, + _js2n__-prdslib.ifThenElse + (_js2n__-prdslib.records.record + { UETVersion = _js2n__-prdslib.const "2024.1177.305", } {} + true _js2n__-prdslib.always) _js2n__-prdslib.always + _js2n__-prdslib.always, _js2n__-prdslib.ifThenElse (_js2n__-prdslib.records.record { UETVersion = _js2n__-prdslib.const "2024.1168.700", } {} @@ -2006,6 +2011,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.enum [ "BleedingEdge", + "2024.1177.305", "2024.1168.700", "2024.1168.649", "2024.1168.535", diff --git a/out/UI5 Manifest.ncl b/out/UI5 Manifest.ncl index b5aceb4..f8e9228 100644 --- a/out/UI5 Manifest.ncl +++ b/out/UI5 Manifest.ncl @@ -1430,25 +1430,7 @@ let rec _js2n__-refsenv = _js2n__-prdslib.allOf [ _js2n__-prdslib.isType 'Record, - _js2n__-prdslib.records.record - { - actions = - _js2n__-prdslib.allOf - [ - _js2n__-prdslib.isType '"Array", - _js2n__-prdslib.arrays.arrayOf - _js2n__-refsenv."_js2n__-:definitions/action!predicate" - ], - data = _js2n__-refsenv."_js2n__-:definitions/data!predicate", - minHeight = - _js2n__-refsenv."_js2n__-:definitions/minHeight!predicate", - options = - _js2n__-prdslib.oneOf - [ - _js2n__-prdslib.isType 'Record, - _js2n__-refsenv."_js2n__-:definitions/simpleBinding!predicate" - ], - } {} false _js2n__-prdslib.never + _js2n__-prdslib.records.record {} {} true _js2n__-prdslib.always ], "_js2n__-:definitions/ContentType.Calendar!predicate" | doc "The calendar card is used to display a schedule of a single entity (such as person, resource) for a selected time interval" @@ -2363,9 +2345,22 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType 'Record, _js2n__-prdslib.records.record { + allow = _js2n__-prdslib.isType '"String", + allowfullscreen = + _js2n__-prdslib.oneOf + [ + _js2n__-prdslib.isType '"Bool", + _js2n__-refsenv."_js2n__-:definitions/simpleBinding!predicate" + ], data = _js2n__-refsenv."_js2n__-:definitions/data!predicate", minHeight = _js2n__-refsenv."_js2n__-:definitions/minHeight!predicate", + omitSandbox = + _js2n__-prdslib.oneOf + [ + _js2n__-prdslib.isType '"Bool", + _js2n__-refsenv."_js2n__-:definitions/simpleBinding!predicate" + ], sandbox = _js2n__-prdslib.isType '"String", src = _js2n__-prdslib.isType '"String", } {} false _js2n__-prdslib.never @@ -2685,6 +2680,12 @@ let rec _js2n__-refsenv _js2n__-refsenv."_js2n__-:definitions/MicroChart.StackedBar.Bar!predicate" ], displayValue = _js2n__-prdslib.isType '"String", + displayZeroValue = + _js2n__-prdslib.oneOf + [ + _js2n__-prdslib.isType '"Bool", + _js2n__-refsenv."_js2n__-:definitions/simpleBinding!predicate" + ], maxValue = _js2n__-prdslib.oneOf [ @@ -3927,6 +3928,12 @@ let rec _js2n__-refsenv alt = _js2n__-prdslib.isType '"String", backgroundColor = _js2n__-refsenv."_js2n__-:definitions/iconBackgroundColor!predicate", + fitType = + _js2n__-prdslib.oneOf + [ + _js2n__-prdslib.enum [ "Cover", "Contain" ], + _js2n__-refsenv."_js2n__-:definitions/simpleBinding!predicate" + ], initials = _js2n__-prdslib.isType '"String", shape = _js2n__-prdslib.allOf @@ -5650,6 +5657,7 @@ let rec _js2n__-refsenv _version | std.enum.TagOrString | [| + '"1.65.0", '"1.64.0", '"1.63.0", '"1.62.0", @@ -6325,7 +6333,8 @@ let rec _js2n__-refsenv "1.42.0", "1.43.0", "1.44.0", - "1.45.0" + "1.45.0", + "1.46.0" ] ], configuration = diff --git a/out/Uplift.ncl b/out/Uplift.ncl index 203d682..64f1c41 100644 --- a/out/Uplift.ncl +++ b/out/Uplift.ncl @@ -964,7 +964,18 @@ let rec _js2n__-refsenv _js2n__-prdslib.records.record {} {} true _js2n__-prdslib.always ], - _js2n__-prdslib.always + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.records.required [ "trimHeader" ], + _js2n__-prdslib.records.record {} {} true + _js2n__-prdslib.always + ], + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.records.required [ "skipPrerelease" ], + _js2n__-prdslib.records.record {} {} true + _js2n__-prdslib.always + ] ], _js2n__-prdslib.records.record { @@ -1000,6 +1011,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.isType '"String", _js2n__-prdslib.enum [ "asc", "desc", "ASC", "DESC" ] ], + trimHeader = _js2n__-prdslib.isType '"Bool", } {} false _js2n__-prdslib.never ], "_js2n__-:definitions/CommitAuthor!predicate" = diff --git a/out/Vela Pipeline Configuration.ncl b/out/Vela Pipeline Configuration.ncl index 095f40c..6db175f 100644 --- a/out/Vela Pipeline Configuration.ncl +++ b/out/Vela Pipeline Configuration.ncl @@ -1088,6 +1088,13 @@ let rec _js2n__-refsenv ]) ] ], + label = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], path = _js2n__-prdslib.oneOf [ @@ -1260,6 +1267,13 @@ let rec _js2n__-refsenv ]) ] ], + label = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String") + ], matcher = _js2n__-prdslib.allOf [ @@ -1574,6 +1588,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.never ] ], + id_request = _js2n__-prdslib.isType '"String", image = _js2n__-prdslib.allOf [ @@ -1605,6 +1620,7 @@ let rec _js2n__-refsenv _js2n__-prdslib.enum [ "always", "not_present", "on_start", "never" ] ], + report_as = _js2n__-prdslib.isType '"String", ruleset = _js2n__-refsenv."_js2n__-:definitions/Ruleset!predicate", secrets = diff --git a/out/Woodpecker pipeline config.ncl b/out/Woodpecker pipeline config.ncl index f2786ea..3cc803f 100644 --- a/out/Woodpecker pipeline config.ncl +++ b/out/Woodpecker pipeline config.ncl @@ -1392,6 +1392,14 @@ let rec _js2n__-refsenv ]) ], runtimeClassName = _js2n__-prdslib.isType '"String", + secrets = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.strings.minLength 1, + _js2n__-prdslib.arrays.arrayOf + _js2n__-refsenv."_js2n__-:definitions/step_kubernetes_secret!predicate" + ], securityContext = _js2n__-refsenv."_js2n__-:definitions/step_backend_kubernetes_security_context!predicate", } {} true _js2n__-prdslib.always @@ -1480,6 +1488,23 @@ let rec _js2n__-refsenv "_js2n__-:definitions/step_image!predicate" | doc "Read more: https://woodpecker-ci.org/docs/usage/workflow-syntax#image" = _js2n__-prdslib.isType '"String", + "_js2n__-:definitions/step_kubernetes_secret!predicate" + | doc "A reference to a native Kubernetes secret" + = _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + key = _js2n__-prdslib.isType '"String", + name = _js2n__-prdslib.isType '"String", + target = + _js2n__-refsenv."_js2n__-:definitions/step_kubernetes_secret_target!predicate", + } {} false _js2n__-prdslib.never + ], + "_js2n__-:definitions/step_kubernetes_secret_target!predicate" + | doc "A target which a native Kubernetes secret maps to." + = _js2n__-prdslib.oneOf + [ _js2n__-prdslib.always, _js2n__-prdslib.always ], "_js2n__-:definitions/step_list!contract" | doc "The steps section defines a list of steps which will be executed serially, in the order in which they are defined. Read more: https://woodpecker-ci.org/docs/usage/workflow-syntax#steps" = _js2n__-prdslib.contract_from_predicate diff --git a/out/beef-entity-v5-codegen.ncl b/out/beef-entity-v5-codegen.ncl index 468a4dc..bdf7964 100644 --- a/out/beef-entity-v5-codegen.ncl +++ b/out/beef-entity-v5-codegen.ncl @@ -1258,6 +1258,7 @@ let rec _js2n__-refsenv (_js2n__-prdslib.isType '"String") ], managerExtensions = _js2n__-prdslib.isType '"Bool", + modelInherits = _js2n__-prdslib.isType '"String", name = _js2n__-prdslib.isType '"String", namespace = _js2n__-prdslib.isType '"String", odataCollectionName = _js2n__-prdslib.isType '"String", @@ -1481,7 +1482,8 @@ let rec _js2n__-refsenv "Accepted", "Created", "NoContent", - "NotFound" + "NotFound", + "none" ] ], webApiAuthorize = _js2n__-prdslib.isType '"String", diff --git a/out/kustomization.yaml.ncl b/out/kustomization.yaml.ncl index 35d0142..da57820 100644 --- a/out/kustomization.yaml.ncl +++ b/out/kustomization.yaml.ncl @@ -1258,6 +1258,37 @@ let rec _js2n__-refsenv _js2n__-prdslib.arrays.arrayOf _js2n__-refsenv."_js2n__-:definitions/SecretArgs!predicate" ], + sortOptions = + _js2n__-prdslib.oneOf + [ + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + legacySortOptions = + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { + orderFirst = + _js2n__-prdslib.isType '"Array", + orderLast = + _js2n__-prdslib.isType '"Array", + } {} false _js2n__-prdslib.never + ], + order = _js2n__-prdslib.enum [ "legacy" ], + } {} false _js2n__-prdslib.never + ], + _js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType 'Record, + _js2n__-prdslib.records.record + { order = _js2n__-prdslib.enum [ "fifo" ], } {} + false _js2n__-prdslib.never + ] + ], transformers = _js2n__-prdslib.allOf [ diff --git a/out/lazygit.ncl b/out/lazygit.ncl index 40d17e0..b1a5ebe 100644 --- a/out/lazygit.ncl +++ b/out/lazygit.ncl @@ -1279,14 +1279,13 @@ let rec _js2n__-refsenv ]) | doc "Height of the command log view" | optional, - commitAuthorFormat - | std.enum.TagOrString - | [| 'full, 'short, 'auto |] - | doc m%" - Whether to show full author names or their shortened form in the commit graph. - One of 'auto' (default) | 'full' | 'short' - If 'auto', initials will be shown in small windows, and full names - in larger ones. - "% + commitAuthorLongLength + | std.number.Integer + | doc "Length of author name in expanded commits view. 2 means show initials only." + | optional, + commitAuthorShortLength + | std.number.Integer + | doc "Length of author name in (non-expanded) commits view. 2 means show initials only." | optional, commitHashLength | _js2n__-prdslib.contract_from_predicate @@ -1574,6 +1573,18 @@ let rec _js2n__-refsenv ]) | doc "Border color of non-focused windows" | optional, + inactiveViewSelectedLineBgColor + | _js2n__-prdslib.contract_from_predicate + (_js2n__-prdslib.allOf + [ + _js2n__-prdslib.isType '"Array", + _js2n__-prdslib.arrays.arrayOf + (_js2n__-prdslib.isType '"String"), + _js2n__-prdslib.arrays.minItems 1, + _js2n__-prdslib.arrays.uniqueItems + ]) + | doc "Background color of selected line when view doesn't have focus." + | optional, markedBaseCommitBgColor | Array (String) | doc "Background color of marked base commit (for rebase)" @@ -1858,7 +1869,7 @@ let rec _js2n__-refsenv | String | doc m%" CopyToClipboardCmd is the command for copying to clipboard. - See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-clipboard + See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard "% | optional, edit @@ -1939,6 +1950,13 @@ let rec _js2n__-refsenv Deprecated: use OpenLink instead. "% | optional, + readFromClipboardCmd + | String + | doc m%" + ReadFromClipboardCmd is the command for reading the clipboard. + See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard + "% + | optional, } | doc "Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc" | optional,