Skip to content

Conversation

@kvz
Copy link
Member

@kvz kvz commented Dec 2, 2025

We started to modernize Transloadify, but as that work was nearing completion, we decided the work should be merged into this repo. So that consuming devs can just npm install transloadit, and use it on the command-line, as well as import and interface with it programatically. The two are very related, Transoadify was merely a wrapper around the Node SDK.

Merging them gives developers an easier path to discovery, and for Transloadians will help spot duplicate code and cut atomic releases as we propel our JS client.

In the future, I could imagine this repo gets renamed and also becomes the single source of truth for browser based js clients (as well as official support for Deno, Bun, etc). But today, we're just folding the CLI into here.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

kvz and others added 26 commits December 2, 2025 11:39
Use a unique testId (timestamp + random string) for all template names
in e2e tests to prevent conflicts when tests run in parallel or when
previous runs didn't clean up properly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Previously, the abort signal passed to createAssembly was only honored
during the initial HTTP POST and TUS uploads. Now it's also honored
during the polling loop in awaitAssemblyCompletion, allowing users to
cancel long-running assembly operations at any point.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- JobsPromise now throws if error handler not set before adding promises
- Added clarifying comment explaining orphaned promise pattern in createAssembly
- WatchJobEmitter now properly cleans up file watchers on SIGINT/SIGTERM and errors
- Expanded --verbose/--quiet documentation with output level table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Use syslog-style severity levels inspired by @transloadit/sev-logger:
- err (3): Error conditions
- warn (4): Warning conditions
- notice (5): Normal but significant (default)
- info (6): Informational messages
- debug (7): Debug-level messages

Example: `npx transloadit assemblies list -l debug`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Now accepts both level names and numeric values:
  -l warn  OR  -l 4
  -l debug OR  -l 7

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Most verbose level for detailed tracing, matching sev-logger.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
kvz and others added 8 commits December 3, 2025 17:36
- Add hasFailures tracking to JobsPromise so CLI can detect failures
- CLI assemblies create now returns exit code 1 when any job fails
- Fix memory leak in awaitAssemblyCompletion: remove abort listener
  when sleep timeout resolves normally
- Update CHANGELOG with better onPoll description

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add --endpoint option to all commands for custom API endpoint
  (also reads from TRANSLOADIT_ENDPOINT env var)
- Add --single-assembly flag to assemblies create command
  Passes all input files to a single assembly instead of creating
  one assembly per file. Cannot be used with --watch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
When downloading a template that has no steps defined, `result.content.steps`
is undefined. JSON.stringify strips undefined values, so after writing and
reading the file back, the `steps` property would be missing.

Use nullish coalescing to default to empty object: `steps ?? {}`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace try-catch blocks with tryCatch() in assemblies-create.ts for
simple "stat file, use default on error" patterns. This reduces
boilerplate and improves readability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove assembly-notifications list command (Transloadit API doesn't
  have a list notifications endpoint, only replay)
- Remove the stub implementation and test
- Update README to remove the non-existent list command
- Add AbortSignal to https.get downloads so they can be cancelled
  when errors occur or the process is aborted

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace http/https.get with got.stream() and Node's pipeline().
This is cleaner, more consistent with the rest of the SDK (which uses got),
and reduces callback nesting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add test that verifies downloaded file md5 matches the md5hash
  from the assembly result
- Return assembly status from job promises so tests can access
  result metadata like md5hash

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kvz kvz self-assigned this Dec 4, 2025
kvz and others added 10 commits December 4, 2025 14:59
Add --concurrency option and fix file handle leaks:

1. Default mode: Queue job metadata and process up to N at a time
   (default: 5). Creates fresh streams only when job slots available.

2. Single-assembly mode: Close streams immediately after collecting
   paths, create fresh streams only when uploading.

Both fixes prevent EMFILE errors when processing many files.

Tests verify:
- "PROCESSING JOB" messages emitted with concurrency limiting
- "STREAM CLOSED" messages emitted in single-assembly mode
- Max concurrent jobs respects the concurrency limit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflict in assemblies-create.ts by adopting
the cleaner got.stream + pipeline approach for downloads
while preserving the concurrency limiting and fresh stream
creation from the local branch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Split assemblies.test.ts into three files to leverage vitest's
file-level parallelism:
- assemblies.test.ts: get, delete, replay tests
- assemblies-create.test.ts: create tests
- assemblies-list.test.ts: list test (slowest at ~30s)

This reduces e2e test wall time from ~73s to ~40s (~45% faster).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kvz kvz merged commit 254e33b into main Dec 8, 2025
10 checks passed
@kvz kvz deleted the cli branch December 8, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants