Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9c534f6
Add nvmrc for consistent node version
loranallensmith Feb 11, 2026
5dd0b6e
Improvements to handle local environment renaming
loranallensmith Feb 11, 2026
d540437
Add a basic README with commands and their status.
loranallensmith Feb 11, 2026
8788de5
Update docs to reflect recent improvements to environment management
loranallensmith Feb 11, 2026
3ee7cb5
Add initial test suite for critical path
loranallensmith Feb 11, 2026
f630bad
Add testing documentation.
loranallensmith Feb 11, 2026
f74c260
Update package.json for running tests
loranallensmith Feb 11, 2026
4ced1a6
Add checks and tests for API contract shape
loranallensmith Feb 11, 2026
8288a45
Add generate command functionality
loranallensmith Feb 11, 2026
0688fef
Improve generate command and tests
loranallensmith Feb 11, 2026
a67c90c
Add test for multi-environment scenarios
loranallensmith Feb 11, 2026
be65050
Implement MVP for pull command
loranallensmith Feb 11, 2026
36862fa
Improve tests for pull command
loranallensmith Feb 11, 2026
7847871
Add MVP of clone command
loranallensmith Feb 11, 2026
e7eeff9
Improve pull tests to prevent partial mutations on failed pulls
loranallensmith Feb 11, 2026
af9681a
Support update-by-diff for ingestion function script and description
loranallensmith Feb 11, 2026
2a99a7d
Support update-by-diff for persisted docs document and description
loranallensmith Feb 11, 2026
ca15ce8
Add support for update-by-diff for webhooks (url, event types, collec…
loranallensmith Feb 12, 2026
cdd0a3b
Improve support for multi-environment planning and applying
loranallensmith Feb 12, 2026
133cae6
Improve support for convergence on persisted docs and webhooks
loranallensmith Feb 12, 2026
d2406e0
Improve convergence support for collections and type schemas
loranallensmith Feb 12, 2026
5bb9b19
Support delete convergence for ingestion functions
loranallensmith Feb 12, 2026
c84a801
Improve parity for updates
loranallensmith Feb 12, 2026
635574c
Add negative rename inference protections.
loranallensmith Feb 12, 2026
5de803c
Add desired-side ambiguity test for renames
loranallensmith Feb 12, 2026
a8dcac6
Add rename inference ambiguity test for persisted docs
loranallensmith Feb 12, 2026
c105bf1
Add rename ambiguity coverage for webhooks
loranallensmith Feb 12, 2026
3938be2
Add test for clear output around renames.
loranallensmith Feb 12, 2026
9ef56ce
Add rename analysis for ambiguous remote candidates.
loranallensmith Feb 12, 2026
0295d47
Add assertions to catch ambiguous rename fallbacks for collections, p…
loranallensmith Feb 12, 2026
ce1c334
Improve status command output
loranallensmith Feb 12, 2026
493a3c5
Resolve the active remote environment alias first before local alias
loranallensmith Feb 13, 2026
b5bebce
Ensure pulled environment alias routing parity.
loranallensmith Feb 13, 2026
e2089b5
Improve validate output to warn when entities have identical rename s…
loranallensmith Feb 13, 2026
a1b81f2
Add guidance for how to remediate duplicate rename signatures
loranallensmith Feb 13, 2026
4649968
Fix grammar in validation message.
loranallensmith Feb 13, 2026
b3c1533
Create freeze checklist for v.1.0.0 release.
loranallensmith Feb 13, 2026
b656352
Update instructions for CI usage
loranallensmith Feb 13, 2026
d4b0ab7
Add basic CI workflow for PRs and pushes to main
loranallensmith Feb 13, 2026
15fee0b
Add deployment action configuration.
loranallensmith Feb 13, 2026
a1817e9
Add documentation for running CI workflows.
loranallensmith Feb 13, 2026
c45c8d7
Update docs with info about typical workflows.
loranallensmith Feb 13, 2026
6a1a522
Update config for builds
loranallensmith Feb 13, 2026
af29694
Clean up testing artifacts.
loranallensmith Feb 13, 2026
5e380ed
Fix TS build errors.
loranallensmith Feb 13, 2026
609b0ea
Update docs and add changelog for v1.0.0-rc.1
loranallensmith Feb 13, 2026
b1c8e58
Bump version for v1.0.0-rc.1
loranallensmith Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm test

- name: Validate (if compose config exists)
shell: bash
run: |
if [[ -f "compose/umbraco-compose.yaml" ]]; then
node dist/index.js validate --dir ./compose --strict
else
echo "Skipping validate: compose/umbraco-compose.yaml not found"
fi

- name: Plan (if compose config exists)
shell: bash
run: |
if [[ -f "compose/umbraco-compose.yaml" ]]; then
node dist/index.js plan --dir ./compose
else
echo "Skipping plan: compose/umbraco-compose.yaml not found"
fi
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy

on:
workflow_dispatch:
inputs:
compose_dir:
description: "Compose root directory"
required: true
default: "./compose"
environment_alias:
description: "Environment alias to apply (e.g. dev, prod)"
required: true
default: "dev"

concurrency:
group: deploy-${{ github.ref }}-${{ inputs.environment_alias }}
cancel-in-progress: false

jobs:
apply:
runs-on: ubuntu-latest
environment: ${{ inputs.environment_alias }}

steps:
- name: Require main branch
if: github.ref != 'refs/heads/main'
run: |
echo "Deploy workflow may only run from main. Current ref: $GITHUB_REF"
exit 1

- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Validate
run: node dist/index.js validate --dir "${{ inputs.compose_dir }}" --strict

- name: Plan
run: node dist/index.js plan --dir "${{ inputs.compose_dir }}" --env "${{ inputs.environment_alias }}"
env:
COMPOSE_MGMT_CLIENT_ID: ${{ secrets.COMPOSE_MGMT_CLIENT_ID }}
COMPOSE_MGMT_CLIENT_SECRET: ${{ secrets.COMPOSE_MGMT_CLIENT_SECRET }}
COMPOSE_MGMT_SCOPE: ${{ secrets.COMPOSE_MGMT_SCOPE }}
COMPOSE_MGMT_AUDIENCE: ${{ secrets.COMPOSE_MGMT_AUDIENCE }}

- name: Apply
run: node dist/index.js apply --dir "${{ inputs.compose_dir }}" --env "${{ inputs.environment_alias }}"
env:
COMPOSE_MGMT_CLIENT_ID: ${{ secrets.COMPOSE_MGMT_CLIENT_ID }}
COMPOSE_MGMT_CLIENT_SECRET: ${{ secrets.COMPOSE_MGMT_CLIENT_SECRET }}
COMPOSE_MGMT_SCOPE: ${{ secrets.COMPOSE_MGMT_SCOPE }}
COMPOSE_MGMT_AUDIENCE: ${{ secrets.COMPOSE_MGMT_AUDIENCE }}
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,10 @@ dist
# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vite/
.vite/

# Test build artifacts (keep only .ts test sources)
test/**/*.js
test/**/*.d.ts
test/**/*.js.map
test/**/*.d.ts.map
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v24.13.1
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Changelog

All notable changes to this project are documented in this file.

## [1.0.0-rc.1] - 2026-02-13

### Added
- Core command set stabilized for IaC-style workflows:
- `init`, `generate`, `validate`, `clone`, `pull`, `status`, `plan`, `apply`, `env rename`
- Broad automated test coverage for:
- command behavior and exit-code semantics
- multi-environment plan/apply flows
- rename safety and alias routing
- apply/pull API contract-map checks
- OpenAPI-shape assertions for key apply endpoints/payloads
- CI and deploy GitHub Actions workflows with guarded apply behavior.
- Operational docs:
- `docs/commands.md`
- `docs/testing.md`
- `docs/ci.md`
- `docs/workflow.md`
- `docs/release-v1-checklist.md`

### Changed
- Environment identity model hardened with `compose.state.json` (`id`, `alias`, `remoteAlias`) to support safe rename convergence.
- `plan` and `pull` use `remoteAlias` routing when a rename is pending.
- `apply` performs environment rename first, then applies nested resources through the new alias.
- Apply operation output now includes explicit environment context and per-environment/final summaries.
- Non-environment rename inference expanded and guarded:
- unique one-to-one signature matches infer rename
- ambiguous matches fall back to create/delete with explicit context
- Apply convergence expanded across managed entities, including create/update/delete and rename paths where supported.

### Fixed
- Prevented lock/state writes when apply emits warnings.
- Improved warning/plan messaging around rename and missing nested resources.
- Tightened TypeScript compatibility under strict checks (`exactOptionalPropertyTypes`, indexed access, env config narrowing).
- Resolved test harness response-shape issues around `204` delete cases.

## [Unreleased]
- Final `1.0.0` version bump and release tagging.
61 changes: 61 additions & 0 deletions docs/ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# CI/CD Setup

## Workflows
- CI workflow: `.github/workflows/ci.yml`
- runs on PRs and pushes to `main`
- executes build + tests
- runs validate/plan when `compose/umbraco-compose.yaml` exists

- Deploy workflow: `.github/workflows/deploy.yml`
- manual trigger only (`workflow_dispatch`)
- main-branch-only guard
- runs validate -> plan -> apply for the selected environment alias

## Are Workflow Files Auto-Created?
Short answer: no, not automatically by GitHub.

How they appear in a repo:
- they must exist as committed files under `.github/workflows/`
- they can be copied from this project, a template repository, or scaffolding logic in your own tooling

Current behavior in this CLI:
- `compose init` does not scaffold workflow files today
- users should copy/add `ci.yml` and `deploy.yml` (or use a repo template) when setting up a new canonical repo

## Required Repository Secrets
Configure these in repository settings:
- `COMPOSE_MGMT_CLIENT_ID`
- `COMPOSE_MGMT_CLIENT_SECRET`

Optional:
- `COMPOSE_MGMT_SCOPE`
- `COMPOSE_MGMT_AUDIENCE`

## GitHub Environment Protection
Create GitHub Environments that match deploy aliases (for example `dev`, `prod`) and enable:
- required reviewers
- optional wait timer
- environment-scoped secrets if needed

The deploy workflow binds `environment: ${{ inputs.environment_alias }}`, so protections apply automatically when names match.

## Recommended Branch Protection
For `main`:
- require PR review approvals
- require status checks to pass:
- CI / build-test
- restrict direct pushes

## Running Deploy
1. Open GitHub Actions -> `Deploy`.
2. Click `Run workflow`.
3. Choose `main` branch.
4. Set:
- `compose_dir` (usually `./compose`)
- `environment_alias` (for example `dev` or `prod`)
5. Confirm environment approval prompt if configured.

## Operational Notes
- Deploy concurrency is keyed by branch + environment alias to avoid overlapping applies for the same target.
- Keep plan output from deploy runs for audit trail and incident review.
- Treat non-zero exits as failed deployment attempts; do not auto-retry without reviewing warnings/errors.
Loading