feat: add local repository type with repo_type field

Introduces repo_type (remote/local) as a separate axis from package_type
so that any package type can be hosted locally. A terraform local repo
is package_type=terraform + repo_type=local.

- Remote model gains RepoType field (defaults to "remote")
- Database schema adds repo_type column with migration for existing DBs
- V1 proxy adds /api/v1/local/{name}/* route for serving local files
- V2 upload via PUT /api/v2/remotes/{name}/files/{path} checks
  repo_type=local and returns 409 on duplicate (no overwrites)
- V2 create validates repo_type and requires base_url only for remotes
- Removes the previous terraform-local PackageType approach
This commit is contained in:
2026-06-21 23:01:59 +10:00
parent b46c116f6b
commit 8f8a30ac34
9 changed files with 333 additions and 17 deletions
+1
View File
@@ -1,6 +1,7 @@
export interface Remote {
name: string;
package_type: string;
repo_type: string;
base_url: string;
description: string;
username?: string;