zcatalyst-cli 1.15.1 → 1.15.2
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/commands/init.js
CHANGED
|
@@ -130,7 +130,7 @@ exports.default = new command_1.default('init [feature]')
|
|
|
130
130
|
return saveAndComplete(config);
|
|
131
131
|
}
|
|
132
132
|
if (typeof feature === 'string') {
|
|
133
|
-
featureAns.features = feature;
|
|
133
|
+
featureAns.features = [feature];
|
|
134
134
|
}
|
|
135
135
|
runtime_store_1.default.set('context.features', featureAns.features);
|
|
136
136
|
yield (yield Promise.resolve().then(() => __importStar(require('../init')))).default();
|
|
@@ -253,11 +253,13 @@ function refineTargets(rawTargets, mapRemoteFn = true) {
|
|
|
253
253
|
}
|
|
254
254
|
exports.refineTargets = refineTargets;
|
|
255
255
|
function refineEnvVariables(vars) {
|
|
256
|
-
return
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
return !vars
|
|
257
|
+
? undefined
|
|
258
|
+
: Object.entries(vars).reduce((envObj, curEntry) => {
|
|
259
|
+
envObj[curEntry[0]] =
|
|
260
|
+
typeof curEntry[1] === 'object' ? JSON.stringify(curEntry[1]) : curEntry[1];
|
|
261
|
+
return envObj;
|
|
262
|
+
}, {});
|
|
261
263
|
}
|
|
262
264
|
function executeHook({ prefix, command }) {
|
|
263
265
|
if ((0, option_1.getOptionValue)('ignoreScripts', false)) {
|