Skip to content

Commit 1d514b5

Browse files
committed
fix: make env optional in ResourceFieldEntry TypeScript type
Aligns the TS interfaces with the JSON schema change from 39613f5 that removed the `required: ["env"]` constraint. Fields like `branch` and `database` in the lakebase manifest don't map to env vars. Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
1 parent 0d4dab4 commit 1d514b5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/appkit/src/registry/resource-registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ export class ResourceRegistry {
315315
const values: Record<string, string> = {};
316316
let allSet = true;
317317
for (const [fieldName, fieldDef] of Object.entries(entry.fields)) {
318+
if (!fieldDef.env) continue;
318319
const val = process.env[fieldDef.env];
319320
if (val !== undefined && val !== "") {
320321
values[fieldName] = val;

packages/appkit/src/registry/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export {
5858
*/
5959
export interface ResourceFieldEntry {
6060
/** Environment variable name for this field */
61-
env: string;
61+
env?: string;
6262
/** Human-readable description for this field */
6363
description?: string;
6464
/** When true, this field is excluded from Databricks bundle configuration (e.g. app.yaml) generation. */

packages/shared/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export interface PluginManifest {
101101
*/
102102
export interface ResourceFieldEntry {
103103
/** Environment variable name for this field */
104-
env: string;
104+
env?: string;
105105
/** Human-readable description for this field */
106106
description?: string;
107107
/** When true, this field is excluded from Databricks bundle configuration (e.g. app.yaml) generation. */

0 commit comments

Comments
 (0)