-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Form service backend implemented (#297)
* Refactor form service to use createService utility * Use injected db gateway in form service functions, without changes to the existing localStorage approach. * Add form db gateway functions * Wire form db gateways to application. * Wire form service to frontend via a client-side proxy and API routes * Fix a couple build issues * Move db gateway functions into the service that consumes it. There are failing tests, due to describe blocks defined in the shared `describeDatabase` helper not getting registered with Vitest. Pushing up to CI to run test there, and rule out a local config issue. * Get describeDatabase working in the auth and forms packages; mark integration tests of demo apps as "expect failure" due to dependency issues that need to be worked out. * Temp: deploy on this branch * Update lockfile * Always use ssl with demo apps * Trying to isolate db dependencies; get CLI working with NodeNext modules * Tweak imports for NodeNext * Testing * Builds working with refactored database structure and module settings. Includes an upgrade of Turborepo and new clean tasks. * Remove pnpm version in Github Actions script, in lieu of the packageManager key in package.json * Switch design package to NodeNext module resolution * Add tests for all the forms services (todo: submitForm). This necessitated giving the forms library the Rollup treatment, and moving some dependencies around to avoid intermixing nodejs deps with the design lib. * use createTestFormServiceContext in submitForm test * Fix build break in spotlight app * Use NodeNext in the base tsconfig.json * docassemble updated for nodenext * Wire existing data flow to submitForm. to be updated for server environment * Do one more test deploy * Remove test deploy
- Loading branch information
1 parent
7dd7dd8
commit 3d3c13c
Showing
280 changed files
with
16,030 additions
and
11,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import { defineConfig } from 'vitest/config'; | ||
import { getDatabaseTestContainerGlobalSetupPath } from '@atj/database'; | ||
|
||
import sharedTestConfig from '../../vitest.shared'; | ||
|
||
export default defineConfig({ | ||
...sharedTestConfig, | ||
test: { | ||
...sharedTestConfig.test, | ||
globalSetup: [getDatabaseTestContainerGlobalSetupPath()], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
import { | ||
createDatabaseGateway, | ||
createPostgresDatabaseContext, | ||
} from '@atj/database'; | ||
import { type DatabaseContext } from '@atj/database'; | ||
import { createServer } from '@atj/server'; | ||
|
||
export const createCustomServer = async (ctx: { | ||
dbUri: string; | ||
}): Promise<any> => { | ||
const db = createDatabaseGateway( | ||
await createPostgresDatabaseContext(ctx.dbUri, true) | ||
); | ||
|
||
export const createCustomServer = async (db: DatabaseContext): Promise<any> => { | ||
return createServer({ | ||
title: 'DOJ Form Service', | ||
db, | ||
|
@@ -22,6 +13,7 @@ export const createCustomServer = async (ctx: { | |
}, | ||
isUserAuthorized: async (email: string) => { | ||
return [ | ||
// 10x team members | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.