diff --git a/.github/workflows/update-results.yaml b/.github/workflows/update-results.yaml index 5918454..cec1f73 100644 --- a/.github/workflows/update-results.yaml +++ b/.github/workflows/update-results.yaml @@ -2,6 +2,7 @@ on: # push: # branches: # - main + workflow_dispatch: schedule: - cron: '0 3 * * 3' # At 03:00 on Wednesday diff --git a/action.nu b/action.nu index 3b76385..ca84b83 100644 --- a/action.nu +++ b/action.nu @@ -135,7 +135,11 @@ export module plugin-list { ]: string -> record { let git_repo = $in # github repository url (e.g. https://github.com/FMotalleb/nu_plugin_port_scan) let toml_file_address: string = (get-raw-toml-address $git_repo $branch | url join) - return (http get --raw $toml_file_address | from toml) + try { + return (http get --raw $toml_file_address | from toml) + } catch { + return {} + } } # checks if given input is string or not @@ -160,15 +164,26 @@ export module plugin-list { repository: string ]: record -> record { let toml: record = $in - return { - name: $"[($toml.package.name)]\(($repository)\)" - version: $toml.package.version - description: $toml.package.description? - plugin: ($toml.dependencies.nu-plugin - | get self or version) - protocol: ($toml.dependencies.nu-protocol - | get self or version) + if ([$toml.package?, $toml.dependencies?] | all {|i| $i != null} ) { + return { + name: $"[($toml.package.name)]\(($repository)\)" + version: $toml.package.version + description: $toml.package.description? + plugin: ($toml.dependencies.nu-plugin + | get self or version) + protocol: ($toml.dependencies.nu-protocol + | get self or version) + } + } else { + return { + name: $"issue in config file for \(($repository)\)" + version: "0.0" + description: "" + plugin: "0.0" + protocol: "0.0" + } } + } def "get icon" []: int -> string { @@ -194,6 +209,9 @@ export module plugin-list { ]: record -> record { let input = $in use version "compare to" + if ($input | is-empty) { + return $input + } if ((($input.plugin | compare to $min_plugin) == -1) or ($input.protocol | compare to $min_protocol) == -1) { return ($input | upsert plugin $"⛔($input.plugin)" diff --git a/config.yaml b/config.yaml index d633457..ba08ec9 100644 --- a/config.yaml +++ b/config.yaml @@ -202,8 +202,13 @@ plugins: language: bash repository: url: https://github.com/tesujimath/nu_plugin_bash_env - branch: main - + branch: master + override: # override any field in the result record (do not use unless you have to `like the plugin is written in Python`) + name: "[nu_plugin_bash_env](https://github.com/tesujimath/nu_plugin_bash_env)" + version: "0.0.0" + description: "A Bash environment plugin for Nushell." + plugin: "0.87" + protocol: "0.87" # Example # - name: nu_plugin_bin_reader # the plugins name (mandatory) # language: python # programming language (mandatory) diff --git a/plugin_details.md b/plugin_details.md index 54829aa..3fb20d1 100644 --- a/plugin_details.md +++ b/plugin_details.md @@ -1,5 +1,4 @@ -[table 35 rows] -EvalBlockWithInput(Span { start: 107689, end: 107693 }, [NetworkFailure("Requested file not found (404): \"https://raw.githubusercontent.com/hulthe/nu_plugin_msgpack/main/Cargo.toml\"", Span { start: 112246, end: 112264 })]) -EvalBlockWithInput(Span { start: 107689, end: 107693 }, [CantFindColumn { col_name: "plugin", span: Span { start: 114193, end: 114199 }, src_span: Span { start: 114186, end: 114192 } }]) +[table 36 rows] +EvalBlockWithInput(Span { start: 107690, end: 107694 }, [CantFindColumn { col_name: "plugin", span: Span { start: 114641, end: 114647 }, src_span: Span { start: 114634, end: 114640 } }]) -last update at `2023-12-06 03:09:55 +00:00` +last update at `2023-12-06 07:11:16 +00:00`