You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: support Django projects end-to-end in workos install
Previously `workos install` crashed with "Could not find package.json"
in any project without a package.json: JS integration detection calls
getPackageDotJson() which exits the process on missing file, killing
the installer before non-JS integrations (Python/Django) got a turn.
- Skip JS integration detection when package.json is missing
- Widen Python detection: match manage.py or requirements.txt with
django, not just pyproject.toml (via a new optional detect() override
on FrameworkMetadata, wired to the existing isDjangoProject helper)
- Write credentials to .env (not .env.local) and skip cookie password
generation for non-JS projects in unclaimed env provisioning
- Gate state-machine configureEnvironment actor on JS-only to prevent
a second .env.local leak post-detection
- Add Django port/callback defaults (8000, /auth/callback/) so
detectPort returns the right values for Python
Tests: +8 net covering detection matrix (no-package.json skip,
pyproject.toml, manage.py alone, requirements.txt+django, non-Django
python), python port defaults, and .env vs .env.local selection in
unclaimed provisioning.
* fix: broaden non-JS integration detection, add port defaults for all languages
Beyond the Django fixes in the previous commit, several other non-JS
integrations had parallel problems that would bite the next user with a
.NET, Kotlin, or non-trivial project layout.
- .NET detection was completely broken: manifestFile '*.csproj' went
through existsSync() which does literal-filename matching, so it never
matched. Now uses globExists() from language-detection.ts (which has
the right logic but wasn't wired up anywhere).
- Kotlin detection only matched build.gradle.kts (Kotlin DSL). Now also
matches build.gradle (Groovy DSL) and pom.xml (Maven) via the existing
detectKotlin() helper, which already had Gradle Groovy support.
Extended it to cover Maven too.
- Port defaults added for ruby (3000), php (8000), php-laravel (8000),
go (8080), dotnet (5000), elixir (4000), kotlin (8080). Previously all
fell back to DEFAULT_PORT=3000, which is wrong for every one of them.
- ensureGitignore() now also writes .env to .gitignore for non-JS
projects (previously only handled .env.local for JS).
Exported globExists() and detectKotlin() from language-detection.ts so
the integrations can share them. detectLanguage() itself still isn't
called anywhere in the install path — that's a larger cleanup for later.
* feat: parse dev-server port from config for .NET, Phoenix, Spring Boot, Rails
Follow-up to the hardcoded ecosystem defaults. These four languages have a
canonical config file where the dev server port lives; parse it so we don't
misconfigure redirect URIs when the user has customized the port.
- .NET: Properties/launchSettings.json → profiles[*].applicationUrl
- Phoenix: config/dev.exs or config/runtime.exs → port: NNNN
- Spring Boot: src/main/resources/application.{properties,yml} → server.port
- Rails: config/puma.rb → port ENV.fetch("PORT") { N } or literal port N
Falls back to the ecosystem default when the file is missing or malformed.
Python (Django), Go, plain PHP, and Laravel are unchanged — none has a
canonical config file; ports are CLI args or hardcoded in source.
* refactor: delete dead language-detection.ts, inline helpers into callers
detectLanguage() and its LANGUAGE_DETECTORS table were never called from
the install path. globExists() and detectKotlin() were the only pieces
still used after wiring up the dotnet/kotlin detect() overrides — both
are caller-specific enough to inline:
- dotnet/index.ts gets hasCsproj() (6 lines, readdirSync + endsWith)
- kotlin/index.ts gets isKotlinProject() (handles kts, gradle, pom.xml)
- The Language type moves into framework-config.ts where it is consumed
Net: one fewer module, no lost functionality.
0 commit comments