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.
55 lines
2.5 KiB
JavaScript
55 lines
2.5 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.TokenizerMode = exports.Tokenizer = exports.Token = exports.html = exports.foreignContent = exports.ErrorCodes = exports.serializeOuter = exports.serialize = exports.Parser = exports.defaultTreeAdapter = void 0;
|
|
exports.parse = parse;
|
|
exports.parseFragment = parseFragment;
|
|
const index_js_1 = require("./parser/index.js");
|
|
var default_js_1 = require("./tree-adapters/default.js");
|
|
Object.defineProperty(exports, "defaultTreeAdapter", { enumerable: true, get: function () { return default_js_1.defaultTreeAdapter; } });
|
|
var index_js_2 = require("./parser/index.js");
|
|
Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return index_js_2.Parser; } });
|
|
var index_js_3 = require("./serializer/index.js");
|
|
Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return index_js_3.serialize; } });
|
|
Object.defineProperty(exports, "serializeOuter", { enumerable: true, get: function () { return index_js_3.serializeOuter; } });
|
|
var error_codes_js_1 = require("./common/error-codes.js");
|
|
Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return error_codes_js_1.ERR; } });
|
|
/** @internal */
|
|
exports.foreignContent = require("./common/foreign-content.js");
|
|
exports.html = require("./common/html.js");
|
|
exports.Token = require("./common/token.js");
|
|
/** @internal */
|
|
var index_js_4 = require("./tokenizer/index.js");
|
|
Object.defineProperty(exports, "Tokenizer", { enumerable: true, get: function () { return index_js_4.Tokenizer; } });
|
|
Object.defineProperty(exports, "TokenizerMode", { enumerable: true, get: function () { return index_js_4.TokenizerMode; } });
|
|
// Shorthands
|
|
/**
|
|
* Parses an HTML string.
|
|
*
|
|
* @param html Input HTML string.
|
|
* @param options Parsing options.
|
|
* @returns Document
|
|
*
|
|
* @example
|
|
*
|
|
* ```js
|
|
* const parse5 = require('parse5');
|
|
*
|
|
* const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>');
|
|
*
|
|
* console.log(document.childNodes[1].tagName); //> 'html'
|
|
*```
|
|
*/
|
|
function parse(html, options) {
|
|
return index_js_1.Parser.parse(html, options);
|
|
}
|
|
function parseFragment(fragmentContext, html, options) {
|
|
if (typeof fragmentContext === 'string') {
|
|
options = html;
|
|
html = fragmentContext;
|
|
fragmentContext = null;
|
|
}
|
|
const parser = index_js_1.Parser.getFragmentParser(fragmentContext, options);
|
|
parser.tokenizer.write(html, true);
|
|
return parser.getFragment();
|
|
}
|