TPTIP-4: учесть удаление страницы-заглушки из main
All checks were successful
peppa/lint lint: success за 1с
peppa/test test: success за 1с
peppa/build build: success за 0с
ci / checks (pull_request) Successful in 7s
deploy / deploy (pull_request) Successful in 1m1s

This commit is contained in:
Peppa 2026-11-17 11:27:14 +05:00
parent c984a7c14e
commit d192fb79c5
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ FROM node:24-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY profile-server.mjs server.js index.html gym-plan.i18n.js manifest.webmanifest sw.js icon.svg about.html about.i18n.json ./
COPY profile-server.mjs server.js index.html gym-plan.i18n.js manifest.webmanifest sw.js icon.svg ./
COPY profile ./profile
RUN npm run build && npm prune --omit=dev
RUN mkdir /data && chown node:node /data

View File

@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url';
import { ProfileService, InputError } from './profile/service.mjs';
if (process.env.SENTRY_DSN) Sentry.init({dsn:process.env.SENTRY_DSN,release:process.env.SENTRY_RELEASE,environment:process.env.SENTRY_ENVIRONMENT || 'dev',sendDefaultPii:false,beforeSend(event){ delete event.request; delete event.user; return event; }});
const root = fileURLToPath(new URL('.',import.meta.url));
const files = new Map([['/profile/tracker-guard.js',['profile/tracker-guard.js','text/javascript']],['/gym-plan.i18n.js',['gym-plan.i18n.js','text/javascript']],['/manifest.webmanifest',['manifest.webmanifest','application/manifest+json']],['/sw.js',['sw.js','text/javascript']],['/icon.svg',['icon.svg','image/svg+xml']],['/about.html',['about.html','text/html']],['/about.i18n.json',['about.i18n.json','application/json']],['/',['profile/index.html','text/html']],['/profile/app.js',['profile/app.js','text/javascript']],['/profile/telemetry.js',['profile/telemetry.js','text/javascript']],['/profile/style.css',['profile/style.css','text/css']],['/profile/i18n.json',['profile/i18n.json','application/json']]]);
const files = new Map([['/profile/tracker-guard.js',['profile/tracker-guard.js','text/javascript']],['/gym-plan.i18n.js',['gym-plan.i18n.js','text/javascript']],['/manifest.webmanifest',['manifest.webmanifest','application/manifest+json']],['/sw.js',['sw.js','text/javascript']],['/icon.svg',['icon.svg','image/svg+xml']],['/',['profile/index.html','text/html']],['/profile/app.js',['profile/app.js','text/javascript']],['/profile/telemetry.js',['profile/telemetry.js','text/javascript']],['/profile/style.css',['profile/style.css','text/css']],['/profile/i18n.json',['profile/i18n.json','application/json']]]);
export function createApp({database,secure = process.env.NODE_ENV === 'production'} = {}) {
if (!database) mkdirSync(process.env.DATA_DIR || resolve(root,'data'),{recursive:true,mode:0o700});
const service = new ProfileService(database || resolve(process.env.DATA_DIR || resolve(root,'data'),'profile.sqlite'));