This file contains hidden or 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
| /** | |
| * Bible verse utilities for parsing and normalizing verse ranges | |
| */ | |
| import { Array, Option, pipe, Record, String } from 'effect' | |
| // ============================================================================ | |
| // Core Types | |
| // ============================================================================ |
This file contains hidden or 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
| /** | |
| * Script to generate verses.json from the scrollmapper Bible database. | |
| * | |
| * This script: | |
| * 1. Fetches the KJV CSV from GitHub | |
| * 2. Parses the CSV to extract book/chapter/verse structure | |
| * 3. Normalizes book names to our canonical format | |
| * 4. Outputs a compressed JSON with chapter ranges | |
| * | |
| * Run with: bun packages/db/scripts/generateVersesJson.ts |
This file contains hidden or 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
| [ | |
| { | |
| "book": "Genesis", | |
| "bookOrder": 1, | |
| "testament": "old", | |
| "chapter": 1, | |
| "startVerse": 1, | |
| "endVerse": 31 | |
| }, | |
| { |
This file contains hidden or 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
| import { HttpApiClient, type HttpApiError, type HttpClientError } from '@effect/platform' | |
| import { RefreshApi } from '@openfaith/pco/refreshApi' | |
| import { TokenKey, TokenManager, type TokenState } from '@openfaith/pco/tokenManager' | |
| import { Clock, Context, Effect, HashMap, Layer, Option, type ParseResult, Ref } from 'effect' | |
| // Internal service tag | |
| export class PcoAuth extends Context.Tag('Pco/PcoAuth')< | |
| PcoAuth, | |
| { | |
| readonly getValidAccessToken: Effect.Effect< |
This file contains hidden or 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
| const BaseResponseSchema = Schema.Struct({ | |
| included: Schema.Array( | |
| Schema.Union( | |
| Schema.Struct({ | |
| type: Schema.Literal("Person"), | |
| foo: Schema.String | |
| }), | |
| Schema.Struct({ | |
| type: Schema.Literal("Address"), | |
| yo: Schema.String |
This file contains hidden or 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
| import { chatsTable } from '@/server/db/schema/chatsSchema' | |
| import { google } from '@ai-sdk/google' | |
| import * as PgDrizzle from '@effect/sql-drizzle/Pg' | |
| import { | |
| generateText, | |
| smoothStream, | |
| streamText, | |
| type LanguageModelUsage, | |
| type ToolSet, | |
| } from 'ai' |
This file contains hidden or 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
| import type { FiltersState } from '@/components/data-table-filter/core/types' | |
| import { filtersSchema } from '@/components/data-table-filter/core/types' | |
| import type { FilterKeys } from '@/data/globalState' | |
| import { noOp } from '@/shared/things' | |
| import { useZero } from '@/shared/zero/useZero' | |
| import type { ZSchema } from '@/shared/zero/zeroSchema.mjs' | |
| import { escapeLike, type Query, type TTL } from '@rocicorp/zero' | |
| import { useQuery } from '@rocicorp/zero/react' | |
| import { getTime } from 'date-fns/fp' | |
| import { Array, Boolean, Option, pipe, String } from 'effect' |
This file contains hidden or 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
| 2024-12-23T02:57:17.061Z [ERROR] Workflow Worker Thread failed: Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory { | |
| sdkComponent: 'worker', | |
| taskQueue: 'Main', | |
| code: 'ERR_WORKER_OUT_OF_MEMORY' | |
| } | |
| 2024-12-23T02:57:17.061Z [INFO] Worker state changed { sdkComponent: 'worker', taskQueue: 'Main', state: 'STOPPING' } | |
| 2024-12-23T02:57:17.062Z [ERROR] An unexpected error occured while processing Workflow Activation. Initiating Worker shutdown. { | |
| sdkComponent: 'worker', | |
| taskQueue: 'Main', | |
| runId: '63e97f3f-b943-4add-91b3-6cfef5a257ce', |
This file contains hidden or 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
| export type ADTMember<ADT, Key extends string, Type extends string> = Extract< | |
| ADT, | |
| /* eslint-disable @typescript-eslint/consistent-indexed-object-style */ | |
| { [k in Key]: Type } | |
| > | |
| type Matchers<Key extends string, ADT extends { [k in Key]: string }, Out> = { | |
| [D in ADT[Key]]: (v: ADTMember<ADT, Key, D>) => Out | |
| } |
This file contains hidden or 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
| // Config values | |
| const primaryRegion = "us-east-1"; | |
| const replicaRegion = "us-west-2"; | |
| const dbName = "exampledb"; | |
| const dbUser = "exampleuser"; | |
| const dbPassword = "examplepassword"; | |
| // VPC Configs for primary and replica regions | |
| const primaryVpcId = "vpc-id-in-primary-region"; // Replace with your VPC ID | |
| const replicaVpcId = "vpc-id-in-replica-region"; // Replace with your VPC ID |
NewerOlder