From 89f9e647e44f4a627afe16a326ff44259c63c11f Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Tue, 8 Apr 2025 09:16:22 +0200 Subject: [PATCH] fix(oven-sh/bun): fix parameter --- Makefile | 1 + config.schema.base.json | 3 +++ config.schema.json | 44 +++++++++++++++++++++++++++++++++++++++++ oven-sh/bun/command.go | 1 + 4 files changed, 49 insertions(+) diff --git a/Makefile b/Makefile index a084df0..73edf68 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ lint: schema: @jsonschema bundle config.schema.base.json \ --resolve ./arbitrary/open/config.schema.json \ + --resolve ./arbitrary/task/config.schema.json \ --resolve ./arbitrary/zip/config.schema.json \ --resolve ./azure/az/config.schema.json \ --resolve ./cloudflare/cloudflared/config.schema.json \ diff --git a/config.schema.base.json b/config.schema.base.json index 27e45b1..fad393b 100644 --- a/config.schema.base.json +++ b/config.schema.base.json @@ -111,6 +111,9 @@ }, "kubeforward": { "$ref": "https://github.com/foomo/posh-providers/kubernets/kubeforward/config" + }, + "task": { + "$ref": "https://github.com/foomo/posh-providers/arbitrary/task/config" } }, "additionalProperties": false, diff --git a/config.schema.json b/config.schema.json index 00451c3..7a1dc49 100644 --- a/config.schema.json +++ b/config.schema.json @@ -96,6 +96,9 @@ "stern": { "$ref": "#/$defs/https%3A~1~1github.com~1foomo~1posh-providers~1stern~1stern~1config" }, + "task": { + "$ref": "#/$defs/https%3A~1~1github.com~1foomo~1posh-providers~1arbitrary~1task~1config" + }, "teleport": { "$ref": "#/$defs/https%3A~1~1github.com~1foomo~1posh-providers~1gravitational~1teleport~1config" }, @@ -195,6 +198,47 @@ } } }, + "https://github.com/foomo/posh-providers/arbitrary/task/config": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "#/$defs/https%3A~1~1github.com~1foomo~1posh-providers~1arbitrary~1task~1config/$defs/Config", + "$defs": { + "Config": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/https%3A~1~1github.com~1foomo~1posh-providers~1arbitrary~1task~1config/$defs/Task" + } + }, + "Task": { + "type": "object", + "required": [ "prompt", "deps", "cmds", "hidden" ], + "properties": { + "cmds": { + "description": "Commands to execute", + "type": "array", + "items": { + "type": "string" + } + }, + "deps": { + "description": "Dependencies to run", + "type": "array", + "items": { + "type": "string" + } + }, + "hidden": { + "description": "Don't show in the completion list", + "type": "boolean" + }, + "prompt": { + "description": "Prompt string to confirm execution", + "type": "string" + } + }, + "additionalProperties": false + } + } + }, "https://github.com/foomo/posh-providers/arbitrary/zip/config": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$ref": "#/$defs/https%3A~1~1github.com~1foomo~1posh-providers~1arbitrary~1zip~1config/$defs/Config", diff --git a/oven-sh/bun/command.go b/oven-sh/bun/command.go index 9746efa..e0844ba 100644 --- a/oven-sh/bun/command.go +++ b/oven-sh/bun/command.go @@ -223,6 +223,7 @@ func NewCommand(l log.Logger, cache cache.Cache) *Command { Args: tree.Args{ { Name: "package", + Optional: true, Description: "Package name", }, },