@tsed/cli-core 3.19.4 → 3.20.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.
- package/lib/index.js +82 -67
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +78 -65
- package/lib/index.modern.js.map +1 -1
- package/lib/utils/hbs/switch.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.modern.js
CHANGED
|
@@ -25,6 +25,7 @@ import chalk from 'chalk';
|
|
|
25
25
|
import url from 'url';
|
|
26
26
|
import Consolidate from 'consolidate';
|
|
27
27
|
import globby from 'globby';
|
|
28
|
+
import handlebars from 'handlebars';
|
|
28
29
|
import JsYaml from 'js-yaml';
|
|
29
30
|
import updateNotifier from 'update-notifier';
|
|
30
31
|
|
|
@@ -1836,7 +1837,7 @@ CliRunScript = __decorate([Injectable()], CliRunScript);
|
|
|
1836
1837
|
|
|
1837
1838
|
const util$3 = require("handlebars-utils");
|
|
1838
1839
|
|
|
1839
|
-
const helpers$
|
|
1840
|
+
const helpers$4 = {};
|
|
1840
1841
|
|
|
1841
1842
|
const contains = (val, obj, start) => {
|
|
1842
1843
|
if (val == null || obj == null || !isNumber(val.length)) {
|
|
@@ -1865,7 +1866,7 @@ const contains = (val, obj, start) => {
|
|
|
1865
1866
|
*/
|
|
1866
1867
|
|
|
1867
1868
|
|
|
1868
|
-
helpers$
|
|
1869
|
+
helpers$4.and = (...args) => {
|
|
1869
1870
|
const len = args.length - 1;
|
|
1870
1871
|
const options = args[len];
|
|
1871
1872
|
let val = true;
|
|
@@ -1895,7 +1896,7 @@ helpers$3.and = (...args) => {
|
|
|
1895
1896
|
*/
|
|
1896
1897
|
|
|
1897
1898
|
|
|
1898
|
-
helpers$
|
|
1899
|
+
helpers$4.compare = function (a, operator, b, options) {
|
|
1899
1900
|
/*eslint eqeqeq: 0*/
|
|
1900
1901
|
if (arguments.length < 4) {
|
|
1901
1902
|
throw new Error("handlebars Helper {{compare}} expects 4 arguments");
|
|
@@ -1972,7 +1973,7 @@ helpers$3.compare = function (a, operator, b, options) {
|
|
|
1972
1973
|
*/
|
|
1973
1974
|
|
|
1974
1975
|
|
|
1975
|
-
helpers$
|
|
1976
|
+
helpers$4.contains = function (collection, value, startIndex, options) {
|
|
1976
1977
|
if (typeof startIndex === "object") {
|
|
1977
1978
|
options = startIndex;
|
|
1978
1979
|
startIndex = undefined;
|
|
@@ -1992,7 +1993,7 @@ helpers$3.contains = function (collection, value, startIndex, options) {
|
|
|
1992
1993
|
*/
|
|
1993
1994
|
|
|
1994
1995
|
|
|
1995
|
-
helpers$
|
|
1996
|
+
helpers$4.default = (...args) => {
|
|
1996
1997
|
for (let i = 0; i < args.length - 1; i++) {
|
|
1997
1998
|
if (args[i] != null) return args[i];
|
|
1998
1999
|
}
|
|
@@ -2015,7 +2016,7 @@ helpers$3.default = (...args) => {
|
|
|
2015
2016
|
*/
|
|
2016
2017
|
|
|
2017
2018
|
|
|
2018
|
-
helpers$
|
|
2019
|
+
helpers$4.eq = function (a, b, options) {
|
|
2019
2020
|
if (arguments.length === 2) {
|
|
2020
2021
|
options = b;
|
|
2021
2022
|
b = options.hash.compare;
|
|
@@ -2039,7 +2040,7 @@ helpers$3.eq = function (a, b, options) {
|
|
|
2039
2040
|
*/
|
|
2040
2041
|
|
|
2041
2042
|
|
|
2042
|
-
helpers$
|
|
2043
|
+
helpers$4.gt = function (a, b, options) {
|
|
2043
2044
|
if (arguments.length === 2) {
|
|
2044
2045
|
options = b;
|
|
2045
2046
|
b = options.hash.compare;
|
|
@@ -2064,7 +2065,7 @@ helpers$3.gt = function (a, b, options) {
|
|
|
2064
2065
|
*/
|
|
2065
2066
|
|
|
2066
2067
|
|
|
2067
|
-
helpers$
|
|
2068
|
+
helpers$4.gte = function (a, b, options) {
|
|
2068
2069
|
if (arguments.length === 2) {
|
|
2069
2070
|
options = b;
|
|
2070
2071
|
b = options.hash.compare;
|
|
@@ -2086,7 +2087,7 @@ helpers$3.gte = function (a, b, options) {
|
|
|
2086
2087
|
*/
|
|
2087
2088
|
|
|
2088
2089
|
|
|
2089
|
-
helpers$
|
|
2090
|
+
helpers$4.is = function (a, b, options) {
|
|
2090
2091
|
if (arguments.length === 2) {
|
|
2091
2092
|
options = b;
|
|
2092
2093
|
b = options.hash.compare;
|
|
@@ -2109,7 +2110,7 @@ helpers$3.is = function (a, b, options) {
|
|
|
2109
2110
|
*/
|
|
2110
2111
|
|
|
2111
2112
|
|
|
2112
|
-
helpers$
|
|
2113
|
+
helpers$4.isnt = function (a, b, options) {
|
|
2113
2114
|
if (arguments.length === 2) {
|
|
2114
2115
|
options = b;
|
|
2115
2116
|
b = options.hash.compare;
|
|
@@ -2132,7 +2133,7 @@ helpers$3.isnt = function (a, b, options) {
|
|
|
2132
2133
|
*/
|
|
2133
2134
|
|
|
2134
2135
|
|
|
2135
|
-
helpers$
|
|
2136
|
+
helpers$4.lt = function (a, b, options) {
|
|
2136
2137
|
if (arguments.length === 2) {
|
|
2137
2138
|
options = b;
|
|
2138
2139
|
b = options.hash.compare;
|
|
@@ -2157,7 +2158,7 @@ helpers$3.lt = function (a, b, options) {
|
|
|
2157
2158
|
*/
|
|
2158
2159
|
|
|
2159
2160
|
|
|
2160
|
-
helpers$
|
|
2161
|
+
helpers$4.lte = function (a, b, options) {
|
|
2161
2162
|
if (arguments.length === 2) {
|
|
2162
2163
|
options = b;
|
|
2163
2164
|
b = options.hash.compare;
|
|
@@ -2179,7 +2180,7 @@ helpers$3.lte = function (a, b, options) {
|
|
|
2179
2180
|
*/
|
|
2180
2181
|
|
|
2181
2182
|
|
|
2182
|
-
helpers$
|
|
2183
|
+
helpers$4.neither = function (a, b, options) {
|
|
2183
2184
|
return util$3.value(!a && !b, this, options);
|
|
2184
2185
|
};
|
|
2185
2186
|
/**
|
|
@@ -2193,7 +2194,7 @@ helpers$3.neither = function (a, b, options) {
|
|
|
2193
2194
|
*/
|
|
2194
2195
|
|
|
2195
2196
|
|
|
2196
|
-
helpers$
|
|
2197
|
+
helpers$4.not = function (val, options) {
|
|
2197
2198
|
return util$3.value(!val, this, options);
|
|
2198
2199
|
};
|
|
2199
2200
|
/**
|
|
@@ -2215,7 +2216,7 @@ helpers$3.not = function (val, options) {
|
|
|
2215
2216
|
*/
|
|
2216
2217
|
|
|
2217
2218
|
|
|
2218
|
-
helpers$
|
|
2219
|
+
helpers$4.or = function (...args) {
|
|
2219
2220
|
const len = args.length - 1;
|
|
2220
2221
|
const options = args[len];
|
|
2221
2222
|
let val = false;
|
|
@@ -2242,7 +2243,7 @@ helpers$3.or = function (...args) {
|
|
|
2242
2243
|
*/
|
|
2243
2244
|
|
|
2244
2245
|
|
|
2245
|
-
helpers$
|
|
2246
|
+
helpers$4.unlessEq = function (a, b, options) {
|
|
2246
2247
|
if (util$3.isOptions(b)) {
|
|
2247
2248
|
options = b;
|
|
2248
2249
|
b = options.hash.compare;
|
|
@@ -2263,7 +2264,7 @@ helpers$3.unlessEq = function (a, b, options) {
|
|
|
2263
2264
|
*/
|
|
2264
2265
|
|
|
2265
2266
|
|
|
2266
|
-
helpers$
|
|
2267
|
+
helpers$4.unlessGt = function (a, b, options) {
|
|
2267
2268
|
if (util$3.isOptions(b)) {
|
|
2268
2269
|
options = b;
|
|
2269
2270
|
b = options.hash.compare;
|
|
@@ -2284,7 +2285,7 @@ helpers$3.unlessGt = function (a, b, options) {
|
|
|
2284
2285
|
*/
|
|
2285
2286
|
|
|
2286
2287
|
|
|
2287
|
-
helpers$
|
|
2288
|
+
helpers$4.unlessLt = function (a, b, options) {
|
|
2288
2289
|
if (util$3.isOptions(b)) {
|
|
2289
2290
|
options = b;
|
|
2290
2291
|
b = options.hash.compare;
|
|
@@ -2305,7 +2306,7 @@ helpers$3.unlessLt = function (a, b, options) {
|
|
|
2305
2306
|
*/
|
|
2306
2307
|
|
|
2307
2308
|
|
|
2308
|
-
helpers$
|
|
2309
|
+
helpers$4.unlessGteq = function (a, b, options) {
|
|
2309
2310
|
if (util$3.isOptions(b)) {
|
|
2310
2311
|
options = b;
|
|
2311
2312
|
b = options.hash.compare;
|
|
@@ -2326,7 +2327,7 @@ helpers$3.unlessGteq = function (a, b, options) {
|
|
|
2326
2327
|
*/
|
|
2327
2328
|
|
|
2328
2329
|
|
|
2329
|
-
helpers$
|
|
2330
|
+
helpers$4.unlessLteq = function (a, b, options) {
|
|
2330
2331
|
if (util$3.isOptions(b)) {
|
|
2331
2332
|
options = b;
|
|
2332
2333
|
b = options.hash.compare;
|
|
@@ -2339,7 +2340,7 @@ const createFrame$1 = require("create-frame");
|
|
|
2339
2340
|
|
|
2340
2341
|
const util$2 = require("handlebars-utils");
|
|
2341
2342
|
|
|
2342
|
-
const helpers$
|
|
2343
|
+
const helpers$3 = {};
|
|
2343
2344
|
/**
|
|
2344
2345
|
* Returns all of the items in an array after the specified index.
|
|
2345
2346
|
* Opposite of [before](#before).
|
|
@@ -2355,7 +2356,7 @@ const helpers$2 = {};
|
|
|
2355
2356
|
* @api public
|
|
2356
2357
|
*/
|
|
2357
2358
|
|
|
2358
|
-
helpers$
|
|
2359
|
+
helpers$3.after = function (array, n) {
|
|
2359
2360
|
if (util$2.isUndefined(array)) return "";
|
|
2360
2361
|
return array.slice(n);
|
|
2361
2362
|
};
|
|
@@ -2372,7 +2373,7 @@ helpers$2.after = function (array, n) {
|
|
|
2372
2373
|
*/
|
|
2373
2374
|
|
|
2374
2375
|
|
|
2375
|
-
helpers$
|
|
2376
|
+
helpers$3.arrayify = function (value) {
|
|
2376
2377
|
return value ? isArray(value) ? value : [value] : [];
|
|
2377
2378
|
};
|
|
2378
2379
|
/**
|
|
@@ -2391,7 +2392,7 @@ helpers$2.arrayify = function (value) {
|
|
|
2391
2392
|
*/
|
|
2392
2393
|
|
|
2393
2394
|
|
|
2394
|
-
helpers$
|
|
2395
|
+
helpers$3.before = function (array, n) {
|
|
2395
2396
|
if (util$2.isUndefined(array)) return "";
|
|
2396
2397
|
return array.slice(0, -n);
|
|
2397
2398
|
};
|
|
@@ -2410,7 +2411,7 @@ helpers$2.before = function (array, n) {
|
|
|
2410
2411
|
*/
|
|
2411
2412
|
|
|
2412
2413
|
|
|
2413
|
-
helpers$
|
|
2414
|
+
helpers$3.eachIndex = function (array, options) {
|
|
2414
2415
|
let result = "";
|
|
2415
2416
|
|
|
2416
2417
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -2440,7 +2441,7 @@ helpers$2.eachIndex = function (array, options) {
|
|
|
2440
2441
|
*/
|
|
2441
2442
|
|
|
2442
2443
|
|
|
2443
|
-
helpers$
|
|
2444
|
+
helpers$3.filter = function (array, value, options) {
|
|
2444
2445
|
let content = "";
|
|
2445
2446
|
let results = []; // filter on a specific property
|
|
2446
2447
|
|
|
@@ -2481,7 +2482,7 @@ helpers$2.filter = function (array, value, options) {
|
|
|
2481
2482
|
*/
|
|
2482
2483
|
|
|
2483
2484
|
|
|
2484
|
-
helpers$
|
|
2485
|
+
helpers$3.first = function (array, n) {
|
|
2485
2486
|
if (array === undefined) return "";
|
|
2486
2487
|
|
|
2487
2488
|
if (!isNumber(n)) {
|
|
@@ -2525,7 +2526,7 @@ helpers$2.first = function (array, n) {
|
|
|
2525
2526
|
*/
|
|
2526
2527
|
|
|
2527
2528
|
|
|
2528
|
-
helpers$
|
|
2529
|
+
helpers$3.forEach = function (array, options) {
|
|
2529
2530
|
const data = createFrame$1(options, options.hash);
|
|
2530
2531
|
const len = array.length;
|
|
2531
2532
|
let buffer = "";
|
|
@@ -2568,7 +2569,7 @@ helpers$2.forEach = function (array, options) {
|
|
|
2568
2569
|
*/
|
|
2569
2570
|
|
|
2570
2571
|
|
|
2571
|
-
helpers$
|
|
2572
|
+
helpers$3.inArray = function (array, value, options) {
|
|
2572
2573
|
return util$2.value(util$2.indexOf(array, value) > -1, this, options);
|
|
2573
2574
|
};
|
|
2574
2575
|
/**
|
|
@@ -2588,7 +2589,7 @@ helpers$2.inArray = function (array, value, options) {
|
|
|
2588
2589
|
*/
|
|
2589
2590
|
|
|
2590
2591
|
|
|
2591
|
-
helpers$
|
|
2592
|
+
helpers$3.isArray = function (value) {
|
|
2592
2593
|
return Array.isArray(value);
|
|
2593
2594
|
};
|
|
2594
2595
|
/**
|
|
@@ -2607,7 +2608,7 @@ helpers$2.isArray = function (value) {
|
|
|
2607
2608
|
*/
|
|
2608
2609
|
|
|
2609
2610
|
|
|
2610
|
-
helpers$
|
|
2611
|
+
helpers$3.itemAt = function (array, idx) {
|
|
2611
2612
|
array = util$2.result(array);
|
|
2612
2613
|
|
|
2613
2614
|
if (isArray(array)) {
|
|
@@ -2641,7 +2642,7 @@ helpers$2.itemAt = function (array, idx) {
|
|
|
2641
2642
|
*/
|
|
2642
2643
|
|
|
2643
2644
|
|
|
2644
|
-
helpers$
|
|
2645
|
+
helpers$3.join = function (array, separator) {
|
|
2645
2646
|
if (isString(array)) return array;
|
|
2646
2647
|
if (!isArray(array)) return "";
|
|
2647
2648
|
separator = util$2.isString(separator) ? separator : ", ";
|
|
@@ -2660,7 +2661,7 @@ helpers$2.join = function (array, separator) {
|
|
|
2660
2661
|
*/
|
|
2661
2662
|
|
|
2662
2663
|
|
|
2663
|
-
helpers$
|
|
2664
|
+
helpers$3.equalsLength = function (value, length, options) {
|
|
2664
2665
|
if (util$2.isOptions(length)) {
|
|
2665
2666
|
options = length;
|
|
2666
2667
|
length = 0;
|
|
@@ -2697,7 +2698,7 @@ helpers$2.equalsLength = function (value, length, options) {
|
|
|
2697
2698
|
*/
|
|
2698
2699
|
|
|
2699
2700
|
|
|
2700
|
-
helpers$
|
|
2701
|
+
helpers$3.last = function (value, n) {
|
|
2701
2702
|
if (!isArray(value) && typeof value !== "string") {
|
|
2702
2703
|
return "";
|
|
2703
2704
|
}
|
|
@@ -2729,7 +2730,7 @@ helpers$2.last = function (value, n) {
|
|
|
2729
2730
|
*/
|
|
2730
2731
|
|
|
2731
2732
|
|
|
2732
|
-
helpers$
|
|
2733
|
+
helpers$3.length = function (value) {
|
|
2733
2734
|
if (isObject(value) && !util$2.isOptions(value)) {
|
|
2734
2735
|
value = Object.keys(value);
|
|
2735
2736
|
}
|
|
@@ -2758,7 +2759,7 @@ helpers$2.length = function (value) {
|
|
|
2758
2759
|
*/
|
|
2759
2760
|
|
|
2760
2761
|
|
|
2761
|
-
helpers$
|
|
2762
|
+
helpers$3.map = function (array, iter) {
|
|
2762
2763
|
if (!Array.isArray(array)) return "";
|
|
2763
2764
|
const len = array.length;
|
|
2764
2765
|
const res = new Array(len);
|
|
@@ -2790,7 +2791,7 @@ helpers$2.map = function (array, iter) {
|
|
|
2790
2791
|
*/
|
|
2791
2792
|
|
|
2792
2793
|
|
|
2793
|
-
helpers$
|
|
2794
|
+
helpers$3.pluck = function (arr, prop) {
|
|
2794
2795
|
if (util$2.isUndefined(arr)) return "";
|
|
2795
2796
|
const res = [];
|
|
2796
2797
|
|
|
@@ -2821,7 +2822,7 @@ helpers$2.pluck = function (arr, prop) {
|
|
|
2821
2822
|
*/
|
|
2822
2823
|
|
|
2823
2824
|
|
|
2824
|
-
helpers$
|
|
2825
|
+
helpers$3.reverse = function (val) {
|
|
2825
2826
|
if (Array.isArray(val)) {
|
|
2826
2827
|
val.reverse();
|
|
2827
2828
|
return val;
|
|
@@ -2853,7 +2854,7 @@ helpers$2.reverse = function (val) {
|
|
|
2853
2854
|
*/
|
|
2854
2855
|
|
|
2855
2856
|
|
|
2856
|
-
helpers$
|
|
2857
|
+
helpers$3.some = function (array, iter, options) {
|
|
2857
2858
|
if (Array.isArray(array)) {
|
|
2858
2859
|
for (let i = 0; i < array.length; i++) {
|
|
2859
2860
|
if (iter(array[i], i, array)) {
|
|
@@ -2882,7 +2883,7 @@ helpers$2.some = function (array, iter, options) {
|
|
|
2882
2883
|
*/
|
|
2883
2884
|
|
|
2884
2885
|
|
|
2885
|
-
helpers$
|
|
2886
|
+
helpers$3.sort = function (array, options) {
|
|
2886
2887
|
if (!Array.isArray(array)) return "";
|
|
2887
2888
|
|
|
2888
2889
|
if (getValue(options, "hash.reverse")) {
|
|
@@ -2907,7 +2908,7 @@ helpers$2.sort = function (array, options) {
|
|
|
2907
2908
|
*/
|
|
2908
2909
|
|
|
2909
2910
|
|
|
2910
|
-
helpers$
|
|
2911
|
+
helpers$3.unique = function (array) {
|
|
2911
2912
|
if (util$2.isUndefined(array)) return "";
|
|
2912
2913
|
return array.filter(function (item, index, arr) {
|
|
2913
2914
|
return arr.indexOf(item) === index;
|
|
@@ -2920,7 +2921,7 @@ const util$1 = require("handlebars-utils");
|
|
|
2920
2921
|
|
|
2921
2922
|
const createFrame = require("create-frame");
|
|
2922
2923
|
|
|
2923
|
-
const helpers$
|
|
2924
|
+
const helpers$2 = {};
|
|
2924
2925
|
/**
|
|
2925
2926
|
* Extend the context with the properties of other objects.
|
|
2926
2927
|
* A shallow merge is performed to avoid mutating the context.
|
|
@@ -2930,7 +2931,7 @@ const helpers$1 = {};
|
|
|
2930
2931
|
* @api public
|
|
2931
2932
|
*/
|
|
2932
2933
|
|
|
2933
|
-
helpers$
|
|
2934
|
+
helpers$2.extend = function ()
|
|
2934
2935
|
/*objects*/
|
|
2935
2936
|
{
|
|
2936
2937
|
// eslint-disable-next-line prefer-rest-params
|
|
@@ -2973,7 +2974,7 @@ helpers$1.extend = function ()
|
|
|
2973
2974
|
*/
|
|
2974
2975
|
|
|
2975
2976
|
|
|
2976
|
-
helpers$
|
|
2977
|
+
helpers$2.forIn = function (obj, options) {
|
|
2977
2978
|
if (!util$1.isOptions(options)) {
|
|
2978
2979
|
return obj.inverse(this);
|
|
2979
2980
|
}
|
|
@@ -3002,7 +3003,7 @@ helpers$1.forIn = function (obj, options) {
|
|
|
3002
3003
|
*/
|
|
3003
3004
|
|
|
3004
3005
|
|
|
3005
|
-
helpers$
|
|
3006
|
+
helpers$2.forOwn = function (obj, options) {
|
|
3006
3007
|
if (!util$1.isOptions(options)) {
|
|
3007
3008
|
return obj.inverse(this);
|
|
3008
3009
|
}
|
|
@@ -3030,7 +3031,7 @@ helpers$1.forOwn = function (obj, options) {
|
|
|
3030
3031
|
*/
|
|
3031
3032
|
|
|
3032
3033
|
|
|
3033
|
-
helpers$
|
|
3034
|
+
helpers$2.toPath = function (...args) {
|
|
3034
3035
|
const prop = [];
|
|
3035
3036
|
|
|
3036
3037
|
for (let i = 0; i < arguments.length; i++) {
|
|
@@ -3054,7 +3055,7 @@ helpers$1.toPath = function (...args) {
|
|
|
3054
3055
|
*/
|
|
3055
3056
|
|
|
3056
3057
|
|
|
3057
|
-
helpers$
|
|
3058
|
+
helpers$2.get = function (prop, context, options) {
|
|
3058
3059
|
const val = getValue(context, prop);
|
|
3059
3060
|
|
|
3060
3061
|
if (options && options.fn) {
|
|
@@ -3078,7 +3079,7 @@ helpers$1.get = function (prop, context, options) {
|
|
|
3078
3079
|
*/
|
|
3079
3080
|
|
|
3080
3081
|
|
|
3081
|
-
helpers$
|
|
3082
|
+
helpers$2.hasOwn = function (context, key) {
|
|
3082
3083
|
return hasOwn.call(context, key);
|
|
3083
3084
|
};
|
|
3084
3085
|
/**
|
|
@@ -3094,7 +3095,7 @@ helpers$1.hasOwn = function (context, key) {
|
|
|
3094
3095
|
*/
|
|
3095
3096
|
|
|
3096
3097
|
|
|
3097
|
-
helpers$
|
|
3098
|
+
helpers$2.isObject = isObject;
|
|
3098
3099
|
/**
|
|
3099
3100
|
* Parses the given string using `JSON.parse`.
|
|
3100
3101
|
*
|
|
@@ -3109,7 +3110,7 @@ helpers$1.isObject = isObject;
|
|
|
3109
3110
|
* @api public
|
|
3110
3111
|
*/
|
|
3111
3112
|
|
|
3112
|
-
helpers$
|
|
3113
|
+
helpers$2.JSONparse = function (str) {
|
|
3113
3114
|
return JSON.parse(str);
|
|
3114
3115
|
};
|
|
3115
3116
|
/**
|
|
@@ -3126,7 +3127,7 @@ helpers$1.JSONparse = function (str) {
|
|
|
3126
3127
|
*/
|
|
3127
3128
|
|
|
3128
3129
|
|
|
3129
|
-
helpers$
|
|
3130
|
+
helpers$2.JSONstringify = function (obj, indent) {
|
|
3130
3131
|
if (!isNumber(indent)) {
|
|
3131
3132
|
indent = 0;
|
|
3132
3133
|
}
|
|
@@ -3144,7 +3145,7 @@ helpers$1.JSONstringify = function (obj, indent) {
|
|
|
3144
3145
|
*/
|
|
3145
3146
|
|
|
3146
3147
|
|
|
3147
|
-
helpers$
|
|
3148
|
+
helpers$2.merge = function (...args1) {
|
|
3148
3149
|
// eslint-disable-next-line prefer-rest-params
|
|
3149
3150
|
const args = [].slice.call(args1);
|
|
3150
3151
|
let opts = {};
|
|
@@ -3164,7 +3165,7 @@ helpers$1.merge = function (...args1) {
|
|
|
3164
3165
|
*/
|
|
3165
3166
|
|
|
3166
3167
|
|
|
3167
|
-
helpers$
|
|
3168
|
+
helpers$2.parseJSON = helpers$2.JSONparse;
|
|
3168
3169
|
/**
|
|
3169
3170
|
* Pick properties from the context object.
|
|
3170
3171
|
*
|
|
@@ -3176,14 +3177,14 @@ helpers$1.parseJSON = helpers$1.JSONparse;
|
|
|
3176
3177
|
* @api public
|
|
3177
3178
|
*/
|
|
3178
3179
|
|
|
3179
|
-
helpers$
|
|
3180
|
-
const keys = helpers$
|
|
3180
|
+
helpers$2.pick = function (props, context, options) {
|
|
3181
|
+
const keys = helpers$3.arrayify(props);
|
|
3181
3182
|
const len = keys.length;
|
|
3182
3183
|
let i = -1;
|
|
3183
3184
|
let result = {};
|
|
3184
3185
|
|
|
3185
3186
|
while (++i < len) {
|
|
3186
|
-
result = helpers$
|
|
3187
|
+
result = helpers$2.extend({}, result, getValue(context, keys[i]));
|
|
3187
3188
|
}
|
|
3188
3189
|
|
|
3189
3190
|
if (options.fn) {
|
|
@@ -3202,12 +3203,12 @@ helpers$1.pick = function (props, context, options) {
|
|
|
3202
3203
|
*/
|
|
3203
3204
|
|
|
3204
3205
|
|
|
3205
|
-
helpers$
|
|
3206
|
+
helpers$2.stringify = helpers$2.JSONstringify;
|
|
3206
3207
|
|
|
3207
3208
|
const util = require("handlebars-utils");
|
|
3208
|
-
const forEach = helpers$
|
|
3209
|
-
const forOwn = helpers$
|
|
3210
|
-
const helpers = {};
|
|
3209
|
+
const forEach = helpers$3.forEach;
|
|
3210
|
+
const forOwn = helpers$2.forOwn;
|
|
3211
|
+
const helpers$1 = {};
|
|
3211
3212
|
/**
|
|
3212
3213
|
* Inline, subexpression, or block helper that returns true (or the block)
|
|
3213
3214
|
* if the given collection is empty, or false (or the inverse block, if
|
|
@@ -3229,7 +3230,7 @@ const helpers = {};
|
|
|
3229
3230
|
* @api public
|
|
3230
3231
|
*/
|
|
3231
3232
|
|
|
3232
|
-
helpers.isEmpty = function (collection, options) {
|
|
3233
|
+
helpers$1.isEmpty = function (collection, options) {
|
|
3233
3234
|
if (!util.isOptions(options)) {
|
|
3234
3235
|
options = collection;
|
|
3235
3236
|
return util.fn(true, this, options);
|
|
@@ -3257,7 +3258,7 @@ helpers.isEmpty = function (collection, options) {
|
|
|
3257
3258
|
*/
|
|
3258
3259
|
|
|
3259
3260
|
|
|
3260
|
-
helpers.iterate = function (collection, options) {
|
|
3261
|
+
helpers$1.iterate = function (collection, options) {
|
|
3261
3262
|
if (Array.isArray(collection)) {
|
|
3262
3263
|
return forEach.apply(null, [collection, options]);
|
|
3263
3264
|
}
|
|
@@ -3269,12 +3270,24 @@ helpers.iterate = function (collection, options) {
|
|
|
3269
3270
|
return options.inverse(this);
|
|
3270
3271
|
};
|
|
3271
3272
|
|
|
3272
|
-
const
|
|
3273
|
+
const helpers = {};
|
|
3273
3274
|
|
|
3275
|
+
helpers.switch = function (value, options) {
|
|
3276
|
+
this.switch_value = value;
|
|
3277
|
+
return options.fn(this);
|
|
3278
|
+
};
|
|
3279
|
+
|
|
3280
|
+
helpers.case = function (value, options) {
|
|
3281
|
+
if (value == this.switch_value) {
|
|
3282
|
+
return options.fn(this);
|
|
3283
|
+
}
|
|
3284
|
+
};
|
|
3285
|
+
|
|
3286
|
+
handlebars.registerHelper(helpers$3);
|
|
3274
3287
|
handlebars.registerHelper(helpers$2);
|
|
3275
3288
|
handlebars.registerHelper(helpers$1);
|
|
3289
|
+
handlebars.registerHelper(helpers$4);
|
|
3276
3290
|
handlebars.registerHelper(helpers);
|
|
3277
|
-
handlebars.registerHelper(helpers$3);
|
|
3278
3291
|
|
|
3279
3292
|
function insertImport(fileContent, content) {
|
|
3280
3293
|
const lines = fileContent.split("\n");
|
|
@@ -3736,5 +3749,5 @@ Command$1.prototype.helpInformation = function help() {
|
|
|
3736
3749
|
return "\n" + str.replace("Usage:", chalk.green("Usage:")).replace("Options:", chalk.green("Options:")).replace(/<(\w+)>/gi, `<${chalk.yellow("$1")}>`).replace(/\[(\w+)]/gi, `[${chalk.cyan("$1")}]`) + "\n";
|
|
3737
3750
|
};
|
|
3738
3751
|
|
|
3739
|
-
export { CliConfiguration, CliCore, CliDockerComposeYaml, CliExeca, CliFs, CliHttpClient, CliPackageJson, CliPlugins, CliRunScript, CliService, CliYaml, Command, NpmRegistryClient, OnAdd, OnExec, OnPostInstall, OnPrompt, PackageManager, ProjectPackageJson, Renderer, RootRendererService, SCOPE_SEPARATOR, ScriptsRendererService, SrcRendererService, addSuffix, createInjector, createSubTasks, createTasks, createTasksRunner, getCommandMetadata, getLogger, loadPlugins, logToCurl, mapCommanderArgs, mapCommanderOptions, normalizePath$1 as normalizePath, parseOption };
|
|
3752
|
+
export { CliConfiguration, CliCore, CliDockerComposeYaml, CliExeca, CliFs, CliHttpClient, CliPackageJson, CliPlugins, CliRunScript, CliService, CliYaml, Command, NpmRegistryClient, OnAdd, OnExec, OnPostInstall, OnPrompt, PackageManager, ProjectPackageJson, Renderer, RootRendererService, SCOPE_SEPARATOR, ScriptsRendererService, SrcRendererService, addSuffix, createInjector, createSubTasks, createTasks, createTasksRunner, getCommandMetadata, getLogger, getPackageJson, loadPlugins, logToCurl, mapCommanderArgs, mapCommanderOptions, normalizePath$1 as normalizePath, parseOption };
|
|
3740
3753
|
//# sourceMappingURL=index.modern.js.map
|