@ibm-cloud/cd-tools 1.15.9 → 1.15.10

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.
@@ -262,10 +262,7 @@ export async function importTerraform(token, apiKey, region, toolchainId, toolch
262
262
  if (propValue.startsWith(START_INDICATOR) && propValue.endsWith(END_INDICATOR)) {
263
263
  // skip substitution for jsonencode case, don't want to mangle it
264
264
  } else {
265
- if (propValue.includes('\n')) logger.warn(`Warning! Multi-line values for pipeline and trigger properties are not yet supported in the provider, newlines will be replaced with '\\\\n': "${k}"`, LOG_STAGES.import, true);
266
-
267
- // TODO: remove extra backslash in newline replacement once provider is updated
268
- newValue = newValue.replace(/\\/g, '\\\\').replace(/\n/g, '\\\\n').replace(/\r/g, '\\\\r').replace(/"/g, '\\"');
265
+ newValue = newValue.replace(/\\/g, '\\\\').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/"/g, '\\"');
269
266
  }
270
267
  newTfFileObj['resource'][key][k]['value'] = newValue;
271
268
  }
@@ -360,8 +360,7 @@ async function setupTerraformFiles(config) {
360
360
  if (thisValue.startsWith(START_INDICATOR) && thisValue.endsWith(END_INDICATOR)) {
361
361
  // skip newline substitution for jsonencode case, don't want to mangle it
362
362
  } else {
363
- // TODO: remove extra backslash in newline replacement once provider is updated
364
- newTfFileObj['resource']['ibm_cd_tekton_pipeline_property'][k]['value'] = thisValue.replace(/\\/g, '\\\\').replace(/\n/g, '\\\\n').replace(/\r/g, '\\\\r').replace(/"/g, '\\"');
363
+ newTfFileObj['resource']['ibm_cd_tekton_pipeline_property'][k]['value'] = thisValue.replace(/\\/g, '\\\\').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/"/g, '\\"');
365
364
  }
366
365
  }
367
366
  } catch (err) {
@@ -389,8 +388,7 @@ async function setupTerraformFiles(config) {
389
388
  if (thisValue.startsWith(START_INDICATOR) && thisValue.endsWith(END_INDICATOR)) {
390
389
  // skip newline substitution for jsonencode case, don't want to mangle it
391
390
  } else {
392
- // TODO: remove extra backslash in newline replacement once provider is updated
393
- newTfFileObj['resource']['ibm_cd_tekton_pipeline_trigger_property'][k]['value'] = thisValue.replace(/\\/g, '\\\\').replace(/\n/g, '\\\\n').replace(/\r/g, '\\\\r').replace(/"/g, '\\"');
391
+ newTfFileObj['resource']['ibm_cd_tekton_pipeline_trigger_property'][k]['value'] = thisValue.replace(/\\/g, '\\\\').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/"/g, '\\"');
394
392
  }
395
393
  }
396
394
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibm-cloud/cd-tools",
3
- "version": "1.15.9",
3
+ "version": "1.15.10",
4
4
  "description": "Tools and utilities for the IBM Cloud Continuous Delivery service and resources",
5
5
  "repository": {
6
6
  "type": "git",