Skip to content

Commit d35ade8

Browse files
committed
refactor: restructure schema validations
Signed-off-by: seven <[email protected]>
1 parent da3662b commit d35ade8

File tree

17 files changed

+226
-206
lines changed

17 files changed

+226
-206
lines changed

src/stack/iacSchema.ts

Lines changed: 0 additions & 192 deletions
This file was deleted.

src/stack/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export { deployStack } from './deploy';
22
export * from './parse';
3-
export * from './iacSchema';

src/stack/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
ServerlessIac,
1010
ServerlessIacRaw,
1111
} from '../types';
12-
import { validateYaml } from './iacSchema';
1312
import { get, isEmpty } from 'lodash';
13+
import { validateYaml } from '../validations';
1414

1515
const mapToArr = (obj: Record<string, Record<string, unknown> | string | null | undefined>) => {
1616
if (!obj) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/types/index.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Stages, Vars } from './vars';
2-
import { Tags } from './tag';
3-
import { EventDomain, EventRaw } from './event';
4-
import { DatabaseDomain, DatabaseRaw } from './database';
5-
import { FunctionDomain, FunctionRaw } from './function';
1+
import { Stages, Vars } from './domains/vars';
2+
import { Tags } from './domains/tag';
3+
import { EventDomain, EventRaw } from './domains/event';
4+
import { DatabaseDomain, DatabaseRaw } from './domains/database';
5+
import { FunctionDomain, FunctionRaw } from './domains/function';
66

77
export type ServerlessIacRaw = {
88
version: string;
@@ -28,9 +28,9 @@ export type ServerlessIac = {
2828
databases?: Array<DatabaseDomain>;
2929
};
3030

31-
export * from './database';
32-
export * from './event';
33-
export * from './function';
34-
export * from './tag';
35-
export * from './vars';
36-
export * from './context';
31+
export * from './domains/database';
32+
export * from './domains/event';
33+
export * from './domains/function';
34+
export * from './domains/tag';
35+
export * from './domains/vars';
36+
export * from './domains/context';

0 commit comments

Comments
 (0)