Tags: yldio/cinzel
Tags
feat: propagate HCL inline comments on attributes to YAML output (#10) Introduces an `annotated` wrapper type that threads trailing `# comments` from HCL attributes through the `map[string]any` pipeline. `toYAMLNode` unwraps it and attaches the comment as a `LineComment` on the YAML node, so any attribute-level comment in HCL appears inline in the generated YAML. Validators that type-assert map values use `unwrapAnnotatedMap` to strip the wrapper before checking. The permissions-specific `parsePermissionsBlock` and `permissionsMapNode` helpers are removed — the general mechanism covers that case automatically.
fix(parse): always emit permissions: {} in workflow YAML output (#9)
When no permissions block is present in HCL, the workflow now emits
permissions: {} (deny all) rather than omitting the key. An empty
permissions {} block already emitted {} after the previous fix, but the
global ": {}\n" → ":\n" post-processor in marshalWorkflowYAML was
silently erasing it. Fixed with a sentinel-swap that protects
permissions: {} through the strip.
All 14 affected golden fixtures updated. Explicit unit tests added
(TestParsePermissionsDefault) covering: no block, empty block, and
scoped permissions.
PreviousNext