diff --git a/client/package.json b/client/package.json index 41a0a7d9..2628c715 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "ansible_forms_vue", - "version": "5.0.4", + "version": "5.0.5", "private": true, "scripts": { "serve": "vue-cli-service serve", @@ -19,7 +19,7 @@ "@fortawesome/free-regular-svg-icons": "~6.5.2", "@fortawesome/free-solid-svg-icons": "~6.5.2", "@fortawesome/vue-fontawesome": "2.0.10", - "axios": "~1.7.4", + "axios": "~1.7.7", "brace": "~0.11.1", "bulma": "0.9.4", "bulma-calendar": "6.1.19", @@ -28,15 +28,15 @@ "bulma-quickview": "*", "bulmaswatch": "0.8.1", "copy-to-clipboard": "~3.3.3", - "core-js": "~3.38.0", + "core-js": "~3.38.1", "es6-promise": "~4.2.8", - "highlight.js": "9.11.0", + "highlight.js": "^10.7.2", "jsonwebtoken": "^9.0.2", "lodash": "~4.17.21", "thenby": "*", "vue": "~2.7.15", "vue-bulma-paginate": "*", - "vue-highlight.js": "3.1.0", + "@highlightjs/vue-plugin": "1.0.2", "vue-json-pretty": "1.8.3", "vue-moment": "*", "vue-router": "~3.5.4", @@ -54,7 +54,7 @@ "babel-eslint": "~10.1.0", "eslint": "~6.8.0", "eslint-plugin-vue": "~6.2.2", - "nodemon": "~3.1.3", + "nodemon": "~3.1.5", "sass": "~1.49.11", "sass-loader": "10.1.1", "vue-template-compiler": "~2.6.11" diff --git a/client/src/components/BulmaExampleTable.vue b/client/src/components/BulmaExampleTable.vue index 7ce4ab92..ea709a1e 100644 --- a/client/src/components/BulmaExampleTable.vue +++ b/client/src/components/BulmaExampleTable.vue @@ -26,8 +26,8 @@

- diff --git a/client/src/components/BulmaHelpTable.vue b/client/src/components/BulmaHelpTable.vue index 9910423a..cd54e7bb 100644 --- a/client/src/components/BulmaHelpTable.vue +++ b/client/src/components/BulmaHelpTable.vue @@ -64,8 +64,8 @@

{{ i+1 }}) {{ e.name }}

