-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: remove old invoker shims from mock package
- Loading branch information
1 parent
fa6fa8a
commit ae1e138
Showing
10 changed files
with
15 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import * as path from 'path'; | ||
import * as fs from 'fs'; | ||
import { $TSAny, JSONUtilities } from 'amplify-cli-core'; | ||
|
||
export function getMockConfig(context) { | ||
const { projectPath } = context.amplify.getEnvInfo(); | ||
const mockConfigPath = path.join(projectPath, 'amplify', 'mock.json'); | ||
if (fs.existsSync(mockConfigPath)) { | ||
return JSON.parse(fs.readFileSync(mockConfigPath).toString('UTF-8')); | ||
} | ||
return {}; | ||
return JSONUtilities.readJson<$TSAny>(mockConfigPath, { throwIfNotExist: false }) ?? {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters