mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-30 04:05:58 +09:00
Feature-unification plan §2. Ends the naming collision between generic /projects (workspace organization) and WordPress "Projects" (environment pipelines). Label + URL change only; deeper WP/app unification is §7. Frontend: - Pipeline list moves to /wordpress/pipelines; detail to /wordpress/pipelines/:id[/:tab]. WORDPRESS_TABS, command palette, page titles, breadcrumbs, empty-state copy, and the WordPressProject tab base all updated to "Pipelines". - Legacy /wordpress/projects[...] URLs redirect to the pipelines space via LegacyWpPipelineRedirect (deep links preserved). - wordpressApi.getPipelines() added; getProjects() kept as back-compat alias. Backend: - environment_pipeline_bp mounted a second time under /api/v1/wordpress/pipelines as a true alias of /wordpress/projects. - Test: /pipelines resolves identically to /projects. Verified: frontend build clean, 5 alias tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
"""§2 unification: /api/v1/wordpress/pipelines aliases /wordpress/projects.
|
|
|
|
"WordPress Projects" was renamed to "Pipelines" to end the collision with the
|
|
generic /projects surface. The environment-pipeline blueprint is mounted under
|
|
both prefixes, so every route resolves identically during the deprecation
|
|
window.
|
|
"""
|
|
|
|
|
|
def test_pipelines_alias_matches_projects_list(client, auth_headers):
|
|
projects_res = client.get('/api/v1/wordpress/projects', headers=auth_headers)
|
|
pipelines_res = client.get('/api/v1/wordpress/pipelines', headers=auth_headers)
|
|
|
|
assert projects_res.status_code == 200
|
|
assert pipelines_res.status_code == 200
|
|
assert pipelines_res.get_json() == projects_res.get_json()
|
|
|
|
|
|
def test_both_pipeline_prefixes_registered():
|
|
from app import create_app
|
|
|
|
application = create_app('testing')
|
|
rules = {r.rule for r in application.url_map.iter_rules()}
|
|
has_projects = any(r.startswith('/api/v1/wordpress/projects') for r in rules)
|
|
has_pipelines = any(r.startswith('/api/v1/wordpress/pipelines') for r in rules)
|
|
assert has_projects
|
|
assert has_pipelines
|