-
diff --git a/client/src/components/Form.vue b/client/src/components/Form.vue index 2b13eb19..4261cbe6 100644 --- a/client/src/components/Form.vue +++ b/client/src/components/Form.vue @@ -147,8 +147,8 @@
-
@@ -156,8 +156,8 @@
-
@@ -473,11 +473,14 @@ import DatePicker from 'vue2-datepicker'; import 'vue2-datepicker/index.css'; - // load javascript highlight, for debug view import 'highlight.js/styles/monokai-sublime.css' - import VueHighlightJS from 'vue-highlight.js'; + import hljs from 'highlight.js/lib/core'; import javascript from 'highlight.js/lib/languages/javascript'; - import vue from 'vue-highlight.js/lib/languages/vue'; + import vuePlugin from "@highlightjs/vue-plugin"; + + hljs.registerLanguage('javascript', javascript); + + Vue.use(vuePlugin); import Helpers from './../lib/Helpers' import Copy from 'copy-to-clipboard' import 'vue-json-pretty/lib/styles.css'; @@ -487,12 +490,6 @@ Vue.use(Vuelidate) Vue.use(VueShowdown) - Vue.use(VueHighlightJS, { - // Register only languages that you want - languages: { - javascript - } - }); export default{ name:"Form", diff --git a/client/src/views/ReferenceGuide.vue b/client/src/views/ReferenceGuide.vue index 1a3cc79a..34b8c62f 100644 --- a/client/src/views/ReferenceGuide.vue +++ b/client/src/views/ReferenceGuide.vue @@ -182,12 +182,17 @@ import TokenStorage from './../lib/TokenStorage' import BulmaHelpTable from './../components/BulmaHelpTable.vue' import BulmaExampleTable from './../components/BulmaExampleTable.vue' - import 'highlight.js/styles/agate.css' - import VueHighlightJS from 'vue-highlight.js'; - //import 'highlight.js/styles/default.css'; - // import javascript from 'highlight.js/lib/languages/javascript'; - import 'vue-highlight.js/lib/allLanguages' - // import yaml from 'highlight.js/lib/languages/yaml'; + + import 'highlight.js/styles/agate.css' + import hljs from 'highlight.js/lib/core'; + import javascript from 'highlight.js/lib/languages/javascript'; + import yaml from 'highlight.js/lib/languages/yaml'; + import vuePlugin from "@highlightjs/vue-plugin"; + + hljs.registerLanguage('javascript', javascript); + hljs.registerLanguage('yaml', yaml); + Vue.use(vuePlugin); + import VueShowDown from 'vue-showdown' Vue.use(VueShowDown) // Vue.use(VueHighlightJS, { @@ -197,7 +202,7 @@ // javascript // } // }); - Vue.use(VueHighlightJS,{auto: true}); + export default{ components:{BulmaHelpTable,BulmaExampleTable}, diff --git a/client/src/views/Sshkey.vue b/client/src/views/Sshkey.vue index 9e52a01f..d6607def 100644 --- a/client/src/views/Sshkey.vue +++ b/client/src/views/Sshkey.vue @@ -34,7 +34,7 @@ import BulmaSettingsMenu from '../components/BulmaSettingsMenu.vue' import TokenStorage from './../lib/TokenStorage' import { required, email, minValue,maxValue,minLength,maxLength,helpers,requiredIf,sameAs } from 'vuelidate/lib/validators' - const privatekey = helpers.regex("privatekey",/^-----BEGIN (.+) PRIVATE KEY-----([^-!]+)-----END \1 PRIVATE KEY-----\r?\n$/gm) + const privatekey = helpers.regex("privatekey",/^-----BEGIN ([A-Z ]+ PRIVATE KEY)-----\r?\n([^-]+)\r?\n-----END \1-----\r?\n$/gm) Vue.use(Vuelidate) export default{ diff --git a/server/package.json b/server/package.json index cafec81a..1890a647 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "ansible_forms", - "version": "5.0.4", + "version": "5.0.5", "repository": { "type": "git", "url": "git://github.com/ansibleguy76/ansibleforms.git" @@ -20,45 +20,45 @@ "@outlinewiki/passport-azure-ad-oauth2": "~0.1.0", "ajv": "~6.12.6", "ajv-error-parser": "~1.0.7", - "axios": "~1.7.4", + "axios": "~1.7.7", "bcrypt": "~5.1.0", "bluebird": "~3.7.2", "cert-info": "~1.5.1", "cheerio": "~1.0.0", "connect-history-api-fallback": "~2.0.0", - "core-js": "~3.38.0", + "core-js": "~3.38.1", "cors": "~2.8.5", "cron-parser": "~4.9.0", - "dayjs": "1.11.12", - "express": "~4.19.2", + "dayjs": "~1.11.13", + "express": "~4.21.0", "cookie-session": "~2.1.0", "fs-extra": "~11.2.0", "ip": "2.0.1", "json-bigint": "~1.0.0", - "ldap-authentication": "~3.2.2", + "ldap-authentication": "~3.2.4", "ldapjs": "~3.0.7", "lodash": "~4.17.21", "modern-passport-http": "~0.3.0", "moment": "~2.30.1", - "mongodb": "~6.8.0", + "mongodb": "~6.9.0", "oracledb": "~6.6.0", "mssql": "~10.0.2", "multer": "~1.4.5-lts.1", - "mysql2": "~3.11.0", + "mysql2": "~3.11.3", "node-cache": "~5.1.2", "node-jq": "~4.4.0", - "nodemailer": "~6.9.14", - "openid-client": "^5.6.5", + "nodemailer": "~6.9.15", + "openid-client": "^5.7.0", "passport": "~0.7.0", "passport-jwt": "~4.0.1", - "pg": "~8.12.0", + "pg": "~8.13.0", "read-last-lines": "~1.8.0", "swagger-ui-express": "~5.0.1", "thenby": "~1.3.4", - "winston": "~3.14.1", + "winston": "~3.14.2", "winston-daily-rotate-file": "~5.0.0", - "winston-syslog": "~2.7.0", - "yaml": "~2.4.5" + "winston-syslog": "~2.7.1", + "yaml": "~2.5.0" }, "devDependencies": { "@babel/cli": "~7.24.7", @@ -67,7 +67,7 @@ "@babel/node": "~7.25.0", "dotenv": "~16.4.1", "eslint": "~8.56.0", - "nodemon": "~3.1.3", + "nodemon": "~3.1.5", "npm-run-all": "*", "rifraf": "~2.0.3" }, diff --git a/server/src/swagger.json b/server/src/swagger.json index 458e3b39..74d0cc27 100644 --- a/server/src/swagger.json +++ b/server/src/swagger.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "description": "This is the swagger interface for AnsibleForms.\r\nUse the `/auth/login` api with basic authentication to obtain a JWT token.\r\nThen use the access token, prefixed with the word '**Bearer**' to use all other api's.\r\nNote that the access token is limited in time. You can then either login again and get a new set of tokens or use the `/token` api and the refresh token to obtain a new set (preferred).", - "version": "5.0.4", + "version": "5.0.5", "title": "AnsibleForms", "contact": { "email": "info@ansibleforms.com" @@ -109,8 +109,8 @@ "schema": { "type": "object", "example": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXJuYW1lIjoiQWRtaW5pc3RyYXRvciIsInR5cGUiOiJsZGFwIiwicm9sZXMiOlsicHVibGljIiwiYWRtaW4iXX0sImlhdCI6MTYzODc4Nzk3OSwiZXhwIjoxNjM4Nzg5Nzc5fQ.7QA4n3JlPVuatTY7e1dKLQbB4PlW72Jkep_oRe9kevM", - "refreshtoken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXJuYW1lIjoiQWRtaW5pc3RyYXRvciIsInR5cGUiOiJsZGFwIiwicm9sZXMiOlsicHVibGljIiwiYWRtaW4iXX0sImlhdCI6MTYzODc4Nzk3OSwiZXhwIjoxNjM4ODc0Mzc5fQ.ku8-MOflGvdMNR7fZkGn28zSDaG4i2QClqOy4P35zYA" + "token": "**********************", + "refreshtoken": "***********************" } } } @@ -147,8 +147,8 @@ "schema": { "type": "object", "example": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXJuYW1lIjoiQWRtaW5pc3RyYXRvciIsInR5cGUiOiJsZGFwIiwicm9sZXMiOlsicHVibGljIiwiYWRtaW4iXX0sImlhdCI6MTYzODgwNjM3MCwiZXhwIjoxNjM4ODA4MTcwfQ.Q0dZCAVcVH6r7j_oUTzAoKp7OyR4kYi-NDxPB1v8-UA", - "refreshtoken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXJuYW1lIjoiQWRtaW5pc3RyYXRvciIsInR5cGUiOiJsZGFwIiwicm9sZXMiOlsicHVibGljIiwiYWRtaW4iXX0sImlhdCI6MTYzODgwNjM3MCwiZXhwIjoxNjM4ODkyNzcwfQ.ZIMquso87x8FD5XytyWDi-eMXr2OJBUeXfBGMwk5w04" + "token": "************************", + "refreshtoken": "**********************" } } } @@ -220,7 +220,7 @@ "properties": { "password": { "type": "string", - "example": "MyPassword01!" + "example": "************" } } } @@ -1581,7 +1581,7 @@ }, "bind_user_pw": { "type": "string", - "example": "MyPassword01!" + "example": "************" }, "username_attribute": { "type": "string", @@ -1671,7 +1671,7 @@ }, "bind_user_pw": { "type": "string", - "example": "MyPassword01!" + "example": "************" }, "username_attribute": { "type": "string", @@ -2038,7 +2038,7 @@ }, "password": { "type": "string", - "example": "MyPassword01!" + "example": "************" }, "description": { "type": "string", @@ -2113,7 +2113,7 @@ "id": 2, "name": "cmdb", "user": "root", - "password": "MySecretPassword01!", + "password": "************", "host": "172.16.50.1", "port": 3306, "description": "Mysql connection for cmdb" @@ -2162,7 +2162,7 @@ }, "password": { "type": "string", - "example": "MyPassword01!" + "example": "************" }, "host": { "type": "string", @@ -2383,7 +2383,7 @@ }, "password": { "type": "string", - "example": "MyPassword01!" + "example": "************" }, "group_id": { "type": "integer", @@ -2499,11 +2499,11 @@ "properties": { "password": { "type": "string", - "example": "MyPassword01!" + "example": "************" }, "password2": { "type": "string", - "example": "MyPassword01!" + "example": "************" }, "group_id": { "type": "integer",