Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place
87
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove wispignore.json, make shared constant

+60 -180
-74
.wispignore.json
··· 1 - { 2 - "version": "1.0.0", 3 - "description": "Default ignore patterns for wisp.place uploads", 4 - "patterns": [ 5 - ".git", 6 - ".git/**", 7 - ".github", 8 - ".github/**", 9 - ".gitlab", 10 - ".gitlab/**", 11 - ".DS_Store", 12 - ".wisp.metadata.json", 13 - ".env", 14 - ".env.*", 15 - "node_modules", 16 - "node_modules/**", 17 - "Thumbs.db", 18 - "desktop.ini", 19 - "._*", 20 - ".Spotlight-V100", 21 - ".Spotlight-V100/**", 22 - ".Trashes", 23 - ".Trashes/**", 24 - ".fseventsd", 25 - ".fseventsd/**", 26 - ".cache", 27 - ".cache/**", 28 - ".temp", 29 - ".temp/**", 30 - ".tmp", 31 - ".tmp/**", 32 - "__pycache__", 33 - "__pycache__/**", 34 - "*.pyc", 35 - ".venv", 36 - ".venv/**", 37 - "venv", 38 - "venv/**", 39 - "env", 40 - "env/**", 41 - "*.swp", 42 - "*.swo", 43 - "*~", 44 - ".tangled", 45 - ".tangled/**" 46 - ], 47 - "comments": { 48 - ".git": "Version control - thousands of files", 49 - ".github": "GitHub workflows and configuration", 50 - ".gitlab": "GitLab CI/CD configuration", 51 - ".DS_Store": "macOS metadata - can leak info", 52 - ".wisp.metadata.json": "Wisp internal metadata", 53 - ".env": "Environment variables with secrets", 54 - "node_modules": "Dependency folder - can be 100,000+ files", 55 - "Thumbs.db": "Windows thumbnail cache", 56 - "desktop.ini": "Windows folder config", 57 - "._*": "macOS resource fork files", 58 - ".Spotlight-V100": "macOS Spotlight index", 59 - ".Trashes": "macOS trash folder", 60 - ".fseventsd": "macOS filesystem events", 61 - ".cache": "Cache directories", 62 - ".temp": "Temporary directories", 63 - ".tmp": "Temporary directories", 64 - "__pycache__": "Python cache", 65 - "*.pyc": "Python compiled files", 66 - ".venv": "Python virtual environments", 67 - "venv": "Python virtual environments", 68 - "env": "Python virtual environments", 69 - "*.swp": "Vim swap files", 70 - "*.swo": "Vim swap files", 71 - "*~": "Editor backup files", 72 - ".tangled": "Tangled directory" 73 - } 74 - }
+7 -10
apps/firehose-service/Dockerfile
··· 1 1 # Build from monorepo root: docker build -f apps/firehose-service/Dockerfile . 2 2 3 - # Stage 1: Install dependencies 3 + # Stage 1: Install dependencies and compile binary 4 4 FROM oven/bun:1-alpine AS builder 5 5 6 6 WORKDIR /app ··· 18 18 # Install dependencies 19 19 RUN bun install --frozen-lockfile 20 20 21 - # Stage 2: Runtime 22 - FROM oven/bun:1-alpine AS runtime 21 + # Compile to a single binary 22 + RUN bun build --compile --minify apps/firehose-service/src/index.ts --outfile /app/firehose 23 23 24 - WORKDIR /app 24 + # Stage 2: Minimal runtime 25 + FROM alpine:3.22 25 26 26 - # Copy workspace and dependencies from builder 27 - COPY --from=builder /app /app 28 - 29 - WORKDIR /app/apps/firehose-service 27 + COPY --from=builder /app/firehose /usr/local/bin/firehose 30 28 31 29 ENV NODE_ENV=production 32 30 ENV HEALTH_PORT=3001 33 31 34 - # Start the firehose service 35 - CMD ["bun", "run", "start"] 32 + CMD ["firehose"]
+2 -82
apps/main-app/src/lib/ignore-patterns.ts
··· 1 1 import ignore, { type Ignore } from 'ignore' 2 - import { readFileSync, existsSync } from 'fs' 3 - import { join } from 'path' 4 - 5 - interface IgnoreConfig { 6 - version: string 7 - description: string 8 - patterns: string[] 9 - } 10 - 11 - /** 12 - * Load default ignore patterns from the .wispignore.json file in the monorepo root 13 - */ 14 - function loadDefaultPatterns(): string[] { 15 - try { 16 - // Path to the default ignore patterns JSON file (monorepo root, 3 levels up from this file) 17 - const defaultJsonPath = join(__dirname, '../../../../.wispignore.json') 18 - 19 - if (!existsSync(defaultJsonPath)) { 20 - console.warn('⚠️ Default .wispignore.json not found, using hardcoded patterns') 21 - return getHardcodedPatterns() 22 - } 23 - 24 - const contents = readFileSync(defaultJsonPath, 'utf-8') 25 - const config: IgnoreConfig = JSON.parse(contents) 26 - return config.patterns 27 - } catch (error) { 28 - console.error('Failed to load default ignore patterns:', error) 29 - return getHardcodedPatterns() 30 - } 31 - } 32 - 33 - /** 34 - * Hardcoded fallback patterns (same as in .wispignore.json) 35 - */ 36 - function getHardcodedPatterns(): string[] { 37 - return [ 38 - '.git', 39 - '.git/**', 40 - '.github', 41 - '.github/**', 42 - '.gitlab', 43 - '.gitlab/**', 44 - '.DS_Store', 45 - '.wisp.metadata.json', 46 - '.env', 47 - '.env.*', 48 - 'node_modules', 49 - 'node_modules/**', 50 - 'Thumbs.db', 51 - 'desktop.ini', 52 - '._*', 53 - '.Spotlight-V100', 54 - '.Spotlight-V100/**', 55 - '.Trashes', 56 - '.Trashes/**', 57 - '.fseventsd', 58 - '.fseventsd/**', 59 - '.cache', 60 - '.cache/**', 61 - '.temp', 62 - '.temp/**', 63 - '.tmp', 64 - '.tmp/**', 65 - '__pycache__', 66 - '__pycache__/**', 67 - '*.pyc', 68 - '.venv', 69 - '.venv/**', 70 - 'venv', 71 - 'venv/**', 72 - 'env', 73 - 'env/**', 74 - '*.swp', 75 - '*.swo', 76 - '*~', 77 - '.tangled', 78 - '.tangled/**', 79 - ] 80 - } 2 + import { DEFAULT_IGNORE_PATTERNS } from '@wispplace/constants' 81 3 82 4 /** 83 5 * Load custom ignore patterns from a .wispignore file ··· 97 19 export function createIgnoreMatcher(customPatterns?: string[]): Ignore { 98 20 const ig = ignore() 99 21 100 - // Add default patterns 101 - const defaultPatterns = loadDefaultPatterns() 102 - ig.add(defaultPatterns) 22 + ig.add(DEFAULT_IGNORE_PATTERNS) 103 23 104 24 // Add custom patterns if provided 105 25 if (customPatterns && customPatterns.length > 0) {
+1 -11
cli/commands/deploy.ts
··· 15 15 type FileUploadResult 16 16 } from '@wispplace/fs-utils'; 17 17 import { computeCID, extractBlobMap, shouldCompressFile, compressFile, extractSubfsUris } from '@wispplace/atproto-utils'; 18 - import { MAX_SITE_SIZE, MAX_FILE_COUNT, MAX_FILE_SIZE } from '@wispplace/constants'; 18 + import { MAX_SITE_SIZE, MAX_FILE_COUNT, MAX_FILE_SIZE, DEFAULT_IGNORE_PATTERNS } from '@wispplace/constants'; 19 19 import { readdirSync, statSync, readFileSync, existsSync } from 'fs'; 20 20 import { join, relative, basename } from 'path'; 21 21 import ignore, { type Ignore } from 'ignore'; ··· 45 45 size: number; 46 46 } 47 47 48 - // Default ignore patterns 49 - const DEFAULT_IGNORE_PATTERNS = [ 50 - '.git', '.git/**', '.github', '.github/**', '.gitlab', '.gitlab/**', 51 - '.DS_Store', '.wisp-metadata.json', '.env', '.env.*', 52 - 'node_modules', 'node_modules/**', 'Thumbs.db', 'desktop.ini', 53 - '._*', '.Spotlight-V100/**', '.Trashes/**', '.fseventsd/**', 54 - '.cache/**', '.temp/**', '.tmp/**', '__pycache__/**', '*.pyc', 55 - '.venv/**', 'venv/**', '*.swp', '*.swo', '*~', '.tangled/**', 56 - '.wispignore' 57 - ]; 58 48 59 49 function createIgnoreMatcher(siteDir: string): Ignore { 60 50 const ig = ignore();
+1 -1
cli/package.json
··· 1 1 { 2 2 "name": "wispctl", 3 - "version": "1.0.6", 3 + "version": "1.0.8", 4 4 "description": "CLI for wisp.place - deploy static sites to the AT Protocol", 5 5 "type": "module", 6 6 "main": "./dist/index.js",
+47
packages/@wispplace/constants/src/index.ts
··· 31 31 // Compression settings 32 32 export const GZIP_COMPRESSION_LEVEL = 9; 33 33 34 + // Default ignore patterns for file uploads 35 + export const DEFAULT_IGNORE_PATTERNS: string[] = [ 36 + '.git', 37 + '.git/**', 38 + '.github', 39 + '.github/**', 40 + '.gitlab', 41 + '.gitlab/**', 42 + '.DS_Store', 43 + '.wisp.metadata.json', 44 + '.wisp-metadata.json', 45 + '.env', 46 + '.env.*', 47 + 'node_modules', 48 + 'node_modules/**', 49 + 'Thumbs.db', 50 + 'desktop.ini', 51 + '._*', 52 + '.Spotlight-V100', 53 + '.Spotlight-V100/**', 54 + '.Trashes', 55 + '.Trashes/**', 56 + '.fseventsd', 57 + '.fseventsd/**', 58 + '.cache', 59 + '.cache/**', 60 + '.temp', 61 + '.temp/**', 62 + '.tmp', 63 + '.tmp/**', 64 + '__pycache__', 65 + '__pycache__/**', 66 + '*.pyc', 67 + '.venv', 68 + '.venv/**', 69 + 'venv', 70 + 'venv/**', 71 + 'env', 72 + 'env/**', 73 + '*.swp', 74 + '*.swo', 75 + '*~', 76 + '.tangled', 77 + '.tangled/**', 78 + '.wispignore', 79 + ]; 80 + 34 81 // CLI Binary URLs 35 82 export const CLI_BINARY_BASE_URL = "https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries"; 36 83 export const CLI_BINARIES = {
+2 -2
packages/create-wisp/package.json
··· 1 1 { 2 2 "name": "create-wisp", 3 - "version": "1.0.6", 3 + "version": "1.0.8", 4 4 "description": "CLI for wisp.place - deploy static sites to the AT Protocol", 5 5 "type": "module", 6 6 "bin": { ··· 10 10 "bin.js" 11 11 ], 12 12 "dependencies": { 13 - "wispctl": "^1.0.6" 13 + "wispctl": "^1.0.8" 14 14 } 15 15 }