From 109258db417ef2df4af3b3cb458ea7e6b841bb64 Mon Sep 17 00:00:00 2001 From: pimothyxd <29018740+pimothyxd@users.noreply.github.com> Date: Mon, 3 Jun 2024 04:10:22 +0200 Subject: [PATCH] fix: minor typo in interpolator (#7473) --- packages/insomnia-sdk/src/objects/environments.ts | 7 ++++--- packages/insomnia-sdk/src/objects/interpolator.ts | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/insomnia-sdk/src/objects/environments.ts b/packages/insomnia-sdk/src/objects/environments.ts index e0c74843f..12f827b82 100644 --- a/packages/insomnia-sdk/src/objects/environments.ts +++ b/packages/insomnia-sdk/src/objects/environments.ts @@ -1,4 +1,5 @@ -import { getIntepolator } from './interpolator'; +import { getInterpolator } from './interpolator'; + export class Environment { private _name: string; private kvs = new Map(); @@ -33,7 +34,7 @@ export class Environment { }; replaceIn = (template: string) => { - return getIntepolator().render(template, this.toObject()); + return getInterpolator().render(template, this.toObject()); }; toObject = () => { @@ -98,7 +99,7 @@ export class Variables { replaceIn = (template: string) => { const context = this.toObject(); - return getIntepolator().render(template, context); + return getInterpolator().render(template, context); }; toObject = () => { diff --git a/packages/insomnia-sdk/src/objects/interpolator.ts b/packages/insomnia-sdk/src/objects/interpolator.ts index a395889a1..450781395 100644 --- a/packages/insomnia-sdk/src/objects/interpolator.ts +++ b/packages/insomnia-sdk/src/objects/interpolator.ts @@ -1,7 +1,7 @@ import { fakerFunctions } from 'insomnia/src/ui/components/templating/faker-functions'; import { configure, type ConfigureOptions, type Environment as NunjuncksEnv } from 'nunjucks'; -class Intepolator { +class Interpolator { private engine: NunjuncksEnv; constructor(config: ConfigureOptions) { @@ -50,7 +50,7 @@ class Intepolator { }; } -const intepolator = new Intepolator({ +const interpolator = new Interpolator({ autoescape: false, // Don't escape HTML throwOnUndefined: true, @@ -65,6 +65,6 @@ const intepolator = new Intepolator({ }, }); -export function getIntepolator() { - return intepolator; +export function getInterpolator() { + return interpolator; }