From 891e05a219a5ae4037ae4c5c32af0ad29e922f81 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 13 Oct 2023 23:12:04 +0200 Subject: [PATCH] [Execute UI] Added syntax highlight to JSON and shell snippets. --- .../backend/http/webapp/package-lock.json | 19 +++++++++++---- platypush/backend/http/webapp/package.json | 1 + .../src/components/panels/Execute/Index.vue | 16 +++++++++++-- .../components/panels/Execute/Response.vue | 24 ++++++++++++++++++- .../src/components/panels/Execute/common.scss | 18 ++++++++++++++ platypush/plugins/http/webpage/__init__.py | 6 ++--- 6 files changed, 72 insertions(+), 12 deletions(-) diff --git a/platypush/backend/http/webapp/package-lock.json b/platypush/backend/http/webapp/package-lock.json index bdec4bbeb6..26758904c8 100644 --- a/platypush/backend/http/webapp/package-lock.json +++ b/platypush/backend/http/webapp/package-lock.json @@ -11,6 +11,7 @@ "@fortawesome/fontawesome-free": "^6.1.1", "axios": "^0.21.4", "core-js": "^3.23.4", + "highlight.js": "^11.9.0", "lato-font": "^3.0.0", "mitt": "^2.1.0", "register-service-worker": "^1.7.2", @@ -4339,6 +4340,15 @@ "node": ">=8" } }, + "node_modules/cli-highlight/node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/cli-highlight/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6917,12 +6927,11 @@ } }, "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", + "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", "engines": { - "node": "*" + "node": ">=12.0.0" } }, "node_modules/hosted-git-info": { diff --git a/platypush/backend/http/webapp/package.json b/platypush/backend/http/webapp/package.json index 9c305a7beb..5df1c319e7 100644 --- a/platypush/backend/http/webapp/package.json +++ b/platypush/backend/http/webapp/package.json @@ -11,6 +11,7 @@ "@fortawesome/fontawesome-free": "^6.1.1", "axios": "^0.21.4", "core-js": "^3.23.4", + "highlight.js": "^11.9.0", "lato-font": "^3.0.0", "mitt": "^2.1.0", "register-service-worker": "^1.7.2", diff --git a/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue b/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue index 795a69ffd0..3f347314ad 100644 --- a/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue @@ -8,8 +8,9 @@ -