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.
88 lines
2.9 KiB
TypeScript
88 lines
2.9 KiB
TypeScript
/**
|
|
* Splits an input string into lexical tokens, i.e. smaller strings that are
|
|
* easily identifiable by `tokens.tokenType()`.
|
|
*
|
|
* Lexing starts always in a "stream" context. Incomplete input may be buffered
|
|
* until a complete token can be emitted.
|
|
*
|
|
* In addition to slices of the original input, the following control characters
|
|
* may also be emitted:
|
|
*
|
|
* - `\x02` (Start of Text): A document starts with the next token
|
|
* - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error)
|
|
* - `\x1f` (Unit Separator): Next token is a scalar value
|
|
* - `\u{FEFF}` (Byte order mark): Emitted separately outside documents
|
|
*/
|
|
export declare class Lexer {
|
|
/**
|
|
* Flag indicating whether the end of the current buffer marks the end of
|
|
* all input
|
|
*/
|
|
private atEnd;
|
|
/**
|
|
* Explicit indent set in block scalar header, as an offset from the current
|
|
* minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not
|
|
* explicitly set.
|
|
*/
|
|
private blockScalarIndent;
|
|
/**
|
|
* Block scalars that include a + (keep) chomping indicator in their header
|
|
* include trailing empty lines, which are otherwise excluded from the
|
|
* scalar's contents.
|
|
*/
|
|
private blockScalarKeep;
|
|
/** Current input */
|
|
private buffer;
|
|
/**
|
|
* Flag noting whether the map value indicator : can immediately follow this
|
|
* node within a flow context.
|
|
*/
|
|
private flowKey;
|
|
/** Count of surrounding flow collection levels. */
|
|
private flowLevel;
|
|
/**
|
|
* Minimum level of indentation required for next lines to be parsed as a
|
|
* part of the current scalar value.
|
|
*/
|
|
private indentNext;
|
|
/** Indentation level of the current line. */
|
|
private indentValue;
|
|
/** Position of the next \n character. */
|
|
private lineEndPos;
|
|
/** Stores the state of the lexer if reaching the end of incpomplete input */
|
|
private next;
|
|
/** A pointer to `buffer`; the current position of the lexer. */
|
|
private pos;
|
|
/**
|
|
* Generate YAML tokens from the `source` string. If `incomplete`,
|
|
* a part of the last line may be left as a buffer for the next call.
|
|
*
|
|
* @returns A generator of lexical tokens
|
|
*/
|
|
lex(source: string, incomplete?: boolean): Generator<string, void>;
|
|
private atLineEnd;
|
|
private charAt;
|
|
private continueScalar;
|
|
private getLine;
|
|
private hasChars;
|
|
private setNext;
|
|
private peek;
|
|
private parseNext;
|
|
private parseStream;
|
|
private parseLineStart;
|
|
private parseBlockStart;
|
|
private parseDocument;
|
|
private parseFlowCollection;
|
|
private parseQuotedScalar;
|
|
private parseBlockScalarHeader;
|
|
private parseBlockScalar;
|
|
private parsePlainScalar;
|
|
private pushCount;
|
|
private pushToIndex;
|
|
private pushIndicators;
|
|
private pushTag;
|
|
private pushNewline;
|
|
private pushSpaces;
|
|
private pushUntil;
|
|
}
|