Skip to content

Commit 0f3f5c5

Browse files
committed
chore: bring back the "onSetupMessage"
1 parent 7f2f0df commit 0f3f5c5

9 files changed

Lines changed: 30 additions & 1 deletion

File tree

docs/static/schemas/plugin-manifest.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
"type": "string",
8787
"description": "SPDX license identifier",
8888
"examples": ["Apache-2.0", "MIT"]
89+
},
90+
"onSetupMessage": {
91+
"type": "string",
92+
"description": "Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning)."
8993
}
9094
},
9195
"additionalProperties": false,

docs/static/schemas/template-plugins.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
"default": false,
6666
"description": "When true, this plugin is required by the template and cannot be deselected during CLI init. The user will only be prompted to configure its resources. When absent or false, the plugin is optional and the user can choose whether to include it."
6767
},
68+
"onSetupMessage": {
69+
"type": "string",
70+
"description": "Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning)."
71+
},
6872
"resources": {
6973
"type": "object",
7074
"required": ["required", "optional"],

packages/appkit/src/plugins/lakebase/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"name": "lakebase",
44
"displayName": "Lakebase",
55
"description": "SQL query execution against Databricks Lakebase Autoscaling",
6+
"onSetupMessage": "Configure environment variables before running or deploying the app.\nSee: https://databricks.github.io/appkit/docs/plugins/lakebase",
67
"resources": {
78
"required": [],
89
"optional": []

packages/shared/src/cli/commands/plugin/manifest-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface PluginManifest {
2727
optional: ResourceRequirement[];
2828
};
2929
config?: { schema: unknown };
30+
onSetupMessage?: string;
3031
}
3132

3233
export interface TemplatePlugin extends Omit<PluginManifest, "config"> {

packages/shared/src/cli/commands/plugin/sync/sync.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ function discoverLocalPlugins(
278278
description: manifest.description,
279279
package: `./${relativePath}`,
280280
resources: manifest.resources,
281+
...(manifest.onSetupMessage && {
282+
onSetupMessage: manifest.onSetupMessage,
283+
}),
281284
};
282285
} catch (error) {
283286
console.warn(
@@ -358,6 +361,9 @@ function scanForPlugins(
358361
description: manifest.description,
359362
package: packageName,
360363
resources: manifest.resources,
364+
...(manifest.onSetupMessage && {
365+
onSetupMessage: manifest.onSetupMessage,
366+
}),
361367
};
362368
}
363369
}
@@ -400,6 +406,9 @@ function scanPluginsDir(
400406
description: manifest.description,
401407
package: packageName,
402408
resources: manifest.resources,
409+
...(manifest.onSetupMessage && {
410+
onSetupMessage: manifest.onSetupMessage,
411+
}),
403412
};
404413
}
405414
} catch (error) {

packages/shared/src/plugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export interface PluginManifest {
8484
config?: {
8585
schema: JSONSchema7;
8686
};
87+
onSetupMessage?: string;
8788
author?: string;
8889
version?: string;
8990
repository?: string;

packages/shared/src/schemas/plugin-manifest.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
"type": "string",
8787
"description": "SPDX license identifier",
8888
"examples": ["Apache-2.0", "MIT"]
89+
},
90+
"onSetupMessage": {
91+
"type": "string",
92+
"description": "Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning)."
8993
}
9094
},
9195
"additionalProperties": false,

packages/shared/src/schemas/template-plugins.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
"default": false,
6666
"description": "When true, this plugin is required by the template and cannot be deselected during CLI init. The user will only be prompted to configure its resources. When absent or false, the plugin is optional and the user can choose whether to include it."
6767
},
68+
"onSetupMessage": {
69+
"type": "string",
70+
"description": "Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning)."
71+
},
6872
"resources": {
6973
"type": "object",
7074
"required": ["required", "optional"],

template/appkit.plugins.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"resources": {
3535
"required": [],
3636
"optional": []
37-
}
37+
},
38+
"onSetupMessage": "Configure environment variables before running or deploying the app.\nSee: https://databricks.github.io/appkit/docs/plugins/lakebase"
3839
},
3940
"server": {
4041
"name": "server",

0 commit comments

Comments
 (0)