Skip to content

MultiWikiServer-wikiwise v0.6.0

Choose a tag to compare

@heino17 heino17 released this 12 Oct 13:53
· 28 commits to main since this release

MultiWikiServer-wikiwise v0.6.0

38 commits since 0.5.0 · 93 files changed · +8608 / −653.

The centre of gravity of this release is SimpleWiki: a wiki that is not a
TiddlyWiki but a small HTML shell that MWS serves itself, created in one click,
with versioned shell releases and an update banner. Beside it: importing a
SimpleWiki file, a hand-taken snapshot from the wiki dialog, a ?redirect=
after login, and a long row of admin-app and wording fixes. Template releases
no longer pile up.

Install

mkdir my-folder && cd my-folder
npm install https://github.com/heino17/MultiWikiServer-wikiwise/releases/download/v0.6.0/mws-wikiwise-0.6.0.tgz
npx mws init-data-folder
npx mws update-tiddlywiki
npx mws init-store
npx mws listen --listener

mws-wikiwise-0.6.0.tgz — 3,758,222 bytes

sha256  0d2a42f5f75fb9b9a8424e759f210bdfe9bdbe79ebaf332b708f676776b7131f

npx mws init-data-folder is not optional: MWS only starts if the data folder's
package.json is named @tiddlywiki/mws-instance, is marked private and
carries a 0.2.x version.

New

SimpleWiki — a wiki with its own HTML shell (§103, §105, §106, §109–§113)

  • A wiki can be a SimpleWiki, created in one click. If a template's own HTML
    is the SimpleWiki shell, the wiki built from it is served by MWS itself under
    /wiki/<slug>/, shows pages instead of tiddlers and writes every change
    straight to MWS. The "Create a wiki" dropdown gains the entry 1-click wiki
    creation as SimpleWiki
    ; it appears only when the template SimpleWiki exists
    and carries customHtmlEnabled, so no store shows an entry that fails on
    the server. The PUT /admin/wiki route accepts an optional templateName
    (without it, the blank TiddlyWiki template is used byte for byte as before),
    and the write route is a PUT.
  • provision-simplewiki reads a simplewiki.html, checks the shell rules
    and stores it as the template SimpleWiki — the counterpart to
    import-wiki-file.
  • Where the shell is injected. The shell contains
    <script class="simplewiki-store-point"></script> exactly once with a
    $tw.preloadTiddler in front of it; MWS writes the store before the first
    occurrence of injectionLocation and then calls injectionFunction.
    injectDefaultPreloadScript stays off for custom HTML. A wiki with a custom
    shell starts empty (only $:/SiteTitle), because TiddlyWiki welcome markup
    cannot be rendered by the shell.
  • One provisioning run reaches every wiki of the template (§105): the shell
    lives in the template, so after a new simplewiki.html there is nothing to
    migrate — pages and rights are untouched.

Versioned shells: releases, policy and update banner (§106, §110–§113)

  • Each template save now creates a numbered, immutable release instead of
    rewriting every wiki of that template at once. A release number is
    per-template and strictly ascending, with an optional human-readable label
    from <meta name="mws-shell-version" content="..."> in the shell.
  • A wiki follows its template under a shell policy (auto | notify | pin,
    new wikis default to notify), shown in the overview. /status and the index
    answer the policy and the served/newest release, so the client can compare
    them without a round trip.
  • The wiki offers the pending update. Under notify, a banner above the
    page tells the wiki owner and site admins that a newer template version
    exists, shows it and offers an Update button
    (PUT /recipe/<slug>/shell/update); pin stays quiet, auto serves the
    newest release anyway. The client learns who is an admin via
    $:/status/IsAdmin.

A wiki file from SimpleWiki can be imported (§102)

  • The import takes the .html and .json that SimpleWiki writes, recognised
    before the TiddlyWiki markers. Every page becomes a tiddler, the start page
    becomes $:/DefaultTiddlers, and the dialog names the format instead of
    printing an empty TiddlyWiki version.
  • [Text](wiki:Title) and [Text](<wiki:Title>) become [[Text|Title]];
    [[Title]]/[[Text|Title]] and everything else are left alone.
  • ISO dates are converted to TiddlyWiki's YYYYMMDDhhmmssSSS (a reformat of the
    same UTC instant, not a shift), and tags land as a TiddlyWiki list.
  • Refused whole: a higher format version, two pages with one title, a start page
    that is not one of the pages.

A snapshot from the wiki dialog (§101)

  • Whoever may replace a wiki's content can now take a backup from the dialog:
    PUT /api/wiki-file/snapshot/create, behind the same gate as a restore, so it
    cannot become a second way around it. An empty wiki is refused with
    WIKI_FILE_INVALID.
  • Wanted backups get their own budget (five, separate from the ten of an
    import), read from the manual- prefix of the bag name. The restore dialog
    names both rules and shows a wanted backup as Manual backup.

Smaller additions

  • A ?redirect= on the login page (§104): /login?redirect=/wiki/<slug>
    returns to that wiki after login; anything outside pathPrefix is ignored.
  • A creation date in the wikis, bags, roles and users tables (§100).
  • A wiki subtitle beside the display name, shown in shells like SimpleWiki
    (§127).

Fixed

  • Template releases no longer pile up (§130). Saving a byte-identical
    template definition mints no release, and older unpinned releases are pruned
    (the newest and every pinned release are always kept). A new
    prune-template-releases command cleans an existing store in one run.
  • The CLI is one listener and a table (§104). A command is now a class with
    a static info, the whole list is data in new-commands/index.ts, and a
    single cli.register listener hands it to the CLI — which removes the
    MaxListenersExceededWarning that provision-simplewiki had triggered.
  • Admin-app and wording fixes (§107–§129):
    • documentation for SimpleWiki and versioned shells in the READMEs (§107);
    • every record tab opens pre-sorted by its freshness column, newest first
      (§108);
    • SimpleWiki creation for every account that may create own wikis (§109);
    • the shell-version column shows the release's name, not just a number
      (§110, §112);
    • the default template is named Tiddlywiki, templates show their version
      (§111);
    • the header version pill leaves, the template dialog links its docs (§113);
    • saving a template: the SimpleWiki crash and the silently reset default
      template (§114);
    • the templates "Updated" column shows a real date and wraps its descriptions
      (§115, §116);
    • admin menus close on an outside click; the tab strip sits centered (§117,
      §118);
    • the login form submits with the Enter key (§119);
    • the Settings page is a full-width admin page with the shared header (§120);
    • cleared settings defaults stay cleared across restarts (§121);
    • two untranslated buttons no longer show the fallback key (§122);
    • the SimpleWiki texts reached six more languages; three missing plural
      variants were added (§123, §124);
    • the shell update banner stays out of shell-less wikis, and those show their
      TiddlyWiki version instead of a release counter (§125, §126);
    • the one-click entries name the kind of wiki they build (§128);
    • the template callouts stack, and Shell version moves next to Template
      updates
      (§129).

Maintenance

  • The READMEs (DE + EN) and the CHANGELOG document SimpleWiki and the versioned
    shells (§107); this changelog's English half was completed in the same style as
    the German one.
  • No new runtime dependency, and no plugin added to a recipe: an imported page
    keeps its Markdown as text, so a wiki that wants it rendered needs the
    tiddlywiki/markdown plugin in its recipe.

Operating notes

  • Two migrations, both self-applying on the next start:
    20261003_roles_created adds roles.created (no backfill), and
    20261007182014_shell_versions adds the TemplateVersion table and
    recipes.pinned_template_version_id, backfilling every existing template's
    current definition as release 1.
  • The first start after the update builds a fresh plugin cache under
    cache/mws/0.6.0/; older directories are left untouched and can be deleted.
  • The admin bundle is rebuilt — reload a running admin app. The wiki-side client
    ships the update banner and six new strings in all eight languages.
  • Integrations that spoke to the import route should use PUT for
    /recipe/<slug>/batch/save (the SimpleWiki test servers already do).

Verification

npm run tsc2, the admin-app typecheck and npm run build are clean. The
release was verified on a dev instance: SimpleWiki creation in the browser,
SimpleWiki file import against .json/.html/empty files, the snapshot budget
(six backups leave five), the login redirect, the shell-release migration and
the update banner's data. See the CHANGELOG §100–§130 for the exact observations.