diff --git a/src/if-run/builtins/coefficient/index.ts b/src/if-run/builtins/coefficient/index.ts index 289b4d7be..0a002f67a 100644 --- a/src/if-run/builtins/coefficient/index.ts +++ b/src/if-run/builtins/coefficient/index.ts @@ -1,5 +1,9 @@ import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { CoefficientConfig, ExecutePlugin, @@ -9,10 +13,6 @@ import { } from '@grnsft/if-core/types'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/copy-param/index.ts b/src/if-run/builtins/copy-param/index.ts index 2128cff7d..fec1fd850 100644 --- a/src/if-run/builtins/copy-param/index.ts +++ b/src/if-run/builtins/copy-param/index.ts @@ -1,5 +1,9 @@ import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ConfigParams, ExecutePlugin, @@ -11,10 +15,6 @@ import { import {validate} from '../../../common/util/validations'; import {STRINGS} from '../../config'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; const {MISSING_CONFIG} = STRINGS; const {ConfigError} = ERRORS; diff --git a/src/if-run/builtins/csv-lookup/index.ts b/src/if-run/builtins/csv-lookup/index.ts index 373cbdeb0..f66981b97 100644 --- a/src/if-run/builtins/csv-lookup/index.ts +++ b/src/if-run/builtins/csv-lookup/index.ts @@ -5,6 +5,10 @@ import axios from 'axios'; import {z} from 'zod'; import {parse} from 'csv-parse/sync'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, MappingParams, @@ -15,10 +19,6 @@ import { import {validate} from '../../../common/util/validations'; import {STRINGS} from '../../config'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; const { FILE_FETCH_FAILED, diff --git a/src/if-run/builtins/divide/index.ts b/src/if-run/builtins/divide/index.ts index ba02194bb..767fd1d6d 100644 --- a/src/if-run/builtins/divide/index.ts +++ b/src/if-run/builtins/divide/index.ts @@ -1,5 +1,9 @@ import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -11,10 +15,6 @@ import { import {validate} from '../../../common/util/validations'; import {STRINGS} from '../../config'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; const {ConfigError, MissingInputDataError} = ERRORS; const {MISSING_CONFIG, MISSING_INPUT_DATA, ZERO_DIVISION} = STRINGS; diff --git a/src/if-run/builtins/exponent/index.ts b/src/if-run/builtins/exponent/index.ts index 38bc07d49..199f44b17 100644 --- a/src/if-run/builtins/exponent/index.ts +++ b/src/if-run/builtins/exponent/index.ts @@ -1,4 +1,8 @@ import {z} from 'zod'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -9,10 +13,6 @@ import { import {ERRORS} from '@grnsft/if-core/utils'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/interpolation/index.ts b/src/if-run/builtins/interpolation/index.ts index 1bd1cf48b..c7c9887f7 100644 --- a/src/if-run/builtins/interpolation/index.ts +++ b/src/if-run/builtins/interpolation/index.ts @@ -1,6 +1,10 @@ import Spline from 'typescript-cubic-spline'; import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -11,10 +15,6 @@ import { } from '@grnsft/if-core/types'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/mock-observations/index.ts b/src/if-run/builtins/mock-observations/index.ts index 7b1dfee89..1aa72d303 100644 --- a/src/if-run/builtins/mock-observations/index.ts +++ b/src/if-run/builtins/mock-observations/index.ts @@ -1,5 +1,10 @@ import {DateTime, Duration} from 'luxon'; import {z} from 'zod'; +import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -8,13 +13,8 @@ import { PluginParametersMetadata, MappingParams, } from '@grnsft/if-core/types'; -import {ERRORS} from '@grnsft/if-core/utils'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/multiply/index.ts b/src/if-run/builtins/multiply/index.ts index e33ee1f15..530cb77a1 100644 --- a/src/if-run/builtins/multiply/index.ts +++ b/src/if-run/builtins/multiply/index.ts @@ -1,4 +1,9 @@ import {z} from 'zod'; +import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -6,13 +11,8 @@ import { PluginParametersMetadata, MappingParams, } from '@grnsft/if-core/types'; -import {ERRORS} from '@grnsft/if-core/utils'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/regex/index.ts b/src/if-run/builtins/regex/index.ts index 9f017e8e8..5e65e677f 100644 --- a/src/if-run/builtins/regex/index.ts +++ b/src/if-run/builtins/regex/index.ts @@ -1,5 +1,9 @@ import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -9,10 +13,6 @@ import { } from '@grnsft/if-core/types'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/sci-embodied/index.ts b/src/if-run/builtins/sci-embodied/index.ts index 1aad045a5..c6c953b50 100644 --- a/src/if-run/builtins/sci-embodied/index.ts +++ b/src/if-run/builtins/sci-embodied/index.ts @@ -1,4 +1,8 @@ import {z} from 'zod'; +import { + mapInputIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, ParameterMetadata, @@ -10,10 +14,6 @@ import { import {validate, allDefined} from '../../../common/util/validations'; import {STRINGS} from '../../config'; -import { - mapInputIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; const {SCI_EMBODIED_ERROR} = STRINGS; diff --git a/src/if-run/builtins/sci/index.ts b/src/if-run/builtins/sci/index.ts index dbafa6352..407621b86 100644 --- a/src/if-run/builtins/sci/index.ts +++ b/src/if-run/builtins/sci/index.ts @@ -1,5 +1,9 @@ import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapInputIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -10,10 +14,6 @@ import { } from '@grnsft/if-core/types'; import {validate, allDefined} from '../../../common/util/validations'; -import { - mapInputIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/shell/index.ts b/src/if-run/builtins/shell/index.ts index 8926a266e..ddf8b619d 100644 --- a/src/if-run/builtins/shell/index.ts +++ b/src/if-run/builtins/shell/index.ts @@ -3,6 +3,7 @@ import {spawnSync, SpawnSyncReturns} from 'child_process'; import {loadAll, dump} from 'js-yaml'; import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import {mapOutputIfNeeded} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -12,7 +13,6 @@ import { } from '@grnsft/if-core/types'; import {validate} from '../../../common/util/validations'; -import {mapOutputIfNeeded} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/subtract/index.ts b/src/if-run/builtins/subtract/index.ts index d4dc1181a..5051017c5 100644 --- a/src/if-run/builtins/subtract/index.ts +++ b/src/if-run/builtins/subtract/index.ts @@ -1,4 +1,9 @@ import {z} from 'zod'; +import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, MappingParams, @@ -6,13 +11,8 @@ import { PluginParams, SubtractConfig, } from '@grnsft/if-core/types'; -import {ERRORS} from '@grnsft/if-core/utils'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/sum/index.ts b/src/if-run/builtins/sum/index.ts index eb0e519a5..580821ddb 100644 --- a/src/if-run/builtins/sum/index.ts +++ b/src/if-run/builtins/sum/index.ts @@ -1,5 +1,9 @@ import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -9,10 +13,6 @@ import { } from '@grnsft/if-core/types'; import {validate} from '../../../common/util/validations'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; import {STRINGS} from '../../config'; diff --git a/src/if-run/builtins/time-converter/index.ts b/src/if-run/builtins/time-converter/index.ts index e757ed967..c4b9ef577 100644 --- a/src/if-run/builtins/time-converter/index.ts +++ b/src/if-run/builtins/time-converter/index.ts @@ -1,5 +1,9 @@ import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapConfigIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -13,10 +17,6 @@ import {validate} from '../../../common/util/validations'; import {STRINGS} from '../../config'; import {TIME_UNITS_IN_SECONDS} from './config'; -import { - mapConfigIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; const {ConfigError} = ERRORS; const {MISSING_CONFIG} = STRINGS; diff --git a/src/if-run/builtins/time-sync/index.ts b/src/if-run/builtins/time-sync/index.ts index 5d909bf77..f72cae045 100644 --- a/src/if-run/builtins/time-sync/index.ts +++ b/src/if-run/builtins/time-sync/index.ts @@ -3,6 +3,10 @@ import {isDate} from 'node:util/types'; import {Settings, DateTime, DateTimeMaybeValid, Interval} from 'luxon'; import {z} from 'zod'; import {ERRORS} from '@grnsft/if-core/utils'; +import { + mapInputIfNeeded, + mapOutputIfNeeded, +} from '@grnsft/if-core/utils/helpers'; import { ExecutePlugin, PluginParams, @@ -18,10 +22,6 @@ import {validate} from '../../../common/util/validations'; import {STRINGS} from '../../config'; import {getAggregationMethod} from '../../lib/aggregate'; -import { - mapInputIfNeeded, - mapOutputIfNeeded, -} from '../../../common/util/helpers'; Settings.defaultZone = 'utc';