Skip to content

Commit 14ecbce

Browse files
Merge branch 'main' into feat/decorator-target-type-2183
2 parents e53239f + 1ce8615 commit 14ecbce

File tree

71 files changed

+2770
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2770
-418
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
/calm-hub/ @jpgough-ms @rocketstack-matt @grahampacker-ms @Thels @markscott-ms
66

7+
/calm-server/ @rocketstack-matt @markscott-ms
8+
79
/cli/ @aidanm3341 @lbulanti-ms @willosborne @grahampacker-ms @jpgough-ms @rocketstack-matt @Thels @LeighFinegold @markscott-ms
810

911
/shared/ @aidanm3341 @lbulanti-ms @willosborne @grahampacker-ms @jpgough-ms @rocketstack-matt @Thels @LeighFinegold @markscott-ms

.github/pull_request_template.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
## Affected Components
1717
<!-- Check all that apply -->
1818
- [ ] CLI (`cli/`)
19-
- [ ] Shared (`shared/`)
20-
- [ ] CALM Widgets (`calm-widgets/`)
19+
- [ ] Schema (`calm/`)
20+
- [ ] CALM AI (`calm-ai/`)
2121
- [ ] CALM Hub (`calm-hub/`)
2222
- [ ] CALM Hub UI (`calm-hub-ui/`)
23+
- [ ] CALM Server (`calm-server/`)
24+
- [ ] CALM Widgets (`calm-widgets/`)
2325
- [ ] Documentation (`docs/`)
26+
- [ ] Shared (`shared/`)
2427
- [ ] VS Code Extension (`calm-plugins/vscode/`)
2528
- [ ] Dependencies
2629
- [ ] CI/CD

.github/workflows/automated-release-calm-server.yml

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/automated-release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,17 @@ jobs:
183183
NEXT_VERSION=$(grep "The next release version is" analysis.txt | sed 's/.*The next release version is \([^[:space:]]\+\).*/\1/')
184184
185185
# Get current version from latest git tag instead of package.json
186-
CURRENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/cli-v//')
186+
CURRENT_VERSION=$(git describe --tags --abbrev=0 --match 'cli-v*' 2>/dev/null | sed 's/cli-v//')
187+
188+
if [ -z "$CURRENT_VERSION" ]; then
189+
echo "⚠️ No cli-v* git tag found; falling back to package.json version."
190+
CURRENT_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "")
191+
fi
192+
193+
if [ -z "$CURRENT_VERSION" ]; then
194+
echo "⚠️ package.json version unavailable; defaulting current version to 0.0.0."
195+
CURRENT_VERSION="0.0.0"
196+
fi
187197
188198
echo "📋 Extracted versions:"
189199
echo " Current: $CURRENT_VERSION"
@@ -422,7 +432,7 @@ jobs:
422432
contains(github.event.pull_request.labels.*.name, 'automated-release')
423433
steps:
424434
- name: Harden Runner
425-
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2
435+
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2
426436
with:
427437
egress-policy: audit
428438

@@ -437,6 +447,7 @@ jobs:
437447
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
438448
with:
439449
node-version: 22
450+
registry-url: 'https://registry.npmjs.org'
440451

441452
- name: Install dependencies
442453
run: npm ci
@@ -481,6 +492,8 @@ jobs:
481492
--target main
482493
483494
- name: Publish to NPM
495+
env:
496+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_SEMANTIC_RELEASE }}
484497
run: |
485498
cd cli
486499
npm publish --provenance
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build CALM Server
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- 'main'
10+
- 'release*'
11+
push:
12+
branches:
13+
- 'main'
14+
- 'release*'
15+
16+
jobs:
17+
calm-server:
18+
name: Build, Test, and Lint CALM Server Module
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout PR Branch
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
27+
with:
28+
node-version: v22
29+
30+
- name: Install workspace
31+
run: npm ci
32+
33+
- name: Lint CALM Server Module
34+
run: npm run lint --workspace=calm-server
35+
36+
- name: Build workspace
37+
run: npm run build:calm-server
38+
39+
- name: Run tests with coverage for CALM Server
40+
run: npm run test:calm-server

.github/workflows/semgrep-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
2323
container:
24-
image: semgrep/semgrep@sha256:d3d1be3a3770514d16a6a57b9761575d7536d70f45a5220274f4ec7d55c442b9
24+
image: semgrep/semgrep@sha256:e04d2cb132288d90035db8791d64f610cb255b21e727b94db046243b30c01ae9
2525
if: (github.actor != 'dependabot[bot]')
2626
steps:
2727
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Validate Lockfile Platforms
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- 'main'
10+
- 'release*'
11+
paths:
12+
- 'package-lock.json'
13+
push:
14+
branches:
15+
- 'main'
16+
- 'release*'
17+
paths:
18+
- 'package-lock.json'
19+
20+
jobs:
21+
validate-lockfile:
22+
name: Validate Lockfile Platforms
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
31+
with:
32+
node-version: '22'
33+
34+
- name: Validate platform bindings in lockfile
35+
run: node scripts/validate-lockfile-platforms.js

.npmrc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,3 @@
22
# Blocks unsupported versions (e.g. Node 18, 20, 23) but still allows
33
# Node 24+ since engines includes ">=24.10.0" for local development.
44
engine-strict=true
5-
6-
# Ensure npm resolves optional native bindings for all CI platforms,
7-
# not just the current developer machine. Prevents missing-binding
8-
# errors (e.g. @tailwindcss/oxide) when the lockfile is regenerated
9-
# on macOS but consumed on Linux runners.
10-
supportedArchitectures[os][]=current
11-
supportedArchitectures[os][]=linux
12-
supportedArchitectures[cpu][]=current
13-
supportedArchitectures[cpu][]=x64
14-
supportedArchitectures[cpu][]=arm64

AGENTS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ The `engines` field in `package.json` (`^22.14.0 || >=24.10.0`) also permits Nod
7171
- **`@types/node`** is overridden to `^22.0.0` in root `package.json` to prevent transitive dependencies from pulling in a different major version
7272
- **Renovate** is configured with `allowedVersions: "<23.0.0"` for `@types/node`
7373

74+
### Lockfile Regeneration
75+
76+
**CRITICAL**: npm has a known bug ([npm/cli#4828](https://github.com/npm/cli/issues/4828)) where running `npm install` with an existing `node_modules` directory prunes optional platform-specific dependencies (e.g. `@tailwindcss/oxide`, `@swc/core`, `@esbuild`) for platforms other than the current machine. This causes CI failures on Linux runners when the lockfile was regenerated on macOS.
77+
78+
**Correct method** — always delete both `node_modules` and the lockfile:
79+
80+
```bash
81+
rm -rf node_modules package-lock.json && npm install
82+
```
83+
84+
**Never** regenerate the lockfile without deleting `node_modules` first. The `validate-lockfile` CI workflow checks that all expected platform variants are present in `package-lock.json`.
85+
7486
### Why this matters
7587

7688
Running `npm install` on a different Node major version (e.g. Node 25) causes:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Ready to get started? Check out the [CALM tutorials](https://calm.finos.org/tuto
3434
| [CALM AI](./calm-ai) | [@rocketstack-matt](https://github.com/rocketstack-matt) | No build, prompt tools only, managed separately to CLI for easier maintenance and broader reuse. |
3535
| [CALM Hub](./calm-hub) | [@jpgough-ms](https://github.com/jpgough-ms), [@grahampacker-ms](https://github.com/grahampacker-ms) | [![Build Calm Hub](https://github.com/finos/architecture-as-code/actions/workflows/build-calm-hub.yml/badge.svg)](https://github.com/finos/architecture-as-code/actions/workflows/build-calm-hub.yml) |
3636
| [CALM Hub UI](./calm-hub-ui) | [@aidanm3341](https://github.com/aidanm3341), [@aamanrebello](https://github.com/aamanrebello), [@yoofitt96](https://github.com/YoofiTT96) | [![Build CALM Hub UI](https://github.com/finos/architecture-as-code/actions/workflows/build-calm-hub-ui.yml/badge.svg)](https://github.com/finos/architecture-as-code/actions/workflows/build-calm-hub-ui.yml) |
37+
| [CALM-Server](./calm-server) | [@rocketstack-matt](https://github.com/rocketstack-matt), [@markscott-ms](https://github.com/markscott-ms) | [![Build CALM Server](https://github.com/finos/architecture-as-code/actions/workflows/build-calm-server.yml/badge.svg)](https://github.com/finos/architecture-as-code/actions/workflows/build-calm-server.yml) |
3738
| [Docs](./docs) | [@rocketstack-matt](https://github.com/rocketstack-matt) | [![Sync Docs to S3](https://github.com/finos/architecture-as-code/actions/workflows/s3-docs-sync.yml/badge.svg)](https://github.com/finos/architecture-as-code/actions/workflows/s3-docs-sync.yml) [![Build Docs](https://github.com/finos/architecture-as-code/actions/workflows/build-docs.yml/badge.svg)](https://github.com/finos/architecture-as-code/actions/workflows/build-docs.yml) |
3839
| [CALM VSCode Plugin](./calm-plugins/vscode) | [@LeighFinegold](https://github.com/LeighFinegold), [@rocketstack-matt](https://github.com/rocketstack-matt), [@markscott-ms](https://github.com/markscott-ms) | ![Build VS Code Extension](https://github.com/finos/architecture-as-code/workflows/Build%20VS%20Code%20Extension/badge.svg) |
3940

0 commit comments

Comments
 (0)