Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"activationEvents": [
"onView:fallout.build",
"onView:fallout.buildExplorer",
"onView:fallout.deployment",
"workspaceContains:**/.fallout/temp/build-graph.json",
"workspaceContains:**/.nuke/temp/build-graph.json"
],
Expand All @@ -52,6 +53,12 @@
"name": "Build",
"icon": "media/fallout.svg",
"contextualTitle": "Fallout"
},
{
"id": "fallout.deployment",
"name": "Deployment",
"icon": "media/fallout.svg",
"contextualTitle": "Fallout"
}
],
"explorer": [
Expand All @@ -72,6 +79,10 @@
{
"view": "fallout.buildExplorer",
"contents": "No Fallout build graph found in this workspace.\nRun the build once to generate `build-graph.json`, then refresh.\n[Plan build (dry run)](command:fallout.planTarget)"
},
{
"view": "fallout.deployment",
"contents": "No deployment graph yet.\nThe continuous-delivery model (channels → environments → targets) is emitted by a later Fallout build (ADR-0009). This view lights up once the framework writes a `deployment-graph.json`."
}
],
"commands": [
Expand Down Expand Up @@ -115,7 +126,7 @@
},
{
"command": "fallout.refreshTargets",
"when": "view == fallout.build || view == fallout.buildExplorer",
"when": "view == fallout.build || view == fallout.buildExplorer || view == fallout.deployment",
"group": "navigation@2"
}
],
Expand Down
16 changes: 16 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,21 @@ class FalloutTargetsProvider implements vscode.TreeDataProvider<TargetItem> {
}
}

/**
* Placeholder for the Deployment view. The continuous-delivery graph (channels →
* environments → targets, ADR-0009) is not emitted by the framework yet, so this
* returns nothing and the view shows its welcome content. It becomes real once the
* build writes a deployment-graph.json.
*/
class DeploymentProvider implements vscode.TreeDataProvider<vscode.TreeItem> {
getTreeItem(element: vscode.TreeItem): vscode.TreeItem {
return element;
}
getChildren(): vscode.ProviderResult<vscode.TreeItem[]> {
return [];
}
}

function runInTerminal(root: string, args: string): void {
const existing = vscode.window.terminals.find(t => t.name === 'Fallout');
const terminal = existing ?? vscode.window.createTerminal({ name: 'Fallout', cwd: root });
Expand Down Expand Up @@ -145,6 +160,7 @@ export function activate(context: vscode.ExtensionContext): void {
// mirrored Explorer dock — one graph, two homes; refresh() updates both.
vscode.window.registerTreeDataProvider('fallout.build', provider),
vscode.window.registerTreeDataProvider('fallout.buildExplorer', provider),
vscode.window.registerTreeDataProvider('fallout.deployment', new DeploymentProvider()),
watcher,
vscode.commands.registerCommand('fallout.refreshTargets', refreshAll),
vscode.commands.registerCommand('fallout.runTarget', (item?: TargetItem) => {
Expand Down