@nzz/q-cli 2.0.0-beta.13 → 2.0.0-beta.14

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.
Files changed (2) hide show
  1. package/dist/updateItem.js +7 -17
  2. package/package.json +1 -1
@@ -146,31 +146,21 @@ export default function (command) {
146
146
  for (const item of qConfig.items) {
147
147
  for (const environment of item.environments) {
148
148
  // If the environment is specified, use that environment
149
- if (command.environment && !environmentToUpdate) {
149
+ if (command.environment) {
150
150
  // Skip if the environment is not the one we want to update
151
151
  if (command.environment !== environment.name)
152
152
  continue;
153
153
  environmentToUpdate = command.environment;
154
- // Get the credentials for the current environment
155
- const credentials = getEnvCredentials(environmentToUpdate);
156
- qServerUrl = credentials.qServerUrl;
157
- accessToken = credentials.accessToken;
158
- console.log(`Updating items on server ${qServerUrl}...`);
159
154
  }
160
- else if (!command.environment && environmentToUpdate !== environment.name) {
155
+ else {
161
156
  // Otherwise, use the environment from the config
162
157
  environmentToUpdate = environment.name;
163
- // Get the credentials for the current environment
164
- const credentials = getEnvCredentials(environmentToUpdate);
165
- qServerUrl = credentials.qServerUrl;
166
- accessToken = credentials.accessToken;
167
- console.log(`Updating items on server ${qServerUrl}...`);
168
- }
169
- else {
170
- // If the environment is not specified, skip the environment
171
- continue;
172
158
  }
173
- console.log(`Updating item ${environment.id} on ${environmentToUpdate} environment...`);
159
+ // Get the credentials for the current environment
160
+ const credentials = getEnvCredentials(environmentToUpdate);
161
+ qServerUrl = credentials.qServerUrl;
162
+ accessToken = credentials.accessToken;
163
+ console.log(`Updating item ${environment.id} on ${environmentToUpdate} environment (${qServerUrl})...`);
174
164
  let qDoc = structuredClone(item.item);
175
165
  qDoc._id = environment.id;
176
166
  // Process the 'path' properties and upload files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nzz/q-cli",
3
- "version": "2.0.0-beta.13",
3
+ "version": "2.0.0-beta.14",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",