Skip to content

WKS-2691 - jf worker init fetches tsconfig.json from the platform with embedded fallback - #62

Open
ehl-jf wants to merge 3 commits into
mainfrom
feature/WKS-2691-tsconfig-fetch
Open

WKS-2691 - jf worker init fetches tsconfig.json from the platform with embedded fallback#62
ehl-jf wants to merge 3 commits into
mainfrom
feature/WKS-2691-tsconfig-fetch

Conversation

@ehl-jf

@ehl-jf ehl-jf commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add FetchTsConfig helper (GET worker/api/v1/scaffold/tsconfig)
  • jf worker init now fetches tsconfig.json from the server, falls back to an embedded strict-mode default on any fetch problem, and skips generation if tsconfig.json already exists (still overwritable with --force)
  • Update AI-agent help text to describe the new behavior

…h embedded fallback

- Add FetchTsConfig helper (GET worker/api/v1/scaffold/tsconfig)
- jf worker init fetches tsconfig.json from the server, falls back to an
  embedded strict-mode default on any fetch problem, and skips generation
  if tsconfig.json already exists (still overwritable with --force)
- Update AI-agent help text to describe the new behavior
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Unit Tests Results

267 tests  +10   267 ✅ +10   1m 16s ⏱️ -6s
  3 suites ± 0     0 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 623a3cd. ± Comparison against base commit 6053ab3.

This pull request removes 2 and adds 12 tests. Note that renamed tests count towards both.
commands ‑ TestInitWorker/dont_overwrite_tsconfig.json_without_force
commands ‑ TestInitWorker/overwrite_tsconfig.json_with_force
commands ‑ TestInitWorker/fetch_tsconfig.json_from_the_server
commands ‑ TestInitWorker/force-overwrite_tsconfig.json_with_server_content
commands ‑ TestInitWorker/regenerate_tsconfig.json_when_it_already_exists_and_force_is_set
commands ‑ TestInitWorker/skip_tsconfig.json_generation_when_it_already_exists_and_no_force
common ‑ TestFetchOptions/propagate_projectKey
common ‑ TestFetchOptions/success
common ‑ TestFetchTSConfig
common ‑ TestFetchTSConfig/endpoint_not_found
common ‑ TestFetchTSConfig/invalid_json_body
common ‑ TestFetchTSConfig/propagate_projectKey
…

♻️ This comment has been updated with latest results.

@RemiBou

RemiBou commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

QA passed — ready for merge (WKS-2691)

Manual (VS Code / CLI against https://wks2691tenant1.jfrogdev.org):

  • Generated tsconfig.json matches GET /worker/api/v1/scaffold/tsconfig
  • IDE uses that config (strictNullChecks flags null misuse)
  • Endpoint protection: no token 401, regular user 403, admin 200

Also covered: skip existing tsconfig, --force overwrite, embedded fallback, help text, regression (GENERIC_EVENT / --no-test / --project-key), local tsc emit, no secrets in the config.

Jira moved to Ready For Merge.

@github-actions

Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


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.

3 participants