tangled
alpha
login
or
join now
nekomimi.pet
/
wisp.place-monorepo
87
fork
atom
Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
wisp.place
87
fork
atom
overview
issues
9
pulls
pipelines
remove wispignore.json, make shared constant
nekomimi.pet
1 month ago
c6843336
5560952e
1/2
deploy-wisp.yml
success
37s
test.yml
failed
30s
+60
-180
7 changed files
expand all
collapse all
unified
split
.wispignore.json
apps
firehose-service
Dockerfile
main-app
src
lib
ignore-patterns.ts
cli
commands
deploy.ts
package.json
packages
@wispplace
constants
src
index.ts
create-wisp
package.json
-74
.wispignore.json
reviewed
···
1
1
-
{
2
2
-
"version": "1.0.0",
3
3
-
"description": "Default ignore patterns for wisp.place uploads",
4
4
-
"patterns": [
5
5
-
".git",
6
6
-
".git/**",
7
7
-
".github",
8
8
-
".github/**",
9
9
-
".gitlab",
10
10
-
".gitlab/**",
11
11
-
".DS_Store",
12
12
-
".wisp.metadata.json",
13
13
-
".env",
14
14
-
".env.*",
15
15
-
"node_modules",
16
16
-
"node_modules/**",
17
17
-
"Thumbs.db",
18
18
-
"desktop.ini",
19
19
-
"._*",
20
20
-
".Spotlight-V100",
21
21
-
".Spotlight-V100/**",
22
22
-
".Trashes",
23
23
-
".Trashes/**",
24
24
-
".fseventsd",
25
25
-
".fseventsd/**",
26
26
-
".cache",
27
27
-
".cache/**",
28
28
-
".temp",
29
29
-
".temp/**",
30
30
-
".tmp",
31
31
-
".tmp/**",
32
32
-
"__pycache__",
33
33
-
"__pycache__/**",
34
34
-
"*.pyc",
35
35
-
".venv",
36
36
-
".venv/**",
37
37
-
"venv",
38
38
-
"venv/**",
39
39
-
"env",
40
40
-
"env/**",
41
41
-
"*.swp",
42
42
-
"*.swo",
43
43
-
"*~",
44
44
-
".tangled",
45
45
-
".tangled/**"
46
46
-
],
47
47
-
"comments": {
48
48
-
".git": "Version control - thousands of files",
49
49
-
".github": "GitHub workflows and configuration",
50
50
-
".gitlab": "GitLab CI/CD configuration",
51
51
-
".DS_Store": "macOS metadata - can leak info",
52
52
-
".wisp.metadata.json": "Wisp internal metadata",
53
53
-
".env": "Environment variables with secrets",
54
54
-
"node_modules": "Dependency folder - can be 100,000+ files",
55
55
-
"Thumbs.db": "Windows thumbnail cache",
56
56
-
"desktop.ini": "Windows folder config",
57
57
-
"._*": "macOS resource fork files",
58
58
-
".Spotlight-V100": "macOS Spotlight index",
59
59
-
".Trashes": "macOS trash folder",
60
60
-
".fseventsd": "macOS filesystem events",
61
61
-
".cache": "Cache directories",
62
62
-
".temp": "Temporary directories",
63
63
-
".tmp": "Temporary directories",
64
64
-
"__pycache__": "Python cache",
65
65
-
"*.pyc": "Python compiled files",
66
66
-
".venv": "Python virtual environments",
67
67
-
"venv": "Python virtual environments",
68
68
-
"env": "Python virtual environments",
69
69
-
"*.swp": "Vim swap files",
70
70
-
"*.swo": "Vim swap files",
71
71
-
"*~": "Editor backup files",
72
72
-
".tangled": "Tangled directory"
73
73
-
}
74
74
-
}
+7
-10
apps/firehose-service/Dockerfile
reviewed
···
1
1
# Build from monorepo root: docker build -f apps/firehose-service/Dockerfile .
2
2
3
3
-
# Stage 1: Install dependencies
3
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
21
-
# Stage 2: Runtime
22
22
-
FROM oven/bun:1-alpine AS runtime
21
21
+
# Compile to a single binary
22
22
+
RUN bun build --compile --minify apps/firehose-service/src/index.ts --outfile /app/firehose
23
23
24
24
-
WORKDIR /app
24
24
+
# Stage 2: Minimal runtime
25
25
+
FROM alpine:3.22
25
26
26
26
-
# Copy workspace and dependencies from builder
27
27
-
COPY --from=builder /app /app
28
28
-
29
29
-
WORKDIR /app/apps/firehose-service
27
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
34
-
# Start the firehose service
35
35
-
CMD ["bun", "run", "start"]
32
32
+
CMD ["firehose"]
+2
-82
apps/main-app/src/lib/ignore-patterns.ts
reviewed
···
1
1
import ignore, { type Ignore } from 'ignore'
2
2
-
import { readFileSync, existsSync } from 'fs'
3
3
-
import { join } from 'path'
4
4
-
5
5
-
interface IgnoreConfig {
6
6
-
version: string
7
7
-
description: string
8
8
-
patterns: string[]
9
9
-
}
10
10
-
11
11
-
/**
12
12
-
* Load default ignore patterns from the .wispignore.json file in the monorepo root
13
13
-
*/
14
14
-
function loadDefaultPatterns(): string[] {
15
15
-
try {
16
16
-
// Path to the default ignore patterns JSON file (monorepo root, 3 levels up from this file)
17
17
-
const defaultJsonPath = join(__dirname, '../../../../.wispignore.json')
18
18
-
19
19
-
if (!existsSync(defaultJsonPath)) {
20
20
-
console.warn('⚠️ Default .wispignore.json not found, using hardcoded patterns')
21
21
-
return getHardcodedPatterns()
22
22
-
}
23
23
-
24
24
-
const contents = readFileSync(defaultJsonPath, 'utf-8')
25
25
-
const config: IgnoreConfig = JSON.parse(contents)
26
26
-
return config.patterns
27
27
-
} catch (error) {
28
28
-
console.error('Failed to load default ignore patterns:', error)
29
29
-
return getHardcodedPatterns()
30
30
-
}
31
31
-
}
32
32
-
33
33
-
/**
34
34
-
* Hardcoded fallback patterns (same as in .wispignore.json)
35
35
-
*/
36
36
-
function getHardcodedPatterns(): string[] {
37
37
-
return [
38
38
-
'.git',
39
39
-
'.git/**',
40
40
-
'.github',
41
41
-
'.github/**',
42
42
-
'.gitlab',
43
43
-
'.gitlab/**',
44
44
-
'.DS_Store',
45
45
-
'.wisp.metadata.json',
46
46
-
'.env',
47
47
-
'.env.*',
48
48
-
'node_modules',
49
49
-
'node_modules/**',
50
50
-
'Thumbs.db',
51
51
-
'desktop.ini',
52
52
-
'._*',
53
53
-
'.Spotlight-V100',
54
54
-
'.Spotlight-V100/**',
55
55
-
'.Trashes',
56
56
-
'.Trashes/**',
57
57
-
'.fseventsd',
58
58
-
'.fseventsd/**',
59
59
-
'.cache',
60
60
-
'.cache/**',
61
61
-
'.temp',
62
62
-
'.temp/**',
63
63
-
'.tmp',
64
64
-
'.tmp/**',
65
65
-
'__pycache__',
66
66
-
'__pycache__/**',
67
67
-
'*.pyc',
68
68
-
'.venv',
69
69
-
'.venv/**',
70
70
-
'venv',
71
71
-
'venv/**',
72
72
-
'env',
73
73
-
'env/**',
74
74
-
'*.swp',
75
75
-
'*.swo',
76
76
-
'*~',
77
77
-
'.tangled',
78
78
-
'.tangled/**',
79
79
-
]
80
80
-
}
2
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
100
-
// Add default patterns
101
101
-
const defaultPatterns = loadDefaultPatterns()
102
102
-
ig.add(defaultPatterns)
22
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
reviewed
···
15
15
type FileUploadResult
16
16
} from '@wispplace/fs-utils';
17
17
import { computeCID, extractBlobMap, shouldCompressFile, compressFile, extractSubfsUris } from '@wispplace/atproto-utils';
18
18
-
import { MAX_SITE_SIZE, MAX_FILE_COUNT, MAX_FILE_SIZE } from '@wispplace/constants';
18
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
48
-
// Default ignore patterns
49
49
-
const DEFAULT_IGNORE_PATTERNS = [
50
50
-
'.git', '.git/**', '.github', '.github/**', '.gitlab', '.gitlab/**',
51
51
-
'.DS_Store', '.wisp-metadata.json', '.env', '.env.*',
52
52
-
'node_modules', 'node_modules/**', 'Thumbs.db', 'desktop.ini',
53
53
-
'._*', '.Spotlight-V100/**', '.Trashes/**', '.fseventsd/**',
54
54
-
'.cache/**', '.temp/**', '.tmp/**', '__pycache__/**', '*.pyc',
55
55
-
'.venv/**', 'venv/**', '*.swp', '*.swo', '*~', '.tangled/**',
56
56
-
'.wispignore'
57
57
-
];
58
48
59
49
function createIgnoreMatcher(siteDir: string): Ignore {
60
50
const ig = ignore();
+1
-1
cli/package.json
reviewed
···
1
1
{
2
2
"name": "wispctl",
3
3
-
"version": "1.0.6",
3
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
reviewed
···
31
31
// Compression settings
32
32
export const GZIP_COMPRESSION_LEVEL = 9;
33
33
34
34
+
// Default ignore patterns for file uploads
35
35
+
export const DEFAULT_IGNORE_PATTERNS: string[] = [
36
36
+
'.git',
37
37
+
'.git/**',
38
38
+
'.github',
39
39
+
'.github/**',
40
40
+
'.gitlab',
41
41
+
'.gitlab/**',
42
42
+
'.DS_Store',
43
43
+
'.wisp.metadata.json',
44
44
+
'.wisp-metadata.json',
45
45
+
'.env',
46
46
+
'.env.*',
47
47
+
'node_modules',
48
48
+
'node_modules/**',
49
49
+
'Thumbs.db',
50
50
+
'desktop.ini',
51
51
+
'._*',
52
52
+
'.Spotlight-V100',
53
53
+
'.Spotlight-V100/**',
54
54
+
'.Trashes',
55
55
+
'.Trashes/**',
56
56
+
'.fseventsd',
57
57
+
'.fseventsd/**',
58
58
+
'.cache',
59
59
+
'.cache/**',
60
60
+
'.temp',
61
61
+
'.temp/**',
62
62
+
'.tmp',
63
63
+
'.tmp/**',
64
64
+
'__pycache__',
65
65
+
'__pycache__/**',
66
66
+
'*.pyc',
67
67
+
'.venv',
68
68
+
'.venv/**',
69
69
+
'venv',
70
70
+
'venv/**',
71
71
+
'env',
72
72
+
'env/**',
73
73
+
'*.swp',
74
74
+
'*.swo',
75
75
+
'*~',
76
76
+
'.tangled',
77
77
+
'.tangled/**',
78
78
+
'.wispignore',
79
79
+
];
80
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
reviewed
···
1
1
{
2
2
"name": "create-wisp",
3
3
-
"version": "1.0.6",
3
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
13
-
"wispctl": "^1.0.6"
13
13
+
"wispctl": "^1.0.8"
14
14
}
15
15
}