
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@gsa-tts/forms-database
Advanced tools
This package maintains the supporting infrastructure for the Forms Platform database.
PostgreSQL is the supported production database. Sqlite3 is also supported, to facilitate fast in-memory integration testing.
To create a new database migration in ./migrations:
pnpm knex migrate:make migration-name
Application of database migrations are orchestrated by the application via ./src/management/migrate-database.ts.
Packages that leverage @gsa-tts/forms-database may use provided helpers for testing
purposes.
describeDatabase is a Vitest suite factory that will run a test spec against
a clean database on both Sqlite3 and PostgreSQL:
import { expect, it } from 'vitest';
import { type DbTestContext, describeDatabase } from '@gsa-tts/forms-database/testing';
describeDatabase('database connection', () => {
it<DbTestContext>('selects all via kysely', async ({ db }) => {
const kysely2 = await db.ctx.getKysely();
const users2 = await kysely2.selectFrom('users').selectAll().execute();
expect(users2).toBeDefined();
});
it<DbTestContext>('selects all via knex', async ({ db }) => {
const knex = await db.ctx.getKnex();
const users = await knex.select().from('users');
expect(users).toBeDefined();
});
For business logic tests that integrate with a clean database, you may leverage
the createInMemoryDatabaseContext factory. This will provide an ephemeral
in-memory Sqlite3 database.
import { createInMemoryDatabaseContext } from '@gsa-tts/forms-database/context';
describe('business logic tested with in-memory database', () => {
it('context helper has a connection to a sqlite database', async () => {
const db = await createInMemoryDatabaseContext();
expect(db.engine).toEqual('sqlite');
});
});
FAQs
10x Forms Platform database
We found that @gsa-tts/forms-database demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.