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.
63 lines
2.9 KiB
JavaScript
63 lines
2.9 KiB
JavaScript
const UNDEFINED_CODE_POINTS = new Set([
|
|
65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214,
|
|
393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894,
|
|
720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574,
|
|
1048575, 1114110, 1114111,
|
|
]);
|
|
export const REPLACEMENT_CHARACTER = '\uFFFD';
|
|
export var CODE_POINTS;
|
|
(function (CODE_POINTS) {
|
|
CODE_POINTS[CODE_POINTS["EOF"] = -1] = "EOF";
|
|
CODE_POINTS[CODE_POINTS["NULL"] = 0] = "NULL";
|
|
CODE_POINTS[CODE_POINTS["TABULATION"] = 9] = "TABULATION";
|
|
CODE_POINTS[CODE_POINTS["CARRIAGE_RETURN"] = 13] = "CARRIAGE_RETURN";
|
|
CODE_POINTS[CODE_POINTS["LINE_FEED"] = 10] = "LINE_FEED";
|
|
CODE_POINTS[CODE_POINTS["FORM_FEED"] = 12] = "FORM_FEED";
|
|
CODE_POINTS[CODE_POINTS["SPACE"] = 32] = "SPACE";
|
|
CODE_POINTS[CODE_POINTS["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK";
|
|
CODE_POINTS[CODE_POINTS["QUOTATION_MARK"] = 34] = "QUOTATION_MARK";
|
|
CODE_POINTS[CODE_POINTS["AMPERSAND"] = 38] = "AMPERSAND";
|
|
CODE_POINTS[CODE_POINTS["APOSTROPHE"] = 39] = "APOSTROPHE";
|
|
CODE_POINTS[CODE_POINTS["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS";
|
|
CODE_POINTS[CODE_POINTS["SOLIDUS"] = 47] = "SOLIDUS";
|
|
CODE_POINTS[CODE_POINTS["DIGIT_0"] = 48] = "DIGIT_0";
|
|
CODE_POINTS[CODE_POINTS["DIGIT_9"] = 57] = "DIGIT_9";
|
|
CODE_POINTS[CODE_POINTS["SEMICOLON"] = 59] = "SEMICOLON";
|
|
CODE_POINTS[CODE_POINTS["LESS_THAN_SIGN"] = 60] = "LESS_THAN_SIGN";
|
|
CODE_POINTS[CODE_POINTS["EQUALS_SIGN"] = 61] = "EQUALS_SIGN";
|
|
CODE_POINTS[CODE_POINTS["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN";
|
|
CODE_POINTS[CODE_POINTS["QUESTION_MARK"] = 63] = "QUESTION_MARK";
|
|
CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A";
|
|
CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z";
|
|
CODE_POINTS[CODE_POINTS["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET";
|
|
CODE_POINTS[CODE_POINTS["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT";
|
|
CODE_POINTS[CODE_POINTS["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A";
|
|
CODE_POINTS[CODE_POINTS["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z";
|
|
})(CODE_POINTS || (CODE_POINTS = {}));
|
|
export const SEQUENCES = {
|
|
DASH_DASH: '--',
|
|
CDATA_START: '[CDATA[',
|
|
DOCTYPE: 'doctype',
|
|
SCRIPT: 'script',
|
|
PUBLIC: 'public',
|
|
SYSTEM: 'system',
|
|
};
|
|
//Surrogates
|
|
export function isSurrogate(cp) {
|
|
return cp >= 55296 && cp <= 57343;
|
|
}
|
|
export function isSurrogatePair(cp) {
|
|
return cp >= 56320 && cp <= 57343;
|
|
}
|
|
export function getSurrogatePairCodePoint(cp1, cp2) {
|
|
return (cp1 - 55296) * 1024 + 9216 + cp2;
|
|
}
|
|
//NOTE: excluding NULL and ASCII whitespace
|
|
export function isControlCodePoint(cp) {
|
|
return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||
|
|
(cp >= 0x7f && cp <= 0x9f));
|
|
}
|
|
export function isUndefinedCodePoint(cp) {
|
|
return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp);
|
|
}
|