@expo/steps
Advanced tools
Comparing version 1.0.83 to 1.0.84
@@ -45,2 +45,3 @@ import { bunyan } from '@expo/logger'; | ||
get value(): BuildStepInputValueTypeWithRequired<T, R>; | ||
private fixEscapeCharacters; | ||
get rawValue(): BuildStepInputValueType<T> | undefined; | ||
@@ -47,0 +48,0 @@ set(value: BuildStepInputValueType<T> | undefined): BuildStepInput; |
@@ -45,2 +45,3 @@ import { bunyan } from '@expo/logger'; | ||
get value(): BuildStepInputValueTypeWithRequired<T, R>; | ||
private fixEscapeCharacters; | ||
get rawValue(): BuildStepInputValueType<T> | undefined; | ||
@@ -47,0 +48,0 @@ set(value: BuildStepInputValueType<T> | undefined): BuildStepInput; |
@@ -32,2 +32,3 @@ import assert from 'assert'; | ||
const valueDoesNotRequireInterpolation = rawValue === undefined || typeof rawValue === 'boolean' || typeof rawValue === 'number'; | ||
let returnValue; | ||
if (valueDoesNotRequireInterpolation) { | ||
@@ -37,3 +38,3 @@ if (typeof rawValue !== this.allowedValueTypeName && rawValue !== undefined) { | ||
} | ||
return rawValue; | ||
returnValue = rawValue; | ||
} | ||
@@ -46,5 +47,20 @@ else { | ||
const valueInterpolatedWithOutputsAndGlobalContext = interpolateWithOutputs(valueInterpolatedWithGlobalContext, (path) => { var _a; return (_a = this.ctx.getStepOutputValue(path)) !== null && _a !== void 0 ? _a : ''; }); | ||
return this.parseInputValueToAllowedType(valueInterpolatedWithOutputsAndGlobalContext); | ||
returnValue = this.parseInputValueToAllowedType(valueInterpolatedWithOutputsAndGlobalContext); | ||
} | ||
return this.fixEscapeCharacters(returnValue); | ||
} | ||
fixEscapeCharacters(input) { | ||
if (typeof input === 'string') { | ||
return input.replace(/\\n/g, '\n'); | ||
} | ||
else if (typeof input === 'object') { | ||
for (const property of Object.keys(input)) { | ||
input[property] = this.fixEscapeCharacters(input[property]); | ||
} | ||
return input; | ||
} | ||
else { | ||
return input; | ||
} | ||
} | ||
get rawValue() { | ||
@@ -51,0 +67,0 @@ var _a; |
{ | ||
"name": "@expo/steps", | ||
"type": "module", | ||
"version": "1.0.83", | ||
"version": "1.0.84", | ||
"main": "./dist_commonjs/index.cjs", | ||
@@ -67,3 +67,3 @@ "types": "./dist_esm/index.d.ts", | ||
}, | ||
"gitHead": "add396785bf24e7d545654b193365b417dfc5af3" | ||
"gitHead": "c5c5eab3cbf708b552dcf0d84b702d00e15b53fe" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
612075
5267