mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-10 16:14:54 +03:00
6e14f2502e
Brings skd-edit to parity with the skd-compile fixes from449f814/0537410/ff2d851. Same helpers (Test-EmptyValue / Build-EmptyValueXml in ps1, is_empty_value / build_empty_value_xml in py) shared by add-parameter, modify-parameter (value=...), availableValues, add-dataParameter and modify-dataParameter. Behavior: - Sentinel empty (null / "" / "_" / "null") serializes per declared type, matching what 1C Designer writes — ref/no-type → xsi:nil, string → xsi:type="xs:string" empty, date/time/decimal/boolean → typed zero, StandardPeriod → Custom + zero dates, dataParameters → dcscor:value xsi:nil="true". @valueList omits <value> entirely. - Build-ValueTypeXml accepts bare decimal (10,2), decimal(N) (N,0), string(N,fix) (AllowedLength=Fixed), time (DateFractions=Time), and composite array of types. - Parse-ParamShorthand / Parse-DataParamShorthand regex .+ → .* so a trailing `=` is treated as the empty-value sentinel. New @valueList flag. New test cases: empty-param-values-add / -modify / empty-dataparam-values. Three outdated skd-edit snapshots regenerated to reflect upstream skd-compile empty-value emission (rename-parameter, reorder-parameters, conditional-appearance-v2). Regression: 41/41 ps1 + 41/41 py runner; 41/41 verify-snapshots ps1 + py (live load into 1С 8.3.24). skd-compile 23/23 and skd-validate 15/15 unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
40 lines
1.5 KiB
JSON
40 lines
1.5 KiB
JSON
{
|
|
"name": "modify-parameter: установка пустого значения через sentinel-формы (value=_, value=null)",
|
|
"preRun": [
|
|
{
|
|
"script": "skd-compile/scripts/skd-compile",
|
|
"input": {
|
|
"dataSets": [{
|
|
"name": "Основной",
|
|
"query": "ВЫБРАТЬ 1 КАК Поле1",
|
|
"fields": ["Поле1: decimal(1,0)"]
|
|
}],
|
|
"parameters": [
|
|
"ПарСтрока: string = ABC",
|
|
"ПарДата: date = 2025-01-15T00:00:00",
|
|
"ПарЧисло: decimal = 42",
|
|
"ПарСсылка: CatalogRef.Номенклатура = Справочник.Номенклатура.НашаОрганизация"
|
|
]
|
|
},
|
|
"args": { "-DefinitionFile": "{inputFile}", "-OutputPath": "{workDir}/Template.xml" }
|
|
},
|
|
{
|
|
"script": "skd-edit/scripts/skd-edit",
|
|
"args": { "-TemplatePath": "{workDir}/Template.xml", "-Operation": "modify-parameter", "-Value": "ПарСтрока value=_" }
|
|
},
|
|
{
|
|
"script": "skd-edit/scripts/skd-edit",
|
|
"args": { "-TemplatePath": "{workDir}/Template.xml", "-Operation": "modify-parameter", "-Value": "ПарДата value=null" }
|
|
},
|
|
{
|
|
"script": "skd-edit/scripts/skd-edit",
|
|
"args": { "-TemplatePath": "{workDir}/Template.xml", "-Operation": "modify-parameter", "-Value": "ПарЧисло value=_" }
|
|
}
|
|
],
|
|
"params": {
|
|
"templatePath": "Template.xml",
|
|
"operation": "modify-parameter",
|
|
"value": "ПарСсылка value=null"
|
|
}
|
|
}
|