(projectRef?: string, slug?: string)
| 74 | export function list(projectRef: string, slug: string): ApiPromise<EnvironmentVariables>; |
| 75 | export function list(): ApiPromise<EnvironmentVariables>; |
| 76 | export function list(projectRef?: string, slug?: string): ApiPromise<EnvironmentVariables> { |
| 77 | const $projectRef = projectRef ?? taskContext.ctx?.project.ref; |
| 78 | const $slug = slug ?? taskContext.ctx?.environment.slug; |
| 79 | |
| 80 | if (!$projectRef) { |
| 81 | throw new Error("projectRef is required"); |
| 82 | } |
| 83 | |
| 84 | if (!$slug) { |
| 85 | throw new Error("slug is required"); |
| 86 | } |
| 87 | |
| 88 | const apiClient = apiClientManager.client; |
| 89 | |
| 90 | if (!apiClient) { |
| 91 | throw apiClientMissingError(); |
| 92 | } |
| 93 | |
| 94 | return apiClient.listEnvVars($projectRef, $slug); |
| 95 | } |
| 96 | |
| 97 | export function create( |
| 98 | projectRef: string, |
nothing calls this directly
no test coverage detected
searching dependent graphs…