Problem: the hexagonal refactor churns the backend tree for nine more phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper, compose/web image) must move to its own repo first so doc/layout rewrites land once on a backend-only tree. Change: - New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/ (updateURL repointed to oikos-web releases), compose/, own CI (web + desktop jobs), own deploy script (CI-green gate, TOCTOU guard, version-tagged images, prune-to-3), own webhook receiver on :9798 + launchd unit, own compose project publishing the same 8091:80. - Cutover executed on mac-mini in order: oikos stack's web service stopped+removed, oikos-web project brought up on 8091; outer Caddy untouched (targets the published port) — serving + Authentik flow + /wails 404 quirk verified post-cutover. - Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install targets, the compose web service, oikos-web from deploy.sh's fallback prune list; wails + go-keyring dropped from go.mod, vendor synced. - README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now point at the new repo; mbse + mascot design docs carry a path note. Risk: production SPA serving depends on the new pipeline now; rollback is versioned-image re-up of the old web service from a pre-split checkout (port 8091). Desktop builds installed before the split still check dtoro/oikos releases — one manual reinstall, noted in the oikos-web release notes. Verification: go vet, make test (race), make generate-check, golangci (no new findings; baseline down 400→365); post-cutover curls — localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
77 lines
2.2 KiB
JavaScript
77 lines
2.2 KiB
JavaScript
"use strict";
|
|
// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
|
|
var _a;
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.fromCodePoint = void 0;
|
|
exports.replaceCodePoint = replaceCodePoint;
|
|
exports.decodeCodePoint = decodeCodePoint;
|
|
const decodeMap = new Map([
|
|
[0, 65533],
|
|
// C1 Unicode control character reference replacements
|
|
[128, 8364],
|
|
[130, 8218],
|
|
[131, 402],
|
|
[132, 8222],
|
|
[133, 8230],
|
|
[134, 8224],
|
|
[135, 8225],
|
|
[136, 710],
|
|
[137, 8240],
|
|
[138, 352],
|
|
[139, 8249],
|
|
[140, 338],
|
|
[142, 381],
|
|
[145, 8216],
|
|
[146, 8217],
|
|
[147, 8220],
|
|
[148, 8221],
|
|
[149, 8226],
|
|
[150, 8211],
|
|
[151, 8212],
|
|
[152, 732],
|
|
[153, 8482],
|
|
[154, 353],
|
|
[155, 8250],
|
|
[156, 339],
|
|
[158, 382],
|
|
[159, 376],
|
|
]);
|
|
/**
|
|
* Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.
|
|
*/
|
|
exports.fromCodePoint =
|
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins
|
|
(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {
|
|
let output = "";
|
|
if (codePoint > 65535) {
|
|
codePoint -= 65536;
|
|
output += String.fromCharCode(((codePoint >>> 10) & 1023) | 55296);
|
|
codePoint = 56320 | (codePoint & 1023);
|
|
}
|
|
output += String.fromCharCode(codePoint);
|
|
return output;
|
|
};
|
|
/**
|
|
* Replace the given code point with a replacement character if it is a
|
|
* surrogate or is outside the valid range. Otherwise return the code
|
|
* point unchanged.
|
|
*/
|
|
function replaceCodePoint(codePoint) {
|
|
var _a;
|
|
if ((codePoint >= 55296 && codePoint <= 57343) ||
|
|
codePoint > 1114111) {
|
|
return 65533;
|
|
}
|
|
return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
|
|
}
|
|
/**
|
|
* Replace the code point if relevant, then convert it to a string.
|
|
*
|
|
* @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.
|
|
* @param codePoint The code point to decode.
|
|
* @returns The decoded code point.
|
|
*/
|
|
function decodeCodePoint(codePoint) {
|
|
return (0, exports.fromCodePoint)(replaceCodePoint(codePoint));
|
|
}
|
|
//# sourceMappingURL=decode-codepoint.js.map
|