diff --git a/bin/build b/bin/build index 8ee6a57b..319a97c6 100755 --- a/bin/build +++ b/bin/build @@ -9,10 +9,10 @@ export VITE_BRANCH="${WORKERS_CI_BRANCH:-${CF_PAGES_BRANCH:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null)}}" export VITE_VERSION="${WORKERS_CI_COMMIT_SHA:-${CF_PAGES_COMMIT_SHA:-$(git rev-parse HEAD 2>/dev/null)}}" -# VITE_SITE selects the build flavor (branding/data). It is set per-Worker in +# VITE_CATEGORY selects the build flavor (branding/data). It is set per-Worker in # the Workers Builds environment variables; default to topology if unset. -export VITE_SITE="${VITE_SITE:-topology}" -echo "Building site '${VITE_SITE}' (branch=${VITE_BRANCH}, version=${VITE_VERSION})" +export VITE_CATEGORY="${VITE_CATEGORY:-topology}" +echo "Building site '${VITE_CATEGORY}' (branch=${VITE_BRANCH}, version=${VITE_VERSION})" # Workers Builds (and the GitHub workflows) run `pnpm install` before invoking # this script, so only install when dependencies are actually missing — e.g. diff --git a/bin/e2e b/bin/e2e index de93ae41..4274d409 100755 --- a/bin/e2e +++ b/bin/e2e @@ -24,8 +24,8 @@ fi function baseUrl() { case "$1" in pages | production) echo "https://topology.pi-base.org" ;; - workers) echo "https://pi-base-topology.fragrant-boat-7068.workers.dev" ;; - graphs) echo "https://pi-base-graphs.fragrant-boat-7068.workers.dev" ;; + workers) echo "https://topology.pi-base.workers.dev" ;; + graphs) echo "https://graphs.pi-base.workers.dev" ;; preview) echo "${PREVIEW_URL:-}" ;; *) echo "" ;; esac diff --git a/doc/deployment.md b/doc/deployment.md index 4b96d85e..b856c7ae 100644 --- a/doc/deployment.md +++ b/doc/deployment.md @@ -4,12 +4,14 @@ The viewer is migrating from Cloudflare Pages to **Cloudflare Workers** (Static Assets). Two Workers are produced from this single repo, selected at build time -by the `VITE_SITE` flavor flag (see `packages/viewer/src/site.ts`): +by the `VITE_CATEGORY` flavor flag (see `categoryConfig` in +`packages/viewer/src/constants.ts`; unset defaults to `topology`, unsupported +values fail the build): -| Worker | `VITE_SITE` | wrangler env | Site | -| ------------------ | ----------- | ------------ | -------------------------- | -| `pi-base-topology` | `topology` | `topology` | `topology.pi-base.org` | -| `pi-base-graphs` | `graphs` | `graphs` | `graphs.pi-base.org` (TBD) | +| Worker | `VITE_CATEGORY` | wrangler env | Site | +| ---------- | --------------- | ------------ | ----------------------------------------------------------- | +| `topology` | `topology` | `topology` | `topology.pi-base.org` | +| `graphs` | `graphs` | `graphs` | `graphs.pi-base.workers.dev` (`graphs.pi-base.org` TBD) | Worker config lives in `packages/viewer/wrangler.jsonc` (Static Assets + named environments). Builds run through `bin/build`, which reads the `WORKERS_CI_*` @@ -19,7 +21,7 @@ variables Workers Builds injects for branch/commit metadata. ```bash pnpm --filter core build -VITE_SITE=topology pnpm --filter viewer build +VITE_CATEGORY=topology pnpm --filter viewer build pnpm --filter viewer run cf:deploy:topology # or cf:deploy:graphs ``` @@ -30,7 +32,7 @@ Each Worker is connected to this repo through Cloudflare Workers Builds - **Root directory:** repo root - **Build command:** `bin/build` -- **Build environment variable:** `VITE_SITE=topology` (or `graphs`) +- **Build environment variable:** `VITE_CATEGORY=topology` (or `graphs`) - **Deploy command:** `pnpm --filter viewer run cf:deploy:topology` (or `:graphs`) - **Non-production (preview) deploy command:** `pnpm --filter viewer run cf:preview:topology` (or `:graphs`) @@ -69,5 +71,9 @@ Add a semver tag to trigger the [Publish Images CI step](https://github.com/pi-b ## Data -Changes to the data repo invoke the released [compile action](https://github.com/pi-base/data/blob/6cc73f720751910ad4ede8a320c1eeff975ee5c3/.github/workflows/compile.yml#L12), -and upload the compiled bundles to the `pi-base-bundles` S3 bucket. +Changes to a data repo ([pi-base/data](https://github.com/pi-base/data), +[pi-base/data-graphs](https://github.com/pi-base/data-graphs)) invoke that +repo's compile workflow, which uploads the compiled bundle to the +corresponding category's public R2 bucket — the `bundleHost` values in +`packages/viewer/src/constants.ts`. (`pi-base/data` also uploads to the legacy +`pi-base-bundles` S3 bucket.) diff --git a/doc/testing.md b/doc/testing.md index e939ec7f..a02bff9f 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -74,8 +74,8 @@ against: | -------------------- | ------------------------------------ | ------- | | `local` (default) | `http://localhost:5173` | fixture | | `pages` | `https://topology.pi-base.org` | live | -| `workers` | `pi-base-topology.…workers.dev` | live | -| `graphs` | `pi-base-graphs.…workers.dev` | live | +| `workers` | `topology.pi-base.workers.dev` | live | +| `graphs` | `graphs.pi-base.workers.dev` | live | | `preview` | `$PREVIEW_URL` | live | The whole suite runs in both modes; assertions are written to hold against the @@ -104,8 +104,8 @@ health-checking each first: $ ./bin/e2e graphs # A Workers preview ("wrangler versions upload" prints a per-version URL) - $ PREVIEW_URL=https://-pi-base-topology..workers.dev ./bin/e2e preview - $ ./bin/e2e https://-pi-base-topology..workers.dev + $ PREVIEW_URL=https://-topology.pi-base.workers.dev ./bin/e2e preview + $ ./bin/e2e https://-topology.pi-base.workers.dev ``` Equivalently, per-target package scripts: `pnpm --filter viewer run diff --git a/packages/viewer/cypress.config.ts b/packages/viewer/cypress.config.ts index 378def5d..0defd548 100644 --- a/packages/viewer/cypress.config.ts +++ b/packages/viewer/cypress.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress' // The account's workers.dev subdomain for the viewer Workers (see // doc/deployment.md). Used to address the deployed Workers directly. -const WORKERS_SUBDOMAIN = 'fragrant-boat-7068.workers.dev' +const WORKERS_SUBDOMAIN = 'pi-base.workers.dev' type Mode = 'fixture' | 'live' type Target = { baseUrl: string; mode: Mode } @@ -26,12 +26,12 @@ function targetFor(name: string): Target { return { baseUrl: 'https://topology.pi-base.org', mode: 'live' } case 'workers': return { - baseUrl: `https://pi-base-topology.${WORKERS_SUBDOMAIN}`, + baseUrl: `https://topology.${WORKERS_SUBDOMAIN}`, mode: 'live', } case 'graphs': return { - baseUrl: `https://pi-base-graphs.${WORKERS_SUBDOMAIN}`, + baseUrl: `https://graphs.${WORKERS_SUBDOMAIN}`, mode: 'live', } case 'preview': { diff --git a/packages/viewer/package.json b/packages/viewer/package.json index e73870f2..b22832a5 100644 --- a/packages/viewer/package.json +++ b/packages/viewer/package.json @@ -38,6 +38,7 @@ "hast-to-hyperscript": "^10.0.3", "hyperscript": "^2.0.2", "jquery": "^3.7.1", + "markdown-it": "^14.2.0", "rehype-katex": "^6.0.3", "remark-rehype": "^10.1.0", "unified": "^10.1.2", @@ -53,6 +54,7 @@ "@types/debug": "^4.1.13", "@types/hyperscript": "0.0.7", "@types/katex": "^0.16.8", + "@types/markdown-it": "^14.1.2", "@types/page": "^1.11.9", "@types/unist": "^2.0.10", "cypress": "^15.18.0", diff --git a/packages/viewer/src/app.html b/packages/viewer/src/app.html index 1d198b01..69372564 100644 --- a/packages/viewer/src/app.html +++ b/packages/viewer/src/app.html @@ -8,13 +8,13 @@ + content="A community database of mathematical objects, with powerful search and automated proof deduction." /> + content="A community database of mathematical objects, with powerful search and automated proof deduction." /> diff --git a/packages/viewer/src/components/Dev/Explore.svelte b/packages/viewer/src/components/Dev/Explore.svelte index 4d774614..b434ee54 100644 --- a/packages/viewer/src/components/Dev/Explore.svelte +++ b/packages/viewer/src/components/Dev/Explore.svelte @@ -2,6 +2,7 @@ import context from '@/context' import Log from './Log.svelte' import { reset } from '@/util' + import { categoryConfig } from '@/constants' import { showLeanLinks, showRedundancy } from '@/stores/settings' const { spaces, properties, theorems, traits } = context() @@ -11,7 +12,7 @@ - + diff --git a/packages/viewer/src/components/Dev/Preview.svelte b/packages/viewer/src/components/Dev/Preview.svelte index 1bcf28db..bdcd76a9 100644 --- a/packages/viewer/src/components/Dev/Preview.svelte +++ b/packages/viewer/src/components/Dev/Preview.svelte @@ -73,10 +73,10 @@ This is a list of external references: {'{uid}'} - e.g. {'{S1}'} - for space 1 + for object 1
{'{S1|P2}'} - for space 1's value of property 2 + for object 1's value of property 2 diff --git a/packages/viewer/src/components/Footer.svelte b/packages/viewer/src/components/Footer.svelte index 63f84523..52777495 100644 --- a/packages/viewer/src/components/Footer.svelte +++ b/packages/viewer/src/components/Footer.svelte @@ -1,20 +1,26 @@
- Data © {new Date().getFullYear()} Steven Clontz and James Dabbs (CC-BY) | Software © {new Date().getFullYear()} James Dabbs (MIT License) | - GitHub + {@html md.renderInline( + categoryConfig.footer(new Date().getFullYear().toString()), + )}
Data last synchonized:
+ + diff --git a/packages/viewer/src/components/Home.svelte b/packages/viewer/src/components/Home.svelte index 74560233..ee4e75f7 100644 --- a/packages/viewer/src/components/Home.svelte +++ b/packages/viewer/src/components/Home.svelte @@ -1,126 +1,48 @@
-

π-Base

-

a community database of topological counterexamples

-
-

- ➜ Search spaces by name/description: - compactifications -

-

- ➜ Search spaces by properties: - non-metric continua -

-

- ➜ Find counterexamples: - connected spaces need not be path connected -

+

π-Base: {categoryConfig.subject}

+

{categoryConfig.slogan}

+
+ {#each categoryConfig.calloutFeatures as feature} +

+ ➜ {@html md.renderInline(feature)} +

+ {/each}
-
-

- Topology is a dense forest of counterexamples. A usable map of the forest - is a fine thing. -

-
- Paraphrased from Mary Ellen Rudin's review of - Counterexamples in Topology -
-

- - Dedicated to the memory of our friend and mentor Gary Gruenhage - (1947-2023). - -

-
-
-

Contributing

-

- π-Base's data and software are open-sourced on GitHub. We rely on - volunteers like yourself - to contribute new spaces, properties, and theorems. -

-

About Us

-

- The π-Base was founded in 2014 by its lead maintainer - James Dabbs. π-Base's lead - mathematical editor and contributing research software engineer - Steven Clontz - joined the project in 2017. -

-

Community

-

- The π-Base is part of the - code4math - community. Join the conversation on either the - code4math Zulip - or the - - π-Base GitHub Discussion board. -

-

- More databases may be discovered at the - Index of Mathematical DataBases. -

-

Special Acknowledgements

-

- Many people have contributed to this project, but a few individuals and - organizations deserve particular recognition: -

- + {#if categoryConfig.acknowledgement} +
+

+ {categoryConfig.acknowledgement.quote} +

+
+ {categoryConfig.acknowledgement.footer} +
+

+ + {categoryConfig.acknowledgement.dedication} + +

+
+
+ {/if} + {@html md.render(categoryConfig.homeContent)}
+ + diff --git a/packages/viewer/src/components/Nav.svelte b/packages/viewer/src/components/Nav.svelte index c3f67ef5..627c336d 100644 --- a/packages/viewer/src/components/Nav.svelte +++ b/packages/viewer/src/components/Nav.svelte @@ -1,8 +1,7 @@
-
- -
-
- -
-
- -
-

- Disclaimer: some questions cannot be answered in ZFC! -

+ {#if openQuestion} +
+ +
+
+ +
+
+ +
+

+ Disclaimer: some questions cannot be answered in ZFC! +

+ {:else} +

There are no open questions in this database.

+ {/if}
diff --git a/packages/viewer/src/components/Search/Results/NotFound.svelte b/packages/viewer/src/components/Search/Results/NotFound.svelte index 337a938b..7ab6a962 100644 --- a/packages/viewer/src/components/Search/Results/NotFound.svelte +++ b/packages/viewer/src/components/Search/Results/NotFound.svelte @@ -1,6 +1,6 @@
Cite as: - The pi-Base Community. - {title}. + The π-Base Community. + {categoryConfig.citeTitle}. Available at: {$page.url} (Accessed: {new Date().toISOString().split('T')[0]}). diff --git a/packages/viewer/src/components/Shared/References.svelte b/packages/viewer/src/components/Shared/References.svelte index 91318f16..da01cd96 100644 --- a/packages/viewer/src/components/Shared/References.svelte +++ b/packages/viewer/src/components/Shared/References.svelte @@ -1,7 +1,7 @@ @@ -14,7 +14,7 @@ {:else}
  • No references available. If appropriate, please consider contributingcontributing a reference.
  • {/each} diff --git a/packages/viewer/src/components/Spaces/Show.svelte b/packages/viewer/src/components/Spaces/Show.svelte index ef1a0f20..c4bac156 100644 --- a/packages/viewer/src/components/Spaces/Show.svelte +++ b/packages/viewer/src/components/Spaces/Show.svelte @@ -1,5 +1,6 @@ -

    Space

    +

    {categoryConfig.object}

    diff --git a/packages/viewer/src/components/Theorems/Converse.svelte b/packages/viewer/src/components/Theorems/Converse.svelte index 8f346d39..1ec33aa2 100644 --- a/packages/viewer/src/components/Theorems/Converse.svelte +++ b/packages/viewer/src/components/Theorems/Converse.svelte @@ -1,6 +1,6 @@ -

    Space S{space.id} | Property P{property.id}

    +

    {categoryConfig.object} S{space.id} | Property P{property.id}

    {#if proof} @@ -76,6 +76,6 @@ {:else} - Please consider contributing a proof or disproof - of this property. + Please consider contributing a proof + or disproof of this property. {/if} diff --git a/packages/viewer/src/constants.ts b/packages/viewer/src/constants.ts index c1d07495..03e712be 100644 --- a/packages/viewer/src/constants.ts +++ b/packages/viewer/src/constants.ts @@ -1,13 +1,153 @@ const { - VITE_BUNDLE_HOST = 'https://pub-65041ca69d744da88ade13abd31ad834.r2.dev', // TODO: push down to @pi-base/core? + VITE_BUNDLE_HOST, VITE_BUNDLE_SSE = 'false', VITE_BRANCH = 'unknown', VITE_MAIN_BRANCH = 'main', VITE_VERSION = 'unknown', + VITE_CATEGORY = 'topology', } = import.meta.env +interface CategoryConfig { + category: string + // Public host serving this category's compiled data bundles (each data repo's + // compile workflow publishes to its own R2 bucket) + bundleHost: string + object: string + objects: string + subject: string + slogan: string + citeTitle: string + contributingUrl: string + helpUrl: string + sentryUrl: string + calloutFeatures: string[] + homeContent: string + showQuestions: boolean + footer: (currentYear: string) => string + acknowledgement?: { + quote: string + footer: string + dedication: string + } +} + +const topologyConfig: CategoryConfig = { + category: 'topology', + bundleHost: 'https://pub-65041ca69d744da88ade13abd31ad834.r2.dev', + object: 'Space', + objects: 'Spaces', + subject: 'Topology', + slogan: 'a community database of topological counterexamples', + citeTitle: + 'π-Base Topology: a community database of topological counterexamples', + contributingUrl: + 'https://code4math.zulipchat.com/#narrow/channel/416467-pi-base/topic/Welcome.20new.20and.20potential.20contributors!.20.F0.9F.91.8B/with/544214230', + helpUrl: 'https://github.com/pi-base/data/wiki/', + sentryUrl: + 'https://0fa430dd1dc347e2a82c413d8e3acb75@o397472.ingest.sentry.io/5251960', + calloutFeatures: [ + 'Search spaces by name/description: [compactifications](https://topology.pi-base.org/spaces?text=compactification)', + 'Search spaces by properties: [non-metric continua](https://topology.pi-base.org/spaces?q=compact%20%2B%20connected%20%2B%20t_2%20%2B%20~metrizable)', + 'Find counterexamples: [connected spaces need not be path connected](https://topology.pi-base.org/theorems/T000040)', + ], + homeContent: ` +### Contributing + +π-Base's data and software are open-sourced on [GitHub](https://github.com/pi-base/). +We rely on [volunteers like yourself](https://github.com/pi-base/data/graphs/contributors) +to [contribute](https://code4math.zulipchat.com/#narrow/channel/416467-pi-base/topic/Welcome.20new.20and.20potential.20contributors!.20.F0.9F.91.8B/with/544214230) new spaces, properties, and theorems. + +### About Us + +The π-Base was founded in 2014 by its lead maintainer [James Dabbs](https://github.com/jamesdabbs). +π-Base's lead mathematical editor [Steven Clontz](https://clontz.org) joined the project in 2017. + +In 2026, [the π-Base project](https://pi-base.org) officially expanded to serve disciplines beyond topology. + +### Community + +The topology π-Base would not be possible without the volunteer efforts of our numerous +[contributors](https://github.com/pi-base/data/graphs/contributors). + +The π-Base is part of the [code4math](https://code4math.org) community. +Join the conversation on our +[code4math Zulip channel](https://code4math.zulipchat.com/#narrow/channel/416467-pi-base). + +More databases may be discovered at the [Index of Mathematical DataBases](https://mathbases.org/). + +### Special Acknowledgements + +Many people have contributed to this project, but a few individuals and organizations deserve particular recognition: + +* Steen and Seebach for writing the inspiration for this project, + [Counterexamples in Topology](https://en.wikipedia.org/wiki/Counterexamples_in_Topology). +* [Scott Varagona](http://www.montevallo.edu/staff-bio/scott-varagona/) for his heroic work serializing + *Counterexamples* into the first version of the π-Base. +* Steven and James' graduate advisor, [Gary Gruenhage](http://www.auburn.edu/~gruengf/), for all his support + and guidance. +* [Austin Mohr](http://austinmohr.com/home/) for his work and feedback using the π-Base as a pedagogical tool + and promoting us on [Math.StackExchange](https://math.stackexchange.com). +* Funding from the [University of South Alabama](https://www.southalabama.edu/) Faculty Development Council + from 2017-2018.`, + showQuestions: true, + footer: currentYear => ` +Data © ${currentYear} Steven Clontz and James Dabbs ([CC-BY](https://github.com/pi-base/data/blob/main/LICENSE.md)) | +Software © ${currentYear} James Dabbs ([MIT License](https://github.com/pi-base/web/blob/main/LICENSE.md)) | +[GitHub](https://github.com/pi-base)`, + acknowledgement: { + quote: + 'Topology is a dense forest of counterexamples. A usable map of the forest is a fine thing.', + footer: + "Paraphrased from Mary Ellen Rudin's review of *Counterexamples in Topology*", + dedication: + 'Dedicated to the memory of our friend and mentor Gary Gruenhage (1947-2023).', + }, +} + +const graphConfig: CategoryConfig = { + category: 'graphs', + bundleHost: 'https://pub-f9343081ef2f4afba3e09cc65216223c.r2.dev', + object: 'Graph', + objects: 'Graphs', + subject: 'Graph Theory', + slogan: 'a community database of graph classes', + citeTitle: 'π-Base Graph Theory', + // TODO: graph-specific contributing docs; must be an absolute URL or the + // prerenderer will crawl it as an internal link and 404 the build + contributingUrl: + 'https://code4math.zulipchat.com/#narrow/channel/416467-pi-base', + helpUrl: 'https://github.com/pi-base/data-graph/wiki/', + // Empty DSN disables Sentry until a graph-specific project exists + sentryUrl: '', + calloutFeatures: ['graphs are neat'], + homeContent: '# Contributing ...', + showQuestions: false, + footer: () => '', +} + +const configs: Record = { + topology: topologyConfig, + graphs: graphConfig, +} + +// Fails the build (during prerendering) rather than silently falling back to +// topology when VITE_CATEGORY is set but unsupported. Unset defaults above. +function selectConfig(category: string): CategoryConfig { + const config = configs[category] + if (!config) { + throw new Error( + `Unsupported VITE_CATEGORY '${category}'; expected one of: ${Object.keys( + configs, + ).join(', ')}`, + ) + } + return config +} + +export const categoryConfig = selectConfig(VITE_CATEGORY) + export const mainBranch = VITE_MAIN_BRANCH -export const defaultHost = VITE_BUNDLE_HOST +export const defaultHost = VITE_BUNDLE_HOST ?? categoryConfig.bundleHost export const build = { branch: VITE_BRANCH, @@ -16,11 +156,6 @@ export const build = { export const bundleSse = VITE_BUNDLE_SSE === 'true' -export const contributingUrl = `https://code4math.zulipchat.com/#narrow/channel/416467-pi-base/topic/Welcome.20new.20and.20potential.20contributors!.20.F0.9F.91.8B/with/544214230` -export const helpUrl = `https://github.com/pi-base/data/wiki/` -export const sentryIngest = - 'https://0fa430dd1dc347e2a82c413d8e3acb75@o397472.ingest.sentry.io/5251960' - // Used for Fuse searches export const searchWeights = { id: 3, diff --git a/packages/viewer/src/errors.ts b/packages/viewer/src/errors.ts index 56f56a7c..55d78621 100644 --- a/packages/viewer/src/errors.ts +++ b/packages/viewer/src/errors.ts @@ -1,5 +1,5 @@ import * as Sentry from '@sentry/browser' -import { build, sentryIngest } from '@/constants' +import { build, categoryConfig } from '@/constants' type Meta = Record @@ -14,7 +14,7 @@ export function log(): Handler { } export function sentry({ - dsn = sentryIngest, + dsn = categoryConfig.sentryUrl, environment, }: { dsn?: string diff --git a/packages/viewer/src/routes/(app)/spaces/all/+page.svelte b/packages/viewer/src/routes/(app)/spaces/all/+page.svelte index 9135d9f8..f041adbf 100644 --- a/packages/viewer/src/routes/(app)/spaces/all/+page.svelte +++ b/packages/viewer/src/routes/(app)/spaces/all/+page.svelte @@ -1,13 +1,14 @@ - +<Title title={categoryConfig.objects} /> -<h1>Spaces</h1> +<h1>{categoryConfig.objects}</h1> <List spaces={data.spaces} /> diff --git a/packages/viewer/src/site.ts b/packages/viewer/src/site.ts deleted file mode 100644 index 046b29f2..00000000 --- a/packages/viewer/src/site.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Per-deployment ("site") configuration, selected at build time via VITE_SITE. -// -// The viewer is built once per site (e.g. `VITE_SITE=graphs pnpm build`) and -// each build is deployed to its own Cloudflare Worker. For now the only -// difference is a branding label; this is the seam where data-bundle host, -// tagline, theme, etc. will diverge later. - -type SiteKey = 'topology' | 'graphs' - -type Site = { - key: SiteKey - label: string -} - -const sites: Record<SiteKey, Site> = { - topology: { key: 'topology', label: 'π-Base' }, - graphs: { key: 'graphs', label: 'π-Base (graphs)' }, -} - -const key = (import.meta.env.VITE_SITE ?? 'topology') as SiteKey - -export const site = sites[key] ?? sites.topology diff --git a/packages/viewer/wrangler.jsonc b/packages/viewer/wrangler.jsonc index 6215fbed..3bc27dd6 100644 --- a/packages/viewer/wrangler.jsonc +++ b/packages/viewer/wrangler.jsonc @@ -2,12 +2,13 @@ // Cloudflare Workers (Static Assets) configuration for the viewer. // // The same SvelteKit build (`.svelte-kit/cloudflare`) is deployed to two - // Workers via named environments. Cloudflare names an environment's Worker - // `<name>-<env>`, so these deploy as `pi-base-topology` and `pi-base-graphs`. + // Workers via named environments. Each environment sets an explicit `name`, + // so these deploy as `topology` and `graphs`, served at + // `(topology|graphs).pi-base.workers.dev`. // // Deploy: wrangler deploy --env topology (or --env graphs) // The per-site differences (branding, bundle host) are baked in at build time - // via the VITE_SITE env var, not configured here. + // via the VITE_CATEGORY env var, not configured here. "$schema": "./node_modules/wrangler/config-schema.json", "name": "pi-base", "main": ".svelte-kit/cloudflare/_worker.js", @@ -22,6 +23,7 @@ // and via the observability API). invocation_logs gives per-request // cpuTimeMs/wallTimeMs; traces give the auto I/O waterfall (bundle fetch). "topology": { + "name": "topology", "observability": { "enabled": true, "logs": { @@ -32,6 +34,7 @@ } }, "graphs": { + "name": "graphs", "observability": { "enabled": true, "logs": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c0231d9a..64e52675 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -202,6 +202,9 @@ importers: jquery: specifier: ^3.7.1 version: 3.7.1 + markdown-it: + specifier: ^14.2.0 + version: 14.2.0 rehype-katex: specifier: ^6.0.3 version: 6.0.3 @@ -242,6 +245,9 @@ importers: '@types/katex': specifier: ^0.16.8 version: 0.16.8 + '@types/markdown-it': + specifier: ^14.1.2 + version: 14.1.2 '@types/page': specifier: ^1.11.9 version: 1.11.9 @@ -1383,9 +1389,18 @@ packages: '@types/katex@0.16.8': resolution: {integrity: sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==} + '@types/linkify-it@5.0.0': + resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + + '@types/markdown-it@14.1.2': + resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + '@types/mdast@3.0.15': resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} + '@types/mdurl@2.0.0': + resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} + '@types/mime@1.3.5': resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} @@ -1506,6 +1521,7 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + deprecated: Potential CWE-502 - Update to 1.3.1 or higher '@vitest/coverage-v8@1.6.1': resolution: {integrity: sha512-6YeRZwuO4oTGKxD3bijok756oktHSIm3eczVVzNe3scqzuhLwltIF3S9ZL/vwOVIpURmU6SnZhziXXAfw8/Qlw==} @@ -1900,6 +1916,7 @@ packages: bootstrap@4.6.2: resolution: {integrity: sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==} + deprecated: This version of Bootstrap is no longer supported. Please upgrade to the latest version. peerDependencies: jquery: 1.9.1 - 3 popper.js: ^1.16.1 @@ -3069,6 +3086,7 @@ packages: glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@10.5.0: @@ -3082,12 +3100,12 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me global-dirs@3.0.1: resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} @@ -3753,6 +3771,9 @@ packages: linkify-it@3.0.3: resolution: {integrity: sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==} + linkify-it@5.0.1: + resolution: {integrity: sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==} + lint-staged@16.1.0: resolution: {integrity: sha512-HkpQh69XHxgCjObjejBT3s2ILwNjFx8M3nw+tJ/ssBauDlIpkx2RpqWSi1fBgkXLSSXnbR3iEq1NkVtpvV+FLQ==} engines: {node: '>=20.17'} @@ -3889,6 +3910,10 @@ packages: resolution: {integrity: sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==} hasBin: true + markdown-it@14.2.0: + resolution: {integrity: sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==} + hasBin: true + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -3920,6 +3945,9 @@ packages: mdurl@1.0.1: resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -4609,6 +4637,7 @@ packages: prebuild-install@7.1.2: resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} engines: {node: '>=10'} + deprecated: No longer maintained. Please contact the author of the relevant native addon; alternatives are available. hasBin: true prelude-ls@1.2.1: @@ -4684,6 +4713,10 @@ packages: pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -5360,6 +5393,7 @@ packages: tar@6.2.0: resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me terser@5.31.1: resolution: {integrity: sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==} @@ -5569,6 +5603,9 @@ packages: uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.3.2: resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} @@ -5675,6 +5712,7 @@ packages: uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true uvu@0.5.6: @@ -6876,10 +6914,19 @@ snapshots: '@types/katex@0.16.8': {} + '@types/linkify-it@5.0.0': {} + + '@types/markdown-it@14.1.2': + dependencies: + '@types/linkify-it': 5.0.0 + '@types/mdurl': 2.0.0 + '@types/mdast@3.0.15': dependencies: '@types/unist': 2.0.10 + '@types/mdurl@2.0.0': {} + '@types/mime@1.3.5': {} '@types/mime@3.0.4': {} @@ -9636,6 +9683,10 @@ snapshots: dependencies: uc.micro: 1.0.6 + linkify-it@5.0.1: + dependencies: + uc.micro: 2.1.0 + lint-staged@16.1.0: dependencies: chalk: 5.4.1 @@ -9821,6 +9872,15 @@ snapshots: mdurl: 1.0.1 uc.micro: 1.0.6 + markdown-it@14.2.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.1 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + math-intrinsics@1.1.0: {} mdast-util-definitions@5.1.2: @@ -9887,6 +9947,8 @@ snapshots: mdurl@1.0.1: {} + mdurl@2.0.0: {} + media-typer@0.3.0: {} memorystream@0.3.1: {} @@ -10742,6 +10804,8 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 + punycode.js@2.3.1: {} + punycode@2.3.1: {} pupa@3.1.0: @@ -11768,6 +11832,8 @@ snapshots: uc.micro@1.0.6: {} + uc.micro@2.1.0: {} + ufo@1.3.2: {} unbox-primitive@1.0.2:

    Spaces{categoryConfig.objects} {$spaces.all.length}