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

Fix firestoreusers2json #2

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

sauntimo
Copy link
Contributor

Changes

  • fixes an apparent variable scoping issue in firestoreusers2json.ts which prevented the script from executing successfully. Seems that arguments from the CLI were not available in the listUsers function, so I passed them in explicitly.
auth git:(fix-firestoreusers2json) ✗ node firestoreusers2json.js
(node:95334) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
    at Object.openSync (fs.js:454:10)
    at Object.writeFileSync (fs.js:1384:35)
    at /Users/tim/code/sauntimo/supabase-community/firebase-to-supabase/auth/firestoreusers2json.js:66:16
    at step (/Users/tim/code/sauntimo/supabase-community/firebase-to-supabase/auth/firestoreusers2json.js:33:23)
    at Object.next (/Users/tim/code/sauntimo/supabase-community/firebase-to-supabase/auth/firestoreusers2json.js:14:53)
    at /Users/tim/code/sauntimo/supabase-community/firebase-to-supabase/auth/firestoreusers2json.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/tim/code/sauntimo/supabase-community/firebase-to-supabase/auth/firestoreusers2json.js:4:12)
    at main (/Users/tim/code/sauntimo/supabase-community/firebase-to-supabase/auth/firestoreusers2json.js:64:12)
    at Object.<anonymous> (/Users/tim/code/sauntimo/supabase-community/firebase-to-supabase/auth/firestoreusers2json.js:59:5)
(node:95334) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:95334) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  • tries to standardise the indentation a little
  • updates the related .js file (with tsc firestoreusers2json.ts)
  • Now successfully dumps firestore users in a json file 🙌

@burggraf burggraf merged commit 63da30b into supabase-community:main Feb 24, 2022
burggraf added a commit that referenced this pull request Feb 24, 2022
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants