Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9ece021d4 | ||
|
|
f300b8d9f5 |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "instaarchive-viewer",
|
"name": "instaarchive-viewer",
|
||||||
"version": "1.6.0",
|
"version": "1.6.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "instaarchive-viewer",
|
"name": "instaarchive-viewer",
|
||||||
"version": "1.6.0",
|
"version": "1.6.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/vite": "^4.1.14",
|
"@tailwindcss/vite": "^4.1.14",
|
||||||
"@vitejs/plugin-react": "^5.0.4",
|
"@vitejs/plugin-react": "^5.0.4",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "instaarchive-viewer",
|
"name": "instaarchive-viewer",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.6.0",
|
"version": "1.6.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --port=3000 --host=0.0.0.0",
|
"dev": "vite --port=3000 --host=0.0.0.0",
|
||||||
|
|||||||
@@ -80,10 +80,16 @@ app.use((req, res, next) => {
|
|||||||
"default-src 'self'",
|
"default-src 'self'",
|
||||||
"img-src 'self' blob: data:",
|
"img-src 'self' blob: data:",
|
||||||
"media-src 'self' blob: data:",
|
"media-src 'self' blob: data:",
|
||||||
"script-src 'self'",
|
// 'wasm-unsafe-eval' permits WebAssembly compilation without allowing
|
||||||
|
// eval() of JavaScript. The xz decompressor used for Instaloader's
|
||||||
|
// .json.xz sidecars is WebAssembly, embedded as a data: URL it fetches at
|
||||||
|
// startup — so connect-src must allow data: too. Without both, decoding
|
||||||
|
// fails with a bare "TypeError: Failed to fetch" and every archive silently
|
||||||
|
// loses its captions, story flags and profile metadata.
|
||||||
|
"script-src 'self' 'wasm-unsafe-eval'",
|
||||||
"style-src 'self' 'unsafe-inline'",
|
"style-src 'self' 'unsafe-inline'",
|
||||||
"font-src 'self'",
|
"font-src 'self'",
|
||||||
"connect-src 'self'",
|
"connect-src 'self' data:",
|
||||||
"worker-src 'self' blob:",
|
"worker-src 'self' blob:",
|
||||||
"frame-ancestors 'self'",
|
"frame-ancestors 'self'",
|
||||||
"object-src 'none'",
|
"object-src 'none'",
|
||||||
|
|||||||
+1
-1
@@ -632,7 +632,7 @@ export default function App() {
|
|||||||
{!isScanning && (
|
{!isScanning && (
|
||||||
<footer className="max-w-5xl mx-auto px-4 py-12 text-center text-xs text-gray-400 space-y-4 text-black">
|
<footer className="max-w-5xl mx-auto px-4 py-12 text-center text-xs text-gray-400 space-y-4 text-black">
|
||||||
<div className="flex flex-wrap justify-center gap-x-4 gap-y-2 uppercase tracking-tight text-black"><span>Meta</span><span>About</span><span>Blog</span><span>Jobs</span><span>Help</span><span>API</span><span>Privacy</span><span>Terms</span><span>Locations</span><span>Instagram Lite</span><span>Threads</span><span>Contact Uploading & Non-Users</span><span>Meta Verified</span></div>
|
<div className="flex flex-wrap justify-center gap-x-4 gap-y-2 uppercase tracking-tight text-black"><span>Meta</span><span>About</span><span>Blog</span><span>Jobs</span><span>Help</span><span>API</span><span>Privacy</span><span>Terms</span><span>Locations</span><span>Instagram Lite</span><span>Threads</span><span>Contact Uploading & Non-Users</span><span>Meta Verified</span></div>
|
||||||
<div className="text-black/40 text-black">© 2026 InstaArchive Viewer</div>
|
<div className="text-black/40 text-black">© 2026 InstaArchive Viewer · v{__APP_VERSION__}</div>
|
||||||
</footer>
|
</footer>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ const updateSW = registerSW({
|
|||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
r.update();
|
r.update();
|
||||||
}, 60 * 60 * 1000);
|
}, 60 * 60 * 1000);
|
||||||
console.log('[PWA] Service Worker registered and update interval set.');
|
console.log(`[PWA] v${__APP_VERSION__} registered; hourly update checks enabled.`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onNeedRefresh() {
|
onNeedRefresh() {
|
||||||
|
|||||||
Vendored
+9
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* Build-time constants.
|
||||||
|
*
|
||||||
|
* This file deliberately has no imports or exports: that keeps it an ambient
|
||||||
|
* script rather than a module, so the declarations below are global.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Release version, injected by `define` in vite.config.ts. */
|
||||||
|
declare const __APP_VERSION__: string;
|
||||||
@@ -3,9 +3,24 @@ import react from '@vitejs/plugin-react';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {defineConfig} from 'vite';
|
import {defineConfig} from 'vite';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
import { VitePWA } from 'vite-plugin-pwa';
|
||||||
|
import { createRequire } from 'module';
|
||||||
|
|
||||||
|
const { version } = createRequire(import.meta.url)('./package.json');
|
||||||
|
|
||||||
export default defineConfig(() => {
|
export default defineConfig(() => {
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
* The release version, compiled into the client.
|
||||||
|
*
|
||||||
|
* This is load-bearing, not cosmetic. The service worker precaches
|
||||||
|
* index.html *including its response headers*, so a server-side header
|
||||||
|
* change (a CSP fix, say) never reaches an installed PWA: nothing in the
|
||||||
|
* client build changed, the precache manifest is byte-identical, and the
|
||||||
|
* worker has no reason to update. Baking the version in means every release
|
||||||
|
* changes the bundle hash, which changes index.html, which invalidates the
|
||||||
|
* precache and re-fetches the shell with current headers.
|
||||||
|
*/
|
||||||
|
define: { __APP_VERSION__: JSON.stringify(version) },
|
||||||
plugins: [
|
plugins: [
|
||||||
react(),
|
react(),
|
||||||
tailwindcss(),
|
tailwindcss(),
|
||||||
|
|||||||
Reference in New Issue
Block a user