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.
@@ -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 Object.entries(vars || {}).reduce((envObj, curEntry) => {
257
- envObj[curEntry[0]] =
258
- typeof curEntry[1] === 'object' ? JSON.stringify(curEntry[1]) : curEntry[1];
259
- return envObj;
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)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcatalyst-cli",
3
- "version": "1.15.1",
3
+ "version": "1.15.2",
4
4
  "description": "Command Line Tool for CATALYST",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {