databricks-cli/libs/template
shreyas-goenka af3914db61
Move `WorkspaceClient` to `libs/command` (#2444)
## Changes
Move the WorkspaceClient reader and setter from the root package to
`libs/command`.

## Why
This allows us to read the workspace client set in the context in all
CLI packages. This was not possible before because using
`root.WorkspaceClient` would often result in an import cycle.

This would also allow us to standardise reads of the workspace client to
be from the context in bundle commands. Today those are read from the
bundle object tree instead.

This is a natural followup to
https://github.com/databricks/cli/pull/2440.

## Tests
Existing tests and one new unit test.

NO_CHANGELOG=true
2025-03-07 16:47:19 +00:00
..
templates Use schema field for pipeline in builtin template (#2347) 2025-03-05 14:19:33 +00:00
testdata Add the `bundle_uuid` helper function for templates (#1947) 2024-12-02 10:29:29 +00:00
builtin.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
builtin_test.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
config.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
config_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
file.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
file_test.go Set the write bit for files written during template initialization (#2068) 2025-01-08 13:18:28 +00:00
helpers.go Move `WorkspaceClient` to `libs/command` (#2444) 2025-03-07 16:47:19 +00:00
helpers_test.go Move `WorkspaceClient` to `libs/command` (#2444) 2025-03-07 16:47:19 +00:00
reader.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
reader_test.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
renderer.go Set the write bit for files written during template initialization (#2068) 2025-01-08 13:18:28 +00:00
renderer_test.go Move `WorkspaceClient` to `libs/command` (#2444) 2025-03-07 16:47:19 +00:00
resolver.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
resolver_test.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
template.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
template_test.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
writer.go Move `WorkspaceClient` to `libs/command` (#2444) 2025-03-07 16:47:19 +00:00
writer_test.go Move `WorkspaceClient` to `libs/command` (#2444) 2025-03-07 16:47:19 +00:00