Updating to use budibase helpers.
This commit is contained in:
parent
41fbc39618
commit
26b716c407
|
@ -13,7 +13,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"handlebars": "^4.7.6",
|
"handlebars": "^4.7.6",
|
||||||
"handlebars-helpers": "^0.10.0",
|
"@budibase/handlebars-helpers": "^0.11.0",
|
||||||
"handlebars-utils": "^1.0.6",
|
"handlebars-utils": "^1.0.6",
|
||||||
"helper-date": "^1.0.1",
|
"helper-date": "^1.0.1",
|
||||||
"lodash": "^4.17.20"
|
"lodash": "^4.17.20"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
const helpers = require("handlebars-helpers")
|
const helpers = require("@budibase/handlebars-helpers")
|
||||||
const dateHelper = require("helper-date")
|
const dateHelper = require("helper-date")
|
||||||
const { HelperFunctionBuiltin } = require("./constants")
|
const { HelperFunctionBuiltin } = require("./constants")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* full list of supported helpers can be found here:
|
* full list of supported helpers can be found here:
|
||||||
* https://github.com/helpers/handlebars-helpers
|
* https://github.com/Budibase/handlebars-helpers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const EXTERNAL_FUNCTION_COLLECTIONS = [
|
const EXTERNAL_FUNCTION_COLLECTIONS = [
|
||||||
|
|
|
@ -28,7 +28,7 @@ module.exports.removeNull = obj => {
|
||||||
|
|
||||||
module.exports.addConstants = obj => {
|
module.exports.addConstants = obj => {
|
||||||
if (obj.now == null) {
|
if (obj.now == null) {
|
||||||
obj.now = new Date().toISOString()
|
obj.now = new Date()
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,6 +270,39 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
|
"@budibase/handlebars-helpers@^0.11.0":
|
||||||
|
version "0.11.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.0.tgz#77c6616b250b47b0a6ed7026f7e2e1e3c8792c5c"
|
||||||
|
integrity sha512-JJFy5jWZT8i1hJ7wb2UOkT5ONnYgdbqyfl1WkLAPU1q+dT87il7YfT6s6DiOvzucj8CfVE2QSI6e8YnZhgHhBg==
|
||||||
|
dependencies:
|
||||||
|
arr-flatten "^1.1.0"
|
||||||
|
array-sort "^0.1.4"
|
||||||
|
create-frame "^1.0.0"
|
||||||
|
define-property "^1.0.0"
|
||||||
|
"falsey" "^0.3.2"
|
||||||
|
for-in "^1.0.2"
|
||||||
|
for-own "^1.0.0"
|
||||||
|
get-object "^0.2.0"
|
||||||
|
get-value "^2.0.6"
|
||||||
|
handlebars "^4.0.11"
|
||||||
|
handlebars-helper-create-frame "^0.1.0"
|
||||||
|
handlebars-utils "^1.0.6"
|
||||||
|
has-value "^1.0.0"
|
||||||
|
helper-date "^1.0.1"
|
||||||
|
helper-markdown "^1.0.0"
|
||||||
|
helper-md "^0.2.2"
|
||||||
|
html-tag "^2.0.0"
|
||||||
|
is-even "^1.0.0"
|
||||||
|
is-glob "^4.0.0"
|
||||||
|
is-number "^4.0.0"
|
||||||
|
kind-of "^6.0.0"
|
||||||
|
logging-helpers "^1.0.0"
|
||||||
|
micromatch "^3.1.4"
|
||||||
|
relative "^3.0.2"
|
||||||
|
striptags "^3.1.0"
|
||||||
|
to-gfm-code-block "^0.1.1"
|
||||||
|
year "^0.2.1"
|
||||||
|
|
||||||
"@cnakazawa/watch@^1.0.3":
|
"@cnakazawa/watch@^1.0.3":
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
|
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
|
||||||
|
@ -2125,40 +2158,6 @@ handlebars-helper-create-frame@^0.1.0:
|
||||||
create-frame "^1.0.0"
|
create-frame "^1.0.0"
|
||||||
isobject "^3.0.0"
|
isobject "^3.0.0"
|
||||||
|
|
||||||
handlebars-helpers@^0.10.0:
|
|
||||||
version "0.10.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/handlebars-helpers/-/handlebars-helpers-0.10.0.tgz#663d49e718928eafbead1473419ed7bc24bcd45a"
|
|
||||||
integrity sha512-QiyhQz58u/DbuV41VnfpE0nhy6YCH4vB514ajysV8SoKmP+DxU+pR+fahVyNECHj+jiwEN2VrvxD/34/yHaLUg==
|
|
||||||
dependencies:
|
|
||||||
arr-flatten "^1.1.0"
|
|
||||||
array-sort "^0.1.4"
|
|
||||||
create-frame "^1.0.0"
|
|
||||||
define-property "^1.0.0"
|
|
||||||
"falsey" "^0.3.2"
|
|
||||||
for-in "^1.0.2"
|
|
||||||
for-own "^1.0.0"
|
|
||||||
get-object "^0.2.0"
|
|
||||||
get-value "^2.0.6"
|
|
||||||
handlebars "^4.0.11"
|
|
||||||
handlebars-helper-create-frame "^0.1.0"
|
|
||||||
handlebars-utils "^1.0.6"
|
|
||||||
has-value "^1.0.0"
|
|
||||||
helper-date "^1.0.1"
|
|
||||||
helper-markdown "^1.0.0"
|
|
||||||
helper-md "^0.2.2"
|
|
||||||
html-tag "^2.0.0"
|
|
||||||
is-even "^1.0.0"
|
|
||||||
is-glob "^4.0.0"
|
|
||||||
is-number "^4.0.0"
|
|
||||||
kind-of "^6.0.0"
|
|
||||||
lazy-cache "^2.0.2"
|
|
||||||
logging-helpers "^1.0.0"
|
|
||||||
micromatch "^3.1.4"
|
|
||||||
relative "^3.0.2"
|
|
||||||
striptags "^3.1.0"
|
|
||||||
to-gfm-code-block "^0.1.1"
|
|
||||||
year "^0.2.1"
|
|
||||||
|
|
||||||
handlebars-utils@^1.0.2, handlebars-utils@^1.0.4, handlebars-utils@^1.0.6:
|
handlebars-utils@^1.0.2, handlebars-utils@^1.0.4, handlebars-utils@^1.0.6:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9"
|
resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9"
|
||||||
|
|
Loading…
Reference in New Issue