Skip to content

Commit

Permalink
fix: remove async map generic dataschema
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Shih committed Sep 26, 2023
1 parent 6a30986 commit 3ecfbe0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const getUiBuilderComponentsPathMocked = getUiBuilderComponentsPath as any;
utilsMock.shouldRenderComponents = jest.fn().mockReturnValue(true);
utilsMock.notifyMissingPackages = jest.fn().mockReturnValue(true);
utilsMock.getAmplifyDataSchema = jest.fn().mockReturnValue({});
utilsMock.mapGenericDataSchemaToCodegen = jest.fn().mockReturnValue({});
utilsMock.isFormDetachedFromModel = jest.fn().mockReturnValue(false);
utilsMock.extractUIComponents = jest.fn().mockReturnValue(undefined);
utilsMock.waitForSucceededJob = jest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const mapDataFieldsToCodegen = (fields: { [fieldName: string]: GenericDataField
return codegenFields;
};

export const mapGenericDataSchemaToCodegen = async (genericDataSchema: GenericDataSchema): CodegenJobGenericDataSchema | undefined => {
export const mapGenericDataSchemaToCodegen = (genericDataSchema: GenericDataSchema): CodegenJobGenericDataSchema => {
const { models, nonModels, enums, dataSourceType } = genericDataSchema;
const codegenModels: { [key: string]: CodegenGenericDataModel } = {};
const codegenNonModels: { [key: string]: CodegenGenericDataNonModel } = {};
Expand Down
12 changes: 1 addition & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12857,7 +12857,7 @@ __metadata:
languageName: node
linkType: hard

"@types/node-fetch@npm:2.6.4":
"@types/node-fetch@npm:2.6.4, @types/node-fetch@npm:^2.6.1":
version: 2.6.4
resolution: "@types/node-fetch@npm:2.6.4"
dependencies:
Expand All @@ -12867,16 +12867,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node-fetch@npm:^2.6.1":
version: 2.6.1
resolution: "@types/node-fetch@npm:2.6.1"
dependencies:
"@types/node": "*"
form-data: ^3.0.0
checksum: 033945215fa6b36d5597b21bbdd7d946a751dcd066f8fa71e5f5ab5698390bc2e76e38932ec6ac709def39b6371dfd61844e6804409c7ba812e24d1c820fbff8
languageName: node
linkType: hard

"@types/node@npm:*, @types/node@npm:^18.16.1":
version: 18.16.1
resolution: "@types/node@npm:18.16.1"
Expand Down

0 comments on commit 3ecfbe0

Please sign in to comment.