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

Possible to get output to print out deep nested objects? #8

Open
Guitarkalle opened this issue Apr 2, 2018 · 9 comments
Open

Possible to get output to print out deep nested objects? #8

Guitarkalle opened this issue Apr 2, 2018 · 9 comments

Comments

@Guitarkalle
Copy link

Is there anyway for the CLI to output the entire response including deeply nested objects?

Now the output becomes, for example: requestContext: [Object]

@jayair
Copy link
Member

jayair commented Apr 2, 2018

@Guitarkalle There isn't right now. It's just meant to test if the request was successful or not. Are you using it to debug your output?

@Guitarkalle
Copy link
Author

@jayair Not often but it would be really helpful if it was possible to supply an option to do it :)

@jayair
Copy link
Member

jayair commented Apr 4, 2018

@Guitarkalle I see. Can I see a sample of the full output you are seeing right now?

@Guitarkalle
Copy link
Author

Guitarkalle commented Apr 8, 2018

@jayair
So here I can't see the headers for instance :)

Authenticating with User Pool
Getting temporary credentials
Making API request
{ status: 200,
  statusText: 'OK',
  data:
   { message: 'Getting data!',
     input:
      { resource: '/getdata',
        path: '/getdata',
        httpMethod: 'GET',
        headers: [Object],
        queryStringParameters: null,
        pathParameters: null,
        stageVariables: null,
        requestContext: [Object],
        body: null,
        isBase64Encoded: false },
     data: [ [Object] ] } }

@jayair
Copy link
Member

jayair commented Apr 9, 2018

@Guitarkalle That makes sense. This should be easy to fix. In these two instances:

We need to pass in a second argument of null to the console.dir() call (https://nodejs.org/api/console.html#console_console_dir_obj_options).

Do you want to try it and submit a PR?

@Guitarkalle
Copy link
Author

@jayair
Sure, give me a few days and I can find some time to look at it:)

@bveenvliet
Copy link

I fixed and created a PR for it

@jayair
Copy link
Member

jayair commented Dec 18, 2018

@bveenvliet That's awesome! Thanks!

@mattgillard
Copy link

i found this issue too haha. Any chance of releasing a new version with the PR applied please?
Otherwise is there any other tool people are using for debugging the API output? I love the ease of cognito testing with this utility!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants