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
| FROM oven/bun:latest | |
| WORKDIR /app | |
| COPY . . | |
| RUN bun install | |
| RUN bun build ./realtime.ts --compile --outfile realtime | |
| RUN chmod +x /app/realtime |
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 { Database } from "bun:sqlite"; | |
| import jsonData from '$lib/server/utils/realty/fieldMaps.json'; // Import the JSON directly | |
| // Define structure for the JSON object | |
| interface FieldMapping { | |
| fieldName: string; | |
| alias: string; | |
| description: 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 type { PageServerLoad } from './$types'; | |
| import pb from '$lib/pocketbase'; | |
| import { propertyClassMap } from './guards'; // Import the source of truth | |
| export const load: PageServerLoad = async ({ url, depends, params }) => { | |
| depends('app:search'); // Revalidate on every request to this tag. | |
| const slugs = params.slugs?.replace(/^\/|\/$/g, '').split('/') || []; | |
| const [classSlug, typeSlug] = slugs; |
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 lang="ts"> | |
| import { goto } from '$app/navigation'; | |
| import { page } from '$app/stores'; | |
| import { onMount } from 'svelte'; | |
| import { queryParameters, ssp } from 'sveltekit-search-params'; | |
| import Pagination from './pagination.svelte'; | |
| let { records, ...props } = $props(); | |
| const system = $state({ Class: '', Type: '', page: 1 }); |
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 lang="ts"> | |
| import { goto } from '$app/navigation'; | |
| import { page } from '$app/stores'; | |
| import { onMount } from 'svelte'; | |
| import { queryParameters } from 'sveltekit-search-params'; | |
| // Initialize query parameters management | |
| const params = queryParameters( | |
| { | |
| test: { |
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
| // Define the type for individual fields | |
| export interface RETSField { | |
| SystemName?: string | string[]; | |
| Interpretation?: string[]; | |
| DataType?: string[]; | |
| MaximumLength?: number[]; | |
| Precision?: number[]; | |
| LongName?: 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 PocketBase from "pocketbase"; | |
| import eventsource from "eventsource"; | |
| global.EventSource = eventsource as unknown as typeof EventSource; | |
| const pb = new PocketBase(process.env.POCKETBASE_URL); | |
| // Store the initial states of all records in a cache | |
| const previousRecords: { [recordId: string]: any } = {}; | |
| async function watchCollectionChanges(collection: 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
| ARG BUN_VERSION=1.1.27 | |
| FROM oven/bun:${BUN_VERSION} AS builder | |
| # Install required dependencies | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| curl \ | |
| xz-utils \ | |
| && rm -rf /var/lib/apt/lists/* |
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 lang="ts"> | |
| import { onMount } from 'svelte'; | |
| import { writable } from 'svelte/store'; | |
| // Define the type for your message objects | |
| interface Message { | |
| now: number; | |
| created_at: string; | |
| // Add any other properties your message might have | |
| } |
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 lang="ts"> | |
| let sections = [ | |
| { | |
| title: 'WEBSITES', | |
| content: 'Content for section 1', | |
| color: 'bg-[#85aa74]' | |
| }, | |
| { | |
| title: 'WEB HOSTING', | |
| color: 'bg-[#fee6a6]', |