Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: get existing e2e tests passing #704

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function generateModelIntrospection(cwd: string, settings: { outputDir?:
// CLI workflow to add codegen to non-Amplify JS project
export function addCodegenNonAmplifyJS(cwd: string): Promise<void> {
return new Promise((resolve, reject) => {
const cmdOptions = ['codegen', 'add', '--apiId', 'mockapiid'];
const cmdOptions = ['codegen', 'add'];
const chain = spawn(getCLIPath(), cmdOptions, { cwd, stripColors: true });
chain
.wait("Choose the type of app that you're building")
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-codegen/commands/codegen/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
const { options = {} } = context.parameters;
const keys = Object.keys(options);
// frontend and framework are undocumented, but are read when apiId is also supplied
const { apiId = null, region, yes, frontend, framework, ...rest } = options;
const { apiId = null, region, yes, frontend, framework, debug, ...rest } = options;
const extraOptions = Object.keys(rest);
if (extraOptions.length) {
const paramMsg = extraOptions.length > 1 ? 'Invalid parameters' : 'Invalid parameter';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const getAppSyncAPIInfo = require('./getAppSyncAPIInfo');
/* Get AppSync api info if api id and region are avialable.
* Otherwise return undefined.
*/
function getAppSyncAPIInfoFromProject(project, context) {
function getAppSyncAPIInfoFromProject(context, project) {
if (project.amplifyExtension.apiId && project.amplifyExtension.region) {
const {
amplifyExtension: { apiId, region },
Expand Down