monitor-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev 11d38ef641b0
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 9383f719c9b37ff76411858f
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
vite.config.ts
import crypto from "node:crypto";
import fs from "node:fs";
import { defineConfig, type Plugin } from "vite";
import react from "@vitejs/plugin-react";

// Writes the service worker at build time with the list of the app's own files, so an installed
// Monitor opens fast and can show alerts from the background. Monitor itself needs a connection.
function serviceWorker(): Plugin {
  return {
    name: "monitor-sw",
    generateBundle(_, bundle) {
      const pub = fs.readdirSync("public", { recursive: true, encoding: "utf8" }).filter((f) => fs.statSync(`public/${f}`).isFile());
      const shell = ["/", ...[...Object.keys(bundle).filter((f) => f !== "index.html"), ...pub].map((f) => `/${f}`)];
      const hash = crypto.createHash("sha256").update(shell.join("\n"));
      for (const f of pub) hash.update(fs.readFileSync(`public/${f}`));
      const source = fs.readFileSync("src/sw.js", "utf8")
        .replace("__VERSION__", hash.digest("hex").slice(0, 12))
        .replace("__SHELL__", JSON.stringify(shell));
      this.emitFile({ type: "asset", fileName: "sw.js", source });
    },
  };
}

export default defineConfig({
  plugins: [react(), serviceWorker()],
  build: { target: "es2020", chunkSizeWarningLimit: 1500 },
});

Change history

Move store links to openapps.free
11d38ef641 · 17 hours ago
Release with preview
41c8af3ee5 · 19 hours ago
Bind agent address in policy
5b2d792529 · 19 hours ago
Use OpenApps service URLs and add contribution strip (retry)
be4477dcb3 · 19 hours ago
Bounded source sync
5c9ec00c29 · 2 days ago
Bounded source sync
b33aa231f4 · 2 days ago
Bounded source sync
6cb67b3c8e · 2 days ago
Bounded source sync
e054acaa29 · 2 days ago