added files to start parsing functionality of path variables
This commit is contained in:
@@ -9,7 +9,14 @@ export type Environment = {
|
||||
}[]
|
||||
}
|
||||
|
||||
export type Variables = {
|
||||
key: string
|
||||
value: string
|
||||
}[]
|
||||
|
||||
|
||||
const REGEX_ENV_VAR = /<<([^>]*)>>/g // "<<myVariable>>"
|
||||
const REGEX_PATHVAR = /{{([^>]*)}}/g // "{{myVariable}}"
|
||||
|
||||
/**
|
||||
* How much times can we expand environment variables
|
||||
@@ -59,9 +66,9 @@ export const parseBodyEnvVariables = (
|
||||
|
||||
export function parseTemplateStringE(
|
||||
str: string,
|
||||
variables: Environment["variables"]
|
||||
variables: Environment["variables"],
|
||||
) {
|
||||
if (!variables || !str) {
|
||||
if (!variables || !str ) {
|
||||
return E.right(str)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user