jaikamat / clubhouse-pos-importer

Monorepo for an LGS's inventory management system
1 stars 0 forks source link

Untangle `db_scripts` from `gc_functions` #350

Closed jaikamat closed 3 years ago

jaikamat commented 3 years ago

Summary

Database scripts and Google Cloud Functions were tangled due to legacy development reasons, and it was time to separate them as they represent two completely different concerns. They shared one package.json file (with one scripts section) and one node_modules dependency folder.

In this PR, I extracted db_scripts to a top-level directory, and uninstalled dependencies in both package.jsons as appropriate.

I've confirmed the database script index.ts to run correctly when built, and that Cloud Functions can be served locally.

(PS, I omitted the built folder from the jest config in db_scripts, running npm test there tested against the built code as well).