@genesislcap/build-kit 14.209.2-alpha-b930c55.0 → 14.209.3-alpha-6a63026.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlebars.d.ts","sourceRoot":"","sources":["../../src/utils/handlebars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"handlebars.d.ts","sourceRoot":"","sources":["../../src/utils/handlebars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAmD5E,eAAO,MAAM,MAAM,sCAAyD,CAAC;AAE7E,eAAO,MAAM,UAAU,SACf,oBAAoB,QACpB,MAAM,iBACG,oBAAoB,SAKpC,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,MAAM,4BAG3C,CAAC"}
|
package/dist/utils/handlebars.js
CHANGED
|
@@ -34,6 +34,13 @@ handlebars_1.default.registerHelper('upperCase', (s) => s && s.toUpperCase());
|
|
|
34
34
|
handlebars_1.default.registerHelper('ifEquals', (arg1, arg2, options) => {
|
|
35
35
|
return arg1 === arg2 ? options.fn(this) : options.inverse(this);
|
|
36
36
|
});
|
|
37
|
+
handlebars_1.default.registerHelper('ifContains', (source, substrings, options) => {
|
|
38
|
+
if (!source || !substrings)
|
|
39
|
+
return options.inverse(this);
|
|
40
|
+
const substrArray = Array.isArray(substrings) ? substrings : [substrings];
|
|
41
|
+
const contains = substrArray.some((substring) => source.includes(substring));
|
|
42
|
+
return contains ? options.fn(this) : options.inverse(this);
|
|
43
|
+
});
|
|
37
44
|
const render = (template, data) => handlebars_1.default.compile(template)(data);
|
|
38
45
|
exports.render = render;
|
|
39
46
|
const renderFile = (file, data, templateFile) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/build-kit",
|
|
3
3
|
"description": "Build utilities & types",
|
|
4
|
-
"version": "14.209.
|
|
4
|
+
"version": "14.209.3-alpha-6a63026.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@esbuild-kit/cjs-loader": "2.4.2",
|
|
40
|
-
"@genesislcap/foundation-testing": "14.209.
|
|
40
|
+
"@genesislcap/foundation-testing": "14.209.3-alpha-6a63026.0",
|
|
41
41
|
"@types/http-proxy": "^1.17.8",
|
|
42
42
|
"@types/node": "^20.8.7",
|
|
43
43
|
"tsm": "^2.2.1",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "88c5ab1a05697d12dbe0201bd7c7884d8c3b1831"
|
|
56
56
|
}
|