Skip to content

Commit

Permalink
feat(builtins): update mapping functions path
Browse files Browse the repository at this point in the history
  • Loading branch information
manushak committed Aug 21, 2024
1 parent a781b0f commit d908767
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 64 deletions.
8 changes: 4 additions & 4 deletions src/if-run/builtins/coefficient/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';

Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/copy-param/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/csv-lookup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/divide/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/exponent/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import {z} from 'zod';
import {
mapConfigIfNeeded,
mapOutputIfNeeded,
} from '@grnsft/if-core/utils/helpers';
import {
ExecutePlugin,
PluginParams,
Expand All @@ -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';

Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/interpolation/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';

Expand Down
10 changes: 5 additions & 5 deletions src/if-run/builtins/mock-observations/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';

Expand Down
10 changes: 5 additions & 5 deletions src/if-run/builtins/multiply/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {z} from 'zod';
import {ERRORS} from '@grnsft/if-core/utils';
import {
mapConfigIfNeeded,
mapOutputIfNeeded,
} from '@grnsft/if-core/utils/helpers';
import {
ExecutePlugin,
PluginParams,
MultiplyConfig,
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';

Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/regex/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';

Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/sci-embodied/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import {z} from 'zod';
import {
mapInputIfNeeded,
mapOutputIfNeeded,
} from '@grnsft/if-core/utils/helpers';
import {
ExecutePlugin,
ParameterMetadata,
Expand All @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/sci/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/if-run/builtins/shell/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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';

Expand Down
10 changes: 5 additions & 5 deletions src/if-run/builtins/subtract/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {z} from 'zod';
import {ERRORS} from '@grnsft/if-core/utils';
import {
mapConfigIfNeeded,
mapOutputIfNeeded,
} from '@grnsft/if-core/utils/helpers';
import {
ExecutePlugin,
MappingParams,
PluginParametersMetadata,
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';

Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/sum/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';

Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/time-converter/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/if-run/builtins/time-sync/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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';

Expand Down

0 comments on commit d908767

Please sign in to comment.