Files
windmill/cli/windmill-utils-internal
Ruben Fiszel 2f58a31d00 fix(cli): preserve case in raw-app runnable filenames (#8940)
* fix(cli): preserve case in raw-app runnable filenames

The path assigner lowercased filesystem-safe names, so a raw-app
runnable id like CamelCaseTSRunnable produced a YAML metadata file
keeping the original case but a code file lowercased to
camelcasetsrunnable.ts. On the next push, loadRunnablesFromBackend
paired the two by case-sensitive name match, failed, and registered
the lowercase code file as a separate empty runnable — surfacing as
duplicate runnables in the app editor.

Stop lowercasing in sanitizeForFilesystem and dedupe path assigners
case-insensitively so case-only collisions still get a counter on
case-insensitive filesystems. Also match content/lock files and the
processed-id set case-insensitively in loadRunnablesFromBackend so
repos already pulled by the buggy CLI can recover on the next push
without re-pulling.

Fixes #8939

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(cli): extract readSiblingLock helper, drop test #ref comments

Address review:
- Both call sites in loadRunnablesFromBackend now use the same
  case-insensitive lock-file lookup, so a partial-legacy repo with a
  mixed-case code file and lowercase lock (or vice versa) works in the
  orphan-code branch too, not just the YAML branch.
- Remove `Regression for #8939 …` comments from the new tests; CLAUDE.md
  bans referencing the current task/issue from source comments. Test
  names already describe the behavior under test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(cli): update assigner-path assertions for case preservation

Three tests in inline_scripts_failure_preprocessor_unit.test.ts asserted
that the assigner produced lowercased filenames (get_users_data, step_b)
from mixed-case summaries — that was the buggy lowercasing behavior.
With case preserved end-to-end, the assigner now returns Get_Users_Data
and Step_B.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 04:02:39 +00:00
..

Windmill Utils Internal

Internal TypeScript utility package for Windmill development tools and scripts.

What this package contains

This package provides internal utilities and tools used by the Windmill CLI, the VS CODE extension, and the frontend.

Development

To work on this package we need to generate the windmill client, and remove .ts extensions to the imports and exports (added by default for deno compatibility, so that the CLI can use this package).

You just need to run this before working on the package:

npm run dev

After you are done with your modifications, add back the .ts extensions:

./remove-ts-ext.sh -r

Building

To build the package for production:

npm run build

Publishing

To publish the package:

./publish.sh