0.8.0 • Published 4 years ago
@bonsai-thing/data v0.8.0
Run the tests:
npm run test
npm run test:watchBuild
You can get this whole package built for publishing by running:
npm run buildThat command however runs three subcommands:
build:generate— generates the resolver types fromgraphql.schemathat end up insrc/__generated__build:types— compiles the TypeScript and emits declaration files indist/build:vite— compiles all of the TypeScript down into JavaScript files indist/
Formatting, Linting, Type Checking
There are a variety of commands for checking things are OK:
npm run check:types
npm run check:lint... and for fixing issues:
npm run fix:format
npm run fix:lintPublish a new version
npm run build
npx bump-n-pub minorThis temporarily strips the dev dependencies out of the package.json so this package is a little lighter to install.
Running tests against the cloud database
TEST_DB=cloud yarn testConnecting to the cloud database
Here's an example of how you would list the permissions on various tables:
brew cask install mysql-shell
mysqlsh mysql://[admin user name]@canvalog-mysql.mysql.database.azure.com:3306After entering the admin password you can enter stuff in the Mysql shell:
shell.options.set('resultFormat','vertical')
\sql SELECT * from mysql.db;Running tests against the cloud database
AZURE_MYSQL_USER=test_user AZURE_MYSQL_PASSWORD=[test user password] TEST_DB=cloud yarn testFuture
- Factor out db abstraction into mysqlite lib