diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 07ff3ce..0000000 --- a/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# syntax=docker/dockerfile:1 - -# ---- Build: install deps from the lockfile and produce dist/ ---- -FROM node:22-alpine AS build -WORKDIR /app -COPY package.json package-lock.json ./ -RUN npm ci --no-audit --no-fund -COPY index.html vite.config.js ./ -COPY public ./public -COPY src ./src -RUN npm run build - -# ---- Serve: static files on nginx, as a non-root user, port 8080 ---- -FROM nginxinc/nginx-unprivileged:1.27-alpine -COPY nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=build /app/dist /usr/share/nginx/html -EXPOSE 8080 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget -qO- http://127.0.0.1:8080/healthz || exit 1 diff --git a/README.md b/README.md index 79df9b0..e1f7ba6 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ -# ofsaver +# ofsaver — extension + +Browser extension: personal OnlyFans downloader (DRM/Widevine + plain media). +The marketing/download site lives separately in `collector/landing`. + +## Layout + +- `ext/` — MV3 extension source. `ext/manifest.json` is the single source of + truth for the version; `ext/content.js` carries a matching `ofsaverV` marker. +- `scripts/release.mjs` — release flow: bumps the version, rebuilds + `ofsaver-extension.zip` into the landing repo's `public/`, commits, tags + `vX.Y.Z` and pushes both repos. + +## Release + +```sh +node scripts/release.mjs patch # or minor / major / none +``` + +Run from a clean tree on `main`. diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 4be828f..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,7 +0,0 @@ -services: - web: - build: . - image: ofsaver:latest - restart: unless-stopped - ports: - - "${PORT:-8080}:8080" diff --git a/index.html b/index.html deleted file mode 100644 index cc89bef..0000000 --- a/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - ofsaver — OnlyFans downloader for Chrome - - - - - - - - - -
- - - diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 481d403..0000000 --- a/nginx.conf +++ /dev/null @@ -1,38 +0,0 @@ -server { - listen 8080; - server_name _; - root /usr/share/nginx/html; - index index.html; - - server_tokens off; - add_header X-Content-Type-Options "nosniff" always; - add_header X-Frame-Options "SAMEORIGIN" always; - add_header Referrer-Policy "strict-origin-when-cross-origin" always; - - gzip on; - gzip_comp_level 6; - gzip_min_length 1024; - gzip_types text/plain text/css application/javascript application/json image/svg+xml; - - # Hashed build output never changes under the same name: cache it for a year. - location /_app/ { - try_files $uri =404; - add_header Cache-Control "public, max-age=31536000, immutable"; - add_header X-Content-Type-Options "nosniff" always; - } - - location = /healthz { - access_log off; - default_type text/plain; - return 200 "ok\n"; - } - - # The page itself is always revalidated so a deploy shows up at once. - location / { - try_files $uri $uri/ /index.html; - add_header Cache-Control "no-cache"; - add_header X-Content-Type-Options "nosniff" always; - add_header X-Frame-Options "SAMEORIGIN" always; - add_header Referrer-Policy "strict-origin-when-cross-origin" always; - } -} diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png deleted file mode 100644 index 7a86265..0000000 Binary files a/public/apple-touch-icon.png and /dev/null differ diff --git a/public/assets/app-icon.svg b/public/assets/app-icon.svg deleted file mode 100644 index b787374..0000000 --- a/public/assets/app-icon.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/public/assets/logo-light.svg b/public/assets/logo-light.svg deleted file mode 100644 index 1eb9eda..0000000 --- a/public/assets/logo-light.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/public/assets/logo.svg b/public/assets/logo.svg deleted file mode 100644 index ae9eed9..0000000 --- a/public/assets/logo.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/public/favicon.png b/public/favicon.png deleted file mode 100644 index 4c66037..0000000 Binary files a/public/favicon.png and /dev/null differ diff --git a/public/ofsaver-extension.zip b/public/ofsaver-extension.zip deleted file mode 100644 index 3937efb..0000000 Binary files a/public/ofsaver-extension.zip and /dev/null differ diff --git a/public/og.png b/public/og.png deleted file mode 100644 index aa73094..0000000 Binary files a/public/og.png and /dev/null differ diff --git a/scripts/release.mjs b/scripts/release.mjs new file mode 100644 index 0000000..b87248d --- /dev/null +++ b/scripts/release.mjs @@ -0,0 +1,59 @@ +#!/usr/bin/env node +// Release flow for the ofsaver extension: +// node scripts/release.mjs [patch|minor|major|none] +// Bumps the version (manifest.json is the source of truth, content.js's +// ofsaverV marker is kept in sync), rebuilds ofsaver-extension.zip into the +// landing repo's public/ (served by the site), then commits, tags vX.Y.Z and +// pushes both repos. +import { readFileSync, writeFileSync, existsSync, mkdirSync, cpSync, rmSync } from "node:fs"; +import { execSync } from "node:child_process"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const root = path.dirname(path.dirname(fileURLToPath(import.meta.url))); +const ext = path.join(root, "ext"); +const landing = path.resolve(root, "..", "landing"); +const landingPublic = path.join(landing, "public"); + +const bump = process.argv[2] ?? "patch"; +if (!["patch", "minor", "major", "none"].includes(bump)) { + console.error("usage: node scripts/release.mjs [patch|minor|major|none]"); + process.exit(1); +} + +const manifestPath = path.join(ext, "manifest.json"); +const manifest = JSON.parse(readFileSync(manifestPath, "utf8")); +let [maj, min, pat] = manifest.version.split(".").map(Number); +if (bump === "patch") pat += 1; +else if (bump === "minor") { min += 1; pat = 0; } +else if (bump === "major") { maj += 1; min = 0; pat = 0; } +const version = `${maj}.${min}.${pat}`; +manifest.version = version; +writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n"); + +const contentPath = path.join(ext, "content.js"); +const content = readFileSync(contentPath, "utf8"); +writeFileSync(contentPath, content.replace(/dataset\.ofsaverV = "[^"]+"/, `dataset.ofsaverV = "${version}"`)); + +// zip: ofsaver/ folder at the archive root (matches the site's install steps) +const staging = path.join(root, ".release-tmp"); +rmSync(staging, { recursive: true, force: true }); +mkdirSync(staging, { recursive: true }); +cpSync(ext, path.join(staging, "ofsaver"), { recursive: true }); +execSync(`find '${staging}' -name .DS_Store -delete`); +mkdirSync(landingPublic, { recursive: true }); +execSync(`cd '${staging}' && zip -qr '${path.join(landingPublic, "ofsaver-extension.zip")}' ofsaver`); +rmSync(staging, { recursive: true, force: true }); + +const run = (cmd, cwd = root) => execSync(cmd, { cwd, stdio: "inherit" }); +run("git add -A"); +run(`git commit -m "v${version}\n\nCo-Authored-By: Claude Code " || true`); +run(`git tag v${version}`); +run("git push origin main"); +run(`git push origin v${version}`); +if (existsSync(path.join(landing, ".git"))) { + run("git add -A", landing); + run(`git commit -m "extension v${version}\n\nCo-Authored-By: Claude Code " || true`, landing); + run("git push origin main", landing); +} +console.log(`released ${version}`); diff --git a/src/App.jsx b/src/App.jsx deleted file mode 100644 index d8ad1ec..0000000 --- a/src/App.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import { Nav, Hero, Platforms, FactBand, Compare, Mobile, Showcase, Features, Safety, Pricing, Reviews, Faq, Cta, Footer } from './components/Sections.jsx' -import { Install } from './components/Install.jsx' - -export default function App() { - return ( - <> -