Commit Graph
74 Commits
Author SHA1 Message Date
Ruben FiszelandClaude Opus 4.5 7f2dc707b0 feat(cli): add branch-specific items for folders and settings (#7611)
* feat(cli): add folders as branch-specific items

Folders can now be configured as branch-specific items in wmill.yaml:

```yaml
gitBranches:
  staging:
    specificItems:
      folders:
        - "f/env_*"
        - "f/config"
```

Branch-specific folder format: f/folder/folder.branchName.meta.yaml
(consistent with other item types where branch goes before the type suffix)

Example:
- Base: f/env_staging/folder.meta.yaml
- Branch-specific: f/env_staging/folder.main.meta.yaml

Changes:
- Add `folders?: string[]` to SpecificItemsConfig
- Add folder handling in toBranchSpecificPath()
- Add folder handling in fromBranchSpecificPath()
- Add folder pattern matching in isSpecificItem()
- Add folder detection in isBranchSpecificFile()
- Add folder detection in isCurrentBranchFile()
- Add 13 new tests for folder functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(cli): add settings as branch-specific item and skip validation with --branch

- Add settings.yaml as a branch-specific item (settings: true in config)
  - settings.yaml -> settings.branchName.yaml conversion
- Skip "Create empty branch configuration" prompt when using --branch flag
  - User explicitly specifies branch, so skip validation prompts
- Add folders and settings fields to gitBranches type definitions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 17:35:52 +00:00
Ruben FiszelandClaude Opus 4.5 91ba4d9962 fix: use type cast instead of slice() for BlobPart compatibility
Avoids unnecessary data copying by using `as any` cast instead of
.slice() to work around TypeScript's ArrayBufferLike vs ArrayBuffer
type incompatibility between Deno and Node.js.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:22:05 +00:00
Ruben FiszelandClaude Opus 4.5 964d5c9988 fix: resolve BlobPart type incompatibility between Deno and Node.js
Use .slice() on Uint8Array values before passing to File/Blob constructors
to create fresh ArrayBuffer-backed arrays, avoiding type errors from
ArrayBufferLike vs ArrayBuffer differences in TypeScript definitions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:20:19 +00:00
Ruben FiszelandClaude Opus 4.5 219ac71fe4 feat: cli branch override (#7592)
* fix(cli): prevent duplicate 'Using non-dotted paths' log message

Add a flag to track whether the message has already been logged,
so it only prints once even if setNonDottedPaths is called multiple times.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(cli): add --branch option to sync pull/push commands

Add a --branch argument that allows overriding the current git branch
for sync operations. This enables:
- Using branch-specific settings even when not in a git repository
- Overriding the detected git branch when needed

The branch override is applied to:
- getEffectiveSettings() for branch-specific config overrides
- getSpecificItemsForCurrentBranch() for branch-specific items

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(cli): correct log message for workspace fork branches

Use rawGitBranch instead of currentBranch in the log message when
showing the origin of a workspace fork branch.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(cli): extend --branch support to specificItems functionality

Update getBranchSpecificPath and isCurrentBranchFile to accept optional
branchOverride parameter. This ensures that branch-specific file handling
(for variables, resources, triggers) works correctly with --branch flag.

Updated functions:
- getBranchSpecificPath(): now accepts branchOverride
- isCurrentBranchFile(): now accepts branchOverride
- elementsToMap(): now accepts branchOverride
- compareDynFSElement(): now accepts branchOverride
- prettyChanges(): now accepts branchOverride

All call sites updated to pass opts.branch through the call chain.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(cli): resolve TypeScript type errors

- Fix Timeout type in dev.ts using ReturnType<typeof setTimeout>
- Add proper type casts for unknown error types
- Cast FlowModule to any to resolve generated type mismatch
- Cast Uint8Array to BlobPart for Blob constructor compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(cli): add unit tests for branch detection and --branch override

- Add specific_items.test.ts with 35 tests covering:
  - toBranchSpecificPath and fromBranchSpecificPath conversions
  - isSpecificItem pattern matching
  - isBranchSpecificFile detection
  - Round-trip path conversions
  - branchOverride parameter functionality

- Add conf_branch_override.test.ts with 6 tests covering:
  - getEffectiveSettings with branchOverride parameter
  - Branch-specific overrides application
  - promotionOverrides precedence
  - Fallback to top-level settings

- Fix containerized_backend.ts to use dynamic paths instead of
  hardcoded user home directories

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore(cli): add conf.ts barrel file for test imports

Re-exports from src/core/conf.ts to support existing test imports.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* all

* fix(cli): pass --branch override to workspace resolution

Previously, the --branch flag was only used for config resolution but
not for workspace resolution. This caused confusing log messages that
showed the git branch (e.g., master) before showing the override branch.

Changes:
- Add branchOverride parameter to tryResolveBranchWorkspace()
- Add branchOverride parameter to resolveWorkspace()
- Pass opts.branch from sync pull/push to resolveWorkspace()
- Log "Using branch override" early in workspace resolution
- Remove duplicate log from getEffectiveSettings()

Now when using --branch foobar, the logs show:
  Using branch override: foobar
  Applied settings for Git branch: foobar
  ...

Instead of the confusing previous output that mentioned both master
and foobar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(cli): remove redundant branch detection in elementsToMap

isCurrentBranchFile() already validates that a branch exists (via
branchOverride or git detection) before returning true. No need to
pre-compute currentBranch before calling it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:55:01 +00:00
Ruben Fiszel 7a55f54427 feat: add streamJob to raw apps 2026-01-16 10:47:52 +00:00
Ruben Fiszel b3b0d3f5b6 fix: fix wmill app dev with workspace scripts 2026-01-15 22:58:52 +00:00
Ruben Fiszel ba7b49e0b3 nonDottedPaths set to true for new wmill inits 2025-12-27 00:20:41 +00:00
Ruben Fiszel 47e52482ce nonDottedPaths to avoid using .inline_script. 2025-12-27 00:17:36 +00:00
Ruben Fiszel 642d44bbc1 nonDottedPaths fixes 2025-12-26 23:44:14 +00:00
Ruben Fiszel 20a49a30f8 feat(cli): add nonDottedPaths option (#7459) 2025-12-26 22:16:38 +00:00
Ruben Fiszel dfce288e77 add tests for CLI 2025-12-26 20:32:42 +00:00
Ruben Fiszel 82e6ec5384 feat: raw apps can be built by agents fully locally (#7448) 2025-12-24 21:00:04 +00:00
Ruben Fiszel 695cb21b3e fix(cli): improve workspace dependency pushing 2025-12-23 18:10:58 +00:00
Ruben Fiszel 1c0889b3dc fix(cli): push workspace deps doesn't depend on wmill-locks 2025-12-23 16:38:46 +00:00
Ruben Fiszel 3990582494 cli now handle data part of raw apps 2025-12-23 15:44:17 +00:00
Ruben Fiszel 087a585521 fix(cli): fix ordering of workspace dependencies push 2025-12-23 15:06:13 +00:00
centdix af200de3c4 feat(ai): standardize and improve system prompts (#7346)
* init

* test in frontend

* copy files

* use in cli

* better

* add desc to sdks

* better

* fix ts parsing

* add docs to ts client

* add docs to python client

* use script prompt in frontend

* regen

* use in flow

* rm

* use in cli, create AGENTS.md instead of cursor rules

* remove apply

* better

* better

* simplify cli

* more docs

* cleaning

* update readme

* generate cli file

* better folder names

* fix ts

* fix multiline
2025-12-12 17:26:19 +00:00
Ruben Fiszel 3bc0608d0d fix(cli): do not remove schema for normal apps 2025-12-10 21:21:38 +00:00
hugocasa 7451d762da feat(cli): new command to generate RT namespace + on init (#7317) 2025-12-08 17:01:37 +00:00
Ruben Fiszel 6429f43406 cli app backcompatibility 2025-12-06 16:46:09 +00:00
Ruben Fiszel 0e2e037d76 fix: raw app v0.5 (#7310) 2025-12-06 16:06:30 +00:00
Ruben Fiszel d984b8281b fix(cli): properly handle frontend scripts for app generate-locks 2025-12-05 12:37:35 +00:00
hugocasa 898d3c7c67 fix: enable back gcp triggers in CLI (#7299) 2025-12-04 15:30:38 +00:00
centdix 3eb3d1d023 chore(cli): remove unnecessary indentations in claude.md #7292 2025-12-04 07:34:32 +00:00
Ruben Fiszel 80eeee3a82 fix: wmill app generate-locks (#7288)
* all

* fix(cli): wmill app generate-locks

* handle raw reqs

* handle raw reqs

* rework paths
2025-12-03 19:14:01 +00:00
Ruben Fiszel 1a3454753b fix(cli): handle better apps pushing back-compatibility 2025-12-03 17:49:25 +00:00
Ruben Fiszel 7b7514f4b1 fix(cli): handle better apps pushing back-compatibility 2025-12-02 12:47:51 +00:00
Ruben Fiszel a0ccf5fb1e fix(cli): handle better public apps in legacy mode 2025-12-02 12:28:50 +00:00
Pyra 09bf9a7ecf nit(cli): remove --use-raw-requirements (#7272)
new workspace dependencies system renders it useless

Signed-off-by: pyranota <pyra@duck.com>
2025-12-02 10:17:37 +00:00
HugoCasa c36a145218 nits jobs migration command 2025-12-01 15:16:22 +01:00
hugocasa 7b3137a0f3 feat(cli): jobs migration command (#7268) 2025-12-01 14:06:48 +00:00
Ruben Fiszel 5e509eec13 nit(cli): app dev will error if not in right folder 2025-12-01 06:28:05 +00:00
Ruben Fiszel 9f2ca01e5e fix(git-sync): initialize repo with gitBranches set 2025-11-30 17:42:16 +00:00
Ruben Fiszel b9ea46b78b fix(cli): cli behave as expected in forked workspaces 2025-11-30 15:15:27 +00:00
Ruben Fiszel c0200bfdae update app locks when pulling them 2025-11-30 13:15:33 +00:00
Ruben Fiszel 21c3d96950 improve svelte support on cli 2025-11-30 11:31:27 +00:00
Ruben Fiszel 67c4483587 vite + svelte support on local dev 2025-11-29 18:12:14 +00:00
Ruben Fiszel 732f23376a runBg -> backend II 2025-11-29 16:03:58 +00:00
Ruben Fiszel bde2da411a raw apps v2 (#7251) 2025-11-29 01:23:47 +00:00
Tsvetomir Bonev 140a734c25 allow configuring esbuild banner (#7247) 2025-11-28 22:27:08 +00:00
PyraandRuben Fiszel d36760bff7 feat: workspace dependencies (#7124)
* commit raw requirements

Signed-off-by: pyranota <pyra@duck.com>

* raw requirements

Signed-off-by: pyranota <pyra@duck.com>

* implement `parse_annotation`

Signed-off-by: pyranota <pyra@duck.com>

* more progress on wdeps

Signed-off-by: pyranota <pyra@duck.com>

* more progress

Signed-off-by: pyranota <pyra@duck.com>

* fixes

Signed-off-by: pyranota <pyra@duck.com>

* more progress

Signed-off-by: pyranota <pyra@duck.com>

* fixes

Signed-off-by: pyranota <pyra@duck.com>

* cli improvements + raw deps

Signed-off-by: pyranota <pyra@duck.com>

* cleanup

Signed-off-by: pyranota <pyra@duck.com>

* fix python versions

Signed-off-by: pyranota <pyra@duck.com>

* progress

Signed-off-by: pyranota <pyra@duck.com>

* update :)

Signed-off-by: pyranota <pyra@duck.com>

* add MaybeLock

Signed-off-by: pyranota <pyra@duck.com>

* go WIP

Signed-off-by: pyranota <pyra@duck.com>

* fix python ignoring py version from requirements

Signed-off-by: pyranota <pyra@duck.com>

* optimize php

Signed-off-by: pyranota <pyra@duck.com>

* require admin to alter

Signed-off-by: pyranota <pyra@duck.com>

* fix(cli): flow generateLocks raw deps

Signed-off-by: pyranota <pyra@duck.com>

* progress in checklist

Signed-off-by: pyranota <pyra@duck.com>

* fix agent workers

Signed-off-by: pyranota <pyra@duck.com>

* nits

Signed-off-by: pyranota <pyra@duck.com>

* nits

Signed-off-by: pyranota <pyra@duck.com>

* nit: remove default features

Signed-off-by: pyranota <pyra@duck.com>

* oh-wow

Signed-off-by: pyranota <pyra@duck.com>

* remove dbg!

Signed-off-by: pyranota <pyra@duck.com>

* nits

Signed-off-by: pyranota <pyra@duck.com>

* add indexes

Signed-off-by: pyranota <pyra@duck.com>

* cleanup

Signed-off-by: pyranota <pyra@duck.com>

* nits

Signed-off-by: pyranota <pyra@duck.com>

* remove todos

Signed-off-by: pyranota <pyra@duck.com>

* fix cli

Signed-off-by: pyranota <pyra@duck.com>

* add debug flag

Signed-off-by: pyranota <pyra@duck.com>

* cli: remove noise

Signed-off-by: pyranota <pyra@duck.com>

* fix cli

Signed-off-by: pyranota <pyra@duck.com>

* remove todos

Signed-off-by: pyranota <pyra@duck.com>

* trigger deps correctly

Signed-off-by: pyranota <pyra@duck.com>

* fix frontend

Signed-off-by: pyranota <pyra@duck.com>

* fix frontend again

Signed-off-by: pyranota <pyra@duck.com>

* finally fix frontend

Signed-off-by: pyranota <pyra@duck.com>

* ee repo ref

Signed-off-by: pyranota <pyra@duck.com>

* fix all

Signed-off-by: pyranota <pyra@duck.com>

* more fixes...

Signed-off-by: pyranota <pyra@duck.com>

* remove test

Signed-off-by: pyranota <pyra@duck.com>

* Update backend-test.yml

* comment out legacy test

Signed-off-by: pyranota <pyra@duck.com>

* fix ci

Signed-off-by: pyranota <pyra@duck.com>

* fix ci?

Signed-off-by: pyranota <pyra@duck.com>

* comment out thing

Signed-off-by: pyranota <pyra@duck.com>

* ignore test

Signed-off-by: pyranota <pyra@duck.com>

* ci

Signed-off-by: pyranota <pyra@duck.com>

* base fixture

Signed-off-by: pyranota <pyra@duck.com>

* fix regression

Signed-off-by: pyranota <pyra@duck.com>

* fix docs links

Signed-off-by: pyranota <pyra@duck.com>

* update min version

Signed-off-by: pyranota <pyra@duck.com>

* simplify

* implement cache for get_latest

Signed-off-by: pyranota <pyra@duck.com>

* move to workspace settings

Signed-off-by: pyranota <pyra@duck.com>

* sqlx + migration

Signed-off-by: pyranota <pyra@duck.com>

* more migrations

Signed-off-by: pyranota <pyra@duck.com>

* use box pin

Signed-off-by: pyranota <pyra@duck.com>

* nit

Signed-off-by: pyranota <pyra@duck.com>

---------

Signed-off-by: pyranota <pyra@duck.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2025-11-28 16:00:11 +00:00
Ruben Fiszel 8586ef2fa3 fix(cli): support better esm mode for codebases 2025-11-27 17:21:04 +00:00
Ruben Fiszel aa28a85520 fix(cli): improve back-compatibility with app.yaml with policy still present 2025-11-26 11:00:59 +00:00
Ruben Fiszel 4fa2e25991 fix(cli): handle better public apps 2025-11-25 12:12:49 +00:00
Ruben Fiszel 9f5f3f4d9a fix(cli): fix pushing non existing apps with cli 2025-11-24 15:03:40 +00:00
Ruben Fiszel 5c07f0258c fix(cli): improve cli local policy generation 2025-11-21 14:47:28 +00:00
Ruben Fiszel bf68189c05 feat(cli): app policies are generated locally (#7200) 2025-11-21 13:01:33 +00:00
Ruben Fiszel 9092ba6948 remove cli dead code 2025-11-18 23:14:21 +00:00
Alexander Petric 3baf646089 fix: allow --yes in fork command (#7122) 2025-11-12 16:32:39 +00:00
Ruben Fiszel 9cdc176537 fix(cli): add automatic handler of .node files for codebase bundler 2025-11-07 23:10:26 +00:00