Skip to content

Commit 6870433

Browse files
Power-el-TankeEl-Power
andauthored
refactor: ts dsl drop (#157)
Co-authored-by: El-Power <moiseselpower@gmail.com>
1 parent 7322af4 commit 6870433

101 files changed

Lines changed: 156 additions & 10959 deletions

File tree

Some content is hidden

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

‎.github/workflows/examples.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ jobs:
5454
with:
5555
shared-key: examples-hm
5656

57-
- name: Install esbuild (for harmont-ts bundle)
58-
working-directory: crates/hm-dsl-engine/harmont-ts
59-
run: npm ci
60-
6157
- name: Build hm
6258
run: cargo build -p harmont-cli
6359

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ jobs:
2525
- uses: dtolnay/rust-toolchain@stable
2626
- uses: Swatinem/rust-cache@v2
2727

28-
- name: Install esbuild (for harmont-ts bundle)
29-
working-directory: crates/hm-dsl-engine/harmont-ts
30-
run: npm ci
31-
3228
- name: Set version from tag
3329
run: |
3430
VERSION="${GITHUB_REF_NAME#v}"
@@ -181,52 +177,6 @@ jobs:
181177
cargo publish -p harmont-cli --token ${{ secrets.CRATES_IO_TOKEN }} --allow-dirty --no-verify
182178
fi
183179
184-
npm:
185-
name: Publish to npm
186-
runs-on: ubuntu-latest
187-
timeout-minutes: 10
188-
permissions:
189-
contents: read
190-
id-token: write
191-
steps:
192-
- uses: actions/checkout@v4
193-
194-
- uses: actions/setup-node@v4
195-
with:
196-
node-version: "20"
197-
registry-url: "https://registry.npmjs.org"
198-
cache: npm
199-
cache-dependency-path: crates/hm-dsl-engine/harmont-ts/package-lock.json
200-
201-
# node 20 ships npm 10, which can sign provenance but cannot AUTHENTICATE
202-
# via OIDC trusted publishing — that needs npm >= 11.5.1. Without it the
203-
# publish PUT goes out unauthenticated and npm masks it as a 404. Upgrade
204-
# so the configured trusted publisher actually authenticates the publish.
205-
- name: Upgrade npm for OIDC trusted publishing
206-
run: npm install -g npm@latest
207-
208-
- name: Install dependencies
209-
working-directory: crates/hm-dsl-engine/harmont-ts
210-
run: npm ci
211-
212-
- name: Build
213-
working-directory: crates/hm-dsl-engine/harmont-ts
214-
run: npm run build
215-
216-
- name: Set version from tag
217-
working-directory: crates/hm-dsl-engine/harmont-ts
218-
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version
219-
220-
- name: Publish
221-
working-directory: crates/hm-dsl-engine/harmont-ts
222-
run: |
223-
VERSION="${GITHUB_REF_NAME#v}"
224-
if npm view @harmont/hm@"$VERSION" version 2>/dev/null; then
225-
echo "@harmont/hm@$VERSION already published, skipping"
226-
else
227-
npm publish --access public --provenance
228-
fi
229-
230180
pypi:
231181
name: Publish to PyPI
232182
runs-on: ubuntu-latest
@@ -303,16 +253,6 @@ jobs:
303253
if: matrix.musl
304254
run: sudo apt-get update && sudo apt-get install -y musl-tools
305255

306-
- uses: actions/setup-node@v4
307-
with:
308-
node-version: "20"
309-
cache: npm
310-
cache-dependency-path: crates/hm-dsl-engine/harmont-ts/package-lock.json
311-
312-
- name: Install esbuild
313-
working-directory: crates/hm-dsl-engine/harmont-ts
314-
run: npm ci
315-
316256
- name: Set version from tag
317257
run: |
318258
VERSION="${GITHUB_REF_NAME#v}"

‎.hm/ci.py‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ def rust_project(shared_base: hm.Target[hm.Step]) -> tuple[hm.Step, ...]:
2525
# the build emits an 18-byte stub and the bundled_sources tests fail (CLI-37).
2626
# Installing Node here also lets the JS-runtime-gated render tests actually
2727
# run instead of self-skipping.
28-
ts_deps = hm.js.project(
29-
path="crates/hm-dsl-engine/harmont-ts",
30-
base=shared_base,
31-
).install()
32-
project = hm.rust.project(path=".", base=ts_deps)
28+
project = hm.rust.project(path=".")
3329
return hm.group([
3430
project.test(), # cargo test --workspace --locked — every package
3531
project.clippy(),
@@ -51,18 +47,6 @@ def py_project(shared_base: hm.Target[hm.Step]) -> tuple[hm.Step, ...]:
5147
])
5248

5349

54-
@hm.target()
55-
def ts_project(shared_base: hm.Target[hm.Step]) -> tuple[hm.Step, ...]:
56-
project = hm.js.project(
57-
path="crates/hm-dsl-engine/harmont-ts",
58-
base=shared_base,
59-
)
60-
return hm.group([
61-
project.run("typecheck", label=":typescript: tsc"),
62-
project.run("test", label=":test_tube: vitest"),
63-
])
64-
65-
6650
@hm.pipeline(
6751
"ci",
6852
env={"CI": "true"},
@@ -74,6 +58,5 @@ def ts_project(shared_base: hm.Target[hm.Step]) -> tuple[hm.Step, ...]:
7458
def ci(
7559
rust_project: hm.Target[tuple[hm.Step, ...]],
7660
py_project: hm.Target[tuple[hm.Step, ...]],
77-
ts_project: hm.Target[tuple[hm.Step, ...]],
7861
) -> list:
79-
return [rust_project, py_project, ts_project]
62+
return [rust_project, py_project]

‎CLAUDE.md‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,18 @@ The `cli/` directory is a Cargo workspace.
77
- `crates/hm-util/` — shared OS and filesystem utilities.
88
- `crates/hm-plugin-protocol/` — wire types (serde structs only).
99
- `crates/hm-plugin-sdk/` — authoring SDK for plugin writers.
10-
Run `cargo build` from the workspace root. Build requires esbuild
11-
(`npm ci` in `crates/hm-dsl-engine/harmont-ts/`).
10+
Run `cargo build` from the workspace root.
1211

1312
For cross-cutting doctrine see [PRINCIPLES.md](../PRINCIPLES.md).
1413

15-
## DSLs
14+
## DSL
1615

17-
Both DSLs live inside `crates/hm-dsl-engine/` so they ship with the crate:
18-
19-
- `crates/hm-dsl-engine/harmont-py/` — the `harmont` Python package (pipeline DSL).
20-
- `crates/hm-dsl-engine/harmont-ts/` — the `harmont` TypeScript package (pipeline DSL).
16+
The `harmont` Python package (pipeline DSL) lives inside `crates/hm-dsl-engine/harmont-py/` so it ships with the crate.
2117

2218
## Keep the SDK, `hm init` templates, and docs in sync
2319

2420
The toolchain helpers in `crates/hm-dsl-engine/` (e.g.
25-
`harmont-py/harmont/_rust.py`, `harmont-ts/src/toolchains/rust.ts`) are the
21+
`harmont-py/harmont/_rust.py`) are the
2622
**public authoring SDK**. They have two downstream surfaces that drift silently
2723
unless you update them in the same change. **A toolchain change is not done until
2824
all three agree:**

‎README.md‎

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
</p>
1414

1515
<p>
16-
<b>CI/CD as real code. Write your pipelines in Python or TypeScript, then run the exact same pipeline locally in Docker or on managed runners in <a href="https://app.harmont.dev">Harmont Cloud</a> — with layer caching and DAG parallelism built in.</b>
16+
<b>CI/CD as real code. Write your pipelines in Python, then run the exact same pipeline locally in Docker or on managed runners in <a href="https://app.harmont.dev">Harmont Cloud</a> — with layer caching and DAG parallelism built in.</b>
1717
</p>
1818

1919
## What is Harmont?
2020

21-
Harmont lets you define CI/CD pipelines in **TypeScript or Python** and run them
21+
Harmont lets you define CI/CD pipelines in **Python** and run them
2222
two ways from a single definition: instantly on your own machine in Docker, or on
2323
managed runners in [Harmont Cloud](https://app.harmont.dev). It's the same
2424
pipeline either way — the run you debug locally is byte-for-byte the run that
@@ -76,7 +76,7 @@ cargo install harmont-cli
7676
hm init
7777
```
7878

79-
`hm init` scaffolds a working `.hm/pipeline.{py,ts}` from a template and offers
79+
`hm init` scaffolds a working `.hm/pipeline.{py}` from a template and offers
8080
to install Claude Code skills that write and maintain your pipeline. Run it and
8181
pick your stack from the menu, or name a template up front with `-t`:
8282

@@ -99,10 +99,7 @@ same pipeline, on managed runners. See [Cloud](#cloud) below.
9999

100100
### Or write it by hand
101101

102-
A pipeline is just code. Save this as `.hm/pipeline.py` (or `.hm/pipeline.ts`):
103-
104-
<details open>
105-
<summary><b>Python</b></summary>
102+
A pipeline is just code. Save this as `.hm/pipeline.py`:
106103

107104
```python
108105
import harmont as hm
@@ -125,37 +122,6 @@ def ci(project: hm.Target[PythonToolchain]) -> tuple[hm.Step, ...]:
125122
)
126123
```
127124

128-
</details>
129-
130-
<details>
131-
<summary><b>TypeScript</b></summary>
132-
133-
```typescript
134-
import { pipeline, push, type PipelineDefinition } from "@harmont/hm";
135-
import { python } from "@harmont/hm/toolchains";
136-
137-
const project = python({ path: "." });
138-
139-
const pipelines: PipelineDefinition[] = [
140-
{
141-
slug: "ci",
142-
triggers: [push({ branch: "main" })],
143-
pipeline: pipeline(
144-
[
145-
project.test(),
146-
project.lint(),
147-
project.fmt(),
148-
project.typecheck(),
149-
],
150-
),
151-
},
152-
];
153-
154-
export default pipelines;
155-
```
156-
157-
</details>
158-
159125
```sh
160126
hm run ci
161127
```
@@ -372,7 +338,7 @@ input reference, sub-actions, and caching details.
372338
## Examples
373339

374340
The [`examples/`](./examples) directory has a complete, runnable pipeline for
375-
each stack — every one shipped in **both** Python and TypeScript:
341+
each stack:
376342

377343
| | | |
378344
|---|---|---|

‎crates/hm-dsl-engine/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.0.0-dev"
44
edition.workspace = true
55
license.workspace = true
66
repository.workspace = true
7-
description = "DSL engine: evaluate Python/TypeScript pipeline definitions via system runtimes."
7+
description = "DSL engine: evaluate Python pipeline definitions via system runtimes."
88
keywords = ["ci", "harmont", "dsl"]
99
categories = ["command-line-utilities"]
1010

‎crates/hm-dsl-engine/build.rs‎

Lines changed: 0 additions & 68 deletions
This file was deleted.

‎crates/hm-dsl-engine/harmont-ts/CLAUDE.md‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)