diff --git a/.claude/skills/meta-compile/reference/types-registers.md b/.claude/skills/meta-compile/reference/types-registers.md index 4c87c46e..6f452e4f 100644 --- a/.claude/skills/meta-compile/reference/types-registers.md +++ b/.claude/skills/meta-compile/reference/types-registers.md @@ -156,15 +156,15 @@ | `descriptionLength` | `25` | DescriptionLength | | `autonumbering` | `true` | Autonumbering | | `checkUnique` | `false` | CheckUnique | -| `dependenceOnCalculationTypes` | `NotUsed` | DependenceOnCalculationTypes | +| `dependenceOnCalculationTypes` | `DontUse` | DependenceOnCalculationTypes | | `actionPeriodUse` | `false` | ActionPeriodUse | | `attributes` | `[]` | → Attribute | | `tabularSections` | `{}` | → TabularSection | -`dependenceOnCalculationTypes`: `NotUsed`, `ExclusionAndDependence`, `ExclusionOnly`. +`dependenceOnCalculationTypes`: `DontUse`, `OnActionPeriod`. ```json -{ "type": "ChartOfCalculationTypes", "name": "Начисления", "dependenceOnCalculationTypes": "ExclusionAndDependence" } +{ "type": "ChartOfCalculationTypes", "name": "Начисления", "dependenceOnCalculationTypes": "OnActionPeriod" } ``` ## Зависимости diff --git a/.claude/skills/meta-compile/scripts/meta-compile.ps1 b/.claude/skills/meta-compile/scripts/meta-compile.ps1 index 200e5a96..c944290d 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.ps1 +++ b/.claude/skills/meta-compile/scripts/meta-compile.ps1 @@ -1,4 +1,4 @@ -# meta-compile v1.8 — Compile 1C metadata object from JSON +# meta-compile v1.9 — Compile 1C metadata object from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -87,8 +87,8 @@ $script:enumValueAliases = @{ "RecordSubordinate" = "RecorderSubordinate"; "Subordinate" = "RecorderSubordinate" "ПодчинениеРегистратору" = "RecorderSubordinate"; "Независимый" = "Independent" # DependenceOnCalculationTypes (ChartOfCalculationTypes) - "NotDependOnCalculationTypes" = "DontUse"; "NoDependence" = "DontUse" - "Depend" = "RequireCalculationTypes"; "RequireCalculation" = "RequireCalculationTypes" + "NotDependOnCalculationTypes" = "DontUse"; "NoDependence" = "DontUse"; "NotUsed" = "DontUse" + "Depend" = "OnActionPeriod"; "ПоПериодуДействия" = "OnActionPeriod" # InformationRegisterPeriodicity "None" = "Nonperiodical"; "Daily" = "Day"; "Monthly" = "Month" "Quarterly" = "Quarter"; "Yearly" = "Year" @@ -117,7 +117,7 @@ $script:validEnumValues = @{ "RegisterType" = @("Balance","Turnovers") "WriteMode" = @("Independent","RecorderSubordinate") "InformationRegisterPeriodicity" = @("Nonperiodical","Second","Day","Month","Quarter","Year","RecorderPosition") - "DependenceOnCalculationTypes" = @("DontUse","RequireCalculationTypes") + "DependenceOnCalculationTypes" = @("DontUse","OnActionPeriod") "DataLockControlMode" = @("Automatic","Managed") "FullTextSearch" = @("Use","DontUse") "DataHistory" = @("Use","DontUse") @@ -140,18 +140,21 @@ $script:validEnumValues = @{ function Normalize-EnumValue { param([string]$propName, [string]$value) - # 1. Check alias dictionary + # 1. Check alias dictionary — silent auto-correct if ($script:enumValueAliases.ContainsKey($value)) { return $script:enumValueAliases[$value] } - # 2. Case-insensitive match against valid values + # 2. Case-insensitive match against valid values — silent $valid = $script:validEnumValues[$propName] if ($valid) { foreach ($v in $valid) { if ($v -ieq $value) { return $v } } + # 3. Known property, unknown value — error with hint + Write-Error "Invalid value '$value' for property '$propName'. Valid values: $($valid -join ', ')" + exit 1 } - # 3. Return as-is (validator will catch if wrong) + # 4. Unknown property — pass-through (no validation data) return $value } diff --git a/.claude/skills/meta-compile/scripts/meta-compile.py b/.claude/skills/meta-compile/scripts/meta-compile.py index bade38a8..eb2a2f53 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.py +++ b/.claude/skills/meta-compile/scripts/meta-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# meta-compile v1.8 — Compile 1C metadata object from JSON +# meta-compile v1.9 — Compile 1C metadata object from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -147,8 +147,8 @@ enum_value_aliases = { 'RecordSubordinate': 'RecorderSubordinate', 'Subordinate': 'RecorderSubordinate', 'ПодчинениеРегистратору': 'RecorderSubordinate', 'Независимый': 'Independent', # DependenceOnCalculationTypes (ChartOfCalculationTypes) - 'NotDependOnCalculationTypes': 'DontUse', 'NoDependence': 'DontUse', - 'Depend': 'RequireCalculationTypes', 'RequireCalculation': 'RequireCalculationTypes', + 'NotDependOnCalculationTypes': 'DontUse', 'NoDependence': 'DontUse', 'NotUsed': 'DontUse', + 'Depend': 'OnActionPeriod', 'ПоПериодуДействия': 'OnActionPeriod', # InformationRegisterPeriodicity 'None': 'Nonperiodical', 'Daily': 'Day', 'Monthly': 'Month', 'Quarterly': 'Quarter', 'Yearly': 'Year', @@ -177,7 +177,7 @@ valid_enum_values = { 'RegisterType': ['Balance', 'Turnovers'], 'WriteMode': ['Independent', 'RecorderSubordinate'], 'InformationRegisterPeriodicity': ['Nonperiodical', 'Second', 'Day', 'Month', 'Quarter', 'Year', 'RecorderPosition'], - 'DependenceOnCalculationTypes': ['DontUse', 'RequireCalculationTypes'], + 'DependenceOnCalculationTypes': ['DontUse', 'OnActionPeriod'], 'DataLockControlMode': ['Automatic', 'Managed'], 'FullTextSearch': ['Use', 'DontUse'], 'DataHistory': ['Use', 'DontUse'], @@ -199,16 +199,19 @@ valid_enum_values = { } def normalize_enum_value(prop_name, value): - # 1. Check alias dictionary + # 1. Check alias dictionary — silent auto-correct if value in enum_value_aliases: return enum_value_aliases[value] - # 2. Case-insensitive match against valid values + # 2. Case-insensitive match against valid values — silent valid = valid_enum_values.get(prop_name) if valid: for v in valid: if v.lower() == value.lower(): return v - # 3. Return as-is (validator will catch if wrong) + # 3. Known property, unknown value — error with hint + print(f"Invalid value '{value}' for property '{prop_name}'. Valid values: {', '.join(valid)}", file=sys.stderr) + sys.exit(1) + # 4. Unknown property — pass-through (no validation data) return value def get_enum_prop(prop_name, field_name, default): diff --git a/.claude/skills/meta-edit/scripts/meta-edit.ps1 b/.claude/skills/meta-edit/scripts/meta-edit.ps1 index 78d52e29..3a7422dc 100644 --- a/.claude/skills/meta-edit/scripts/meta-edit.ps1 +++ b/.claude/skills/meta-edit/scripts/meta-edit.ps1 @@ -1,4 +1,4 @@ -# meta-edit v1.5 — Edit existing 1C metadata object XML (inline mode + complex properties + TS attribute ops + modify-ts) +# meta-edit v1.6 — Edit existing 1C metadata object XML (inline mode + complex properties + TS attribute ops + modify-ts) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$DefinitionFile, @@ -48,47 +48,65 @@ $script:enumValueAliases = @{ "Balances" = "Balance"; "Остатки" = "Balance"; "Обороты" = "Turnovers" "RecordSubordinate" = "RecorderSubordinate"; "Subordinate" = "RecorderSubordinate" "ПодчинениеРегистратору" = "RecorderSubordinate"; "Независимый" = "Independent" - "NotDependOnCalculationTypes" = "DontUse"; "NoDependence" = "DontUse" + "NotDependOnCalculationTypes" = "DontUse"; "NoDependence" = "DontUse"; "NotUsed" = "DontUse" + "Depend" = "OnActionPeriod"; "ПоПериодуДействия" = "OnActionPeriod" "None" = "Nonperiodical"; "Daily" = "Day"; "Monthly" = "Month" "Quarterly" = "Quarter"; "Yearly" = "Year" - "Непериодический" = "Nonperiodical"; "День" = "Day"; "Месяц" = "Month" + "Непериодический" = "Nonperiodical"; "Секунда" = "Second"; "День" = "Day"; "Месяц" = "Month" "Квартал" = "Quarter"; "Год" = "Year" + "ПозицияРегистратора" = "RecorderPosition" "Автоматический" = "Automatic"; "Управляемый" = "Managed" "Использовать" = "Use"; "НеИспользовать" = "DontUse" "Разрешить" = "Allow"; "Запретить" = "Deny" + "ВДиалоге" = "InDialog"; "ВСписке" = "InList"; "ОбаСпособа" = "BothWays" + "ВВидеНаименования" = "AsDescription"; "ВВидеКода" = "AsCode" "НеПроверять" = "DontCheck"; "Ошибка" = "ShowError"; "Предупреждение" = "ShowWarning" "НеИндексировать" = "DontIndex"; "Индексировать" = "Index" "ИндексироватьСДопУпорядочиванием" = "IndexWithAdditionalOrder" } $script:validEnumValues = @{ - "RegisterType" = @("Balance","Turnovers") - "WriteMode" = @("Independent","RecorderSubordinate") + "RegisterType" = @("Balance","Turnovers") + "WriteMode" = @("Independent","RecorderSubordinate") "InformationRegisterPeriodicity" = @("Nonperiodical","Second","Day","Month","Quarter","Year","RecorderPosition") - "DependenceOnCalculationTypes" = @("DontUse","RequireCalculationTypes") - "DataLockControlMode" = @("Automatic","Managed") - "FullTextSearch" = @("Use","DontUse") - "DataHistory" = @("Use","DontUse") - "DefaultPresentation" = @("AsDescription","AsCode") - "Posting" = @("Allow","Deny") - "RealTimePosting" = @("Allow","Deny") - "EditType" = @("InDialog","InList","BothWays") - "HierarchyType" = @("HierarchyFoldersAndItems","HierarchyItemsOnly") - "FillChecking" = @("DontCheck","ShowError","ShowWarning") - "Indexing" = @("DontIndex","Index","IndexWithAdditionalOrder") + "DependenceOnCalculationTypes" = @("DontUse","OnActionPeriod") + "DataLockControlMode" = @("Automatic","Managed") + "FullTextSearch" = @("Use","DontUse") + "DataHistory" = @("Use","DontUse") + "DefaultPresentation" = @("AsDescription","AsCode") + "Posting" = @("Allow","Deny") + "RealTimePosting" = @("Allow","Deny") + "EditType" = @("InDialog","InList","BothWays") + "HierarchyType" = @("HierarchyFoldersAndItems","HierarchyItemsOnly") + "CodeType" = @("String","Number") + "CodeAllowedLength" = @("Variable","Fixed") + "NumberType" = @("String","Number") + "NumberAllowedLength" = @("Variable","Fixed") + "RegisterRecordsDeletion" = @("AutoDelete","AutoDeleteOnUnpost","AutoDeleteOff") + "RegisterRecordsWritingOnPost" = @("WriteModified","WriteSelected","WriteAll") + "ReturnValuesReuse" = @("DontUse","DuringRequest","DuringSession") + "ReuseSessions" = @("DontUse","AutoUse") + "FillChecking" = @("DontCheck","ShowError","ShowWarning") + "Indexing" = @("DontIndex","Index","IndexWithAdditionalOrder") } function Normalize-EnumValue { param([string]$propName, [string]$value) + # 1. Check alias dictionary — silent auto-correct if ($script:enumValueAliases.ContainsKey($value)) { return $script:enumValueAliases[$value] } + # 2. Case-insensitive match against valid values — silent $valid = $script:validEnumValues[$propName] if ($valid) { foreach ($v in $valid) { if ($v -ieq $value) { return $v } } + # 3. Known property, unknown value — error with hint + Write-Error "Invalid value '$value' for property '$propName'. Valid values: $($valid -join ', ')" + exit 1 } + # 4. Unknown property — pass-through (no validation data) return $value } diff --git a/.claude/skills/meta-edit/scripts/meta-edit.py b/.claude/skills/meta-edit/scripts/meta-edit.py index e7d10262..08dc0272 100644 --- a/.claude/skills/meta-edit/scripts/meta-edit.py +++ b/.claude/skills/meta-edit/scripts/meta-edit.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# meta-edit v1.5 — Edit existing 1C metadata object XML (inline mode + complex properties + TS attribute ops + modify-ts) +# meta-edit v1.6 — Edit existing 1C metadata object XML (inline mode + complex properties + TS attribute ops + modify-ts) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -88,8 +88,8 @@ enum_value_aliases = { 'RecordSubordinate': 'RecorderSubordinate', 'Subordinate': 'RecorderSubordinate', 'ПодчинениеРегистратору': 'RecorderSubordinate', 'Независимый': 'Independent', # DependenceOnCalculationTypes (ChartOfCalculationTypes) - 'NotDependOnCalculationTypes': 'DontUse', 'NoDependence': 'DontUse', - 'Depend': 'RequireCalculationTypes', 'RequireCalculation': 'RequireCalculationTypes', + 'NotDependOnCalculationTypes': 'DontUse', 'NoDependence': 'DontUse', 'NotUsed': 'DontUse', + 'Depend': 'OnActionPeriod', 'ПоПериодуДействия': 'OnActionPeriod', # InformationRegisterPeriodicity 'None': 'Nonperiodical', 'Daily': 'Day', 'Monthly': 'Month', 'Quarterly': 'Quarter', 'Yearly': 'Year', @@ -117,7 +117,7 @@ valid_enum_values = { 'RegisterType': ['Balance', 'Turnovers'], 'WriteMode': ['Independent', 'RecorderSubordinate'], 'InformationRegisterPeriodicity': ['Nonperiodical', 'Second', 'Day', 'Month', 'Quarter', 'Year', 'RecorderPosition'], - 'DependenceOnCalculationTypes': ['DontUse', 'RequireCalculationTypes'], + 'DependenceOnCalculationTypes': ['DontUse', 'OnActionPeriod'], 'DataLockControlMode': ['Automatic', 'Managed'], 'FullTextSearch': ['Use', 'DontUse'], 'DataHistory': ['Use', 'DontUse'], @@ -140,16 +140,19 @@ valid_enum_values = { def normalize_enum_value(prop_name, value): - # 1. Check alias dictionary + # 1. Check alias dictionary — silent auto-correct if value in enum_value_aliases: return enum_value_aliases[value] - # 2. Case-insensitive match against valid values + # 2. Case-insensitive match against valid values — silent valid = valid_enum_values.get(prop_name) if valid: for v in valid: if v.lower() == value.lower(): return v - # 3. Return as-is (validator will catch if wrong) + # 3. Known property, unknown value — error with hint + print(f"Invalid value '{value}' for property '{prop_name}'. Valid values: {', '.join(valid)}", file=sys.stderr) + sys.exit(1) + # 4. Unknown property — pass-through (no validation data) return value diff --git a/.claude/skills/meta-validate/scripts/meta-validate.ps1 b/.claude/skills/meta-validate/scripts/meta-validate.ps1 index 732d7670..bcdcd923 100644 --- a/.claude/skills/meta-validate/scripts/meta-validate.ps1 +++ b/.claude/skills/meta-validate/scripts/meta-validate.ps1 @@ -262,7 +262,7 @@ $validPropertyValues = @{ "FillChecking" = @("DontCheck","ShowError","ShowWarning") "Indexing" = @("DontIndex","Index","IndexWithAdditionalOrder") "DataHistory" = @("Use","DontUse") - "DependenceOnCalculationTypes" = @("DontUse","RequireCalculationTypes") + "DependenceOnCalculationTypes" = @("DontUse","OnActionPeriod") } # Properties forbidden per type (would cause LoadConfigFromFiles error) diff --git a/.claude/skills/meta-validate/scripts/meta-validate.py b/.claude/skills/meta-validate/scripts/meta-validate.py index 45b92a38..31a654ca 100644 --- a/.claude/skills/meta-validate/scripts/meta-validate.py +++ b/.claude/skills/meta-validate/scripts/meta-validate.py @@ -263,7 +263,7 @@ valid_property_values = { "FillChecking": ["DontCheck", "ShowError", "ShowWarning"], "Indexing": ["DontIndex", "Index", "IndexWithAdditionalOrder"], "DataHistory": ["Use", "DontUse"], - "DependenceOnCalculationTypes": ["DontUse", "RequireCalculationTypes"], + "DependenceOnCalculationTypes": ["DontUse", "OnActionPeriod"], } # Properties forbidden per type (would cause LoadConfigFromFiles error)