refactor: split web frontend + gateway out to uniweb app (bump 0.13.0)

The SPA (web/) and the web gateway (cmd/webgw) move to a dedicated app
projects/message_bus/apps/uniweb (its own Gitea sub-repo). unibus is now
strictly the bus plane: membership/keys, the client library and demo peers.
uniweb consumes unibus as a Go module via replace => ../unibus.

No capability lost; same SPA and gateway, in their own service folder.
go build/vet/test green after extraction.
This commit is contained in:
2026-06-13 21:21:08 +02:00
parent fadee1a7d0
commit 9661a5ce1f
31166 changed files with 2029366 additions and 3677 deletions
@@ -0,0 +1 @@
../../postcss@8.5.15/node_modules/postcss
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2015 Andrey Sitnik <andrey@sitnik.ru>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,54 @@
# PostCSS Simple Variables
<img align="right" width="135" height="95"
title="Philosophers stone, logo of PostCSS"
src="https://postcss.org/logo-leftp.svg">
[PostCSS] plugin for Sass-like variables.
You can use variables inside values, selectors and at-rule parameters.
```pcss
$dir: top;
$blue: #056ef0;
$column: 200px;
.menu_link {
background: $blue;
width: $column;
}
.menu {
width: calc(4 * $column);
margin-$(dir): 10px;
}
```
```css
.menu_link {
background: #056ef0;
width: 200px;
}
.menu {
width: calc(4 * 200px);
margin-top: 10px;
}
```
If you want be closer to W3C spec,
you should use [postcss-custom-properties] and [postcss-at-rules-variables] plugins.
Look at [postcss-map] for big complicated configs.
[postcss-at-rules-variables]: https://github.com/GitScrum/postcss-at-rules-variables
[postcss-custom-properties]: https://github.com/postcss/postcss-custom-properties
[postcss-map]: https://github.com/pascalduez/postcss-map
[PostCSS]: https://github.com/postcss/postcss
<a href="https://evilmartians.com/?utm_source=postcss-simple-vars">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
alt="Sponsored by Evil Martians" width="236" height="54">
</a>
## Docs
Read **[full docs](https://github.com/postcss/postcss-simple-vars#readme)** on GitHub.
@@ -0,0 +1,108 @@
declare module 'postcss-simple-vars' {
/**
* imports postcss
*/
import * as postcss from 'postcss'
/**
* Simple vars namespace
*/
namespace simpleVars {
/**
* variables Argument
* @interface IArgument
*/
type IArgument = {
[index: string]: any
}
/**
* Callable argument
* @type {function}
* @interface ICallableArgument
*/
type ICallableArgument = () => IArgument
/**
* Vars argument
* @export
* @interface ISimpleVarsArgument
*/
export interface ISimpleVarsArgument extends ISimpleVarsBase {
variables?: IArgument
}
/**
* Base options interface
* @interface ISimpleVarsBase
*/
interface ISimpleVarsBase {
/**
* Set value only for variables from this object. Other variables will not be changed.
* It is useful for PostCSS plugin developers.
* @type {*}
* @memberOf ISimpleVarsBase
*/
only?: any
/**
* Callback invoked once all variables in css are known.
* The callback receives an object representing the known variables,
* including those explicitly-declared by the variables option.
*/
onVariables?: (vars: string) => void
/**
* Left unknown variables in CSS and do not throw an error.
* @default {false}
* @type {boolean}
*/
silent?: boolean
/**
* Keep variables as is and not delete them.
* @default {false}
* @type {boolean}
*/
keep?: boolean
/**
* Callback on unknown variable name. It receives node instance, variable name and PostCSS Result object.
* @memberOf ISimpleVarsBase
*/
unknown?: (
node: postcss.Node,
name: string,
result: postcss.Result
) => void
}
/**
* Callable variables argument
* @export
* @interface ISimpleVarsCallableArgument
*/
export interface ISimpleVarsCallableArgument extends ISimpleVarsBase {
variables: ICallableArgument
}
}
/**
* Exported function
* @param {simpleVars.ISimpleVarsArgument} arg
* @returns {*}
*/
function simpleVars(arg?: simpleVars.ISimpleVarsArgument): any
/**
* Exported function
* @param {simpleVars.ISimpleVarsArgument} arg
* @returns {*}
*/
function simpleVars(arg: simpleVars.ISimpleVarsCallableArgument): any
/**
* Default export
*/
export = simpleVars
}
@@ -0,0 +1,206 @@
const IGNORE = Symbol('ignore')
function definition (variables, node, opts) {
let name = node.prop.slice(1)
variables[name] = transformBackslashSequences(node.value)
if (!opts.keep) {
node.remove()
}
}
function variable (variables, node, str, name, opts, result) {
if (isIgnore(node, name)) return str
if (opts.only) {
if (typeof opts.only[name] !== 'undefined') {
return opts.only[name]
}
return str
}
if (typeof variables[name] !== 'undefined') {
return variables[name]
}
if (opts.silent) {
return str
}
let fix = opts.unknown(node, name, result)
if (fix) {
return fix
}
return str
}
const UNICODE_8_CODE = /(?<=[^\\]|^)\\U([0-9abcdefABCDEF]{8})/g
const UNICODE_4_CODE = /(?<=[^\\]|^)\\u([0-9abcdefABCDEF]{4})/g
function transformBackslashSequences(value) {
if (typeof value !== 'string') return value
if (!value.includes('\\')) return value
return value
.replace(UNICODE_8_CODE, (_, cp) => String.fromCodePoint(`0x${cp}`))
.replace(UNICODE_4_CODE, (_, cp) => String.fromCodePoint(`0x${cp}`))
.replace(/\\\\/g, '\\')
}
function simpleSyntax (variables, node, str, opts, result) {
return str.replace(/(^|[^\w])\$([\w\d-_]+)/g, (_, bef, name) => {
return bef + variable(variables, node, '$' + name, name, opts, result)
})
}
function inStringSyntax (variables, node, str, opts, result) {
return str.replace(/\$\(\s*([\w\d-_]+)\s*\)/g, (all, name) => {
return variable(variables, node, all, name, opts, result)
})
}
function bothSyntaxes (variables, node, str, opts, result) {
str = simpleSyntax(variables, node, str, opts, result)
str = inStringSyntax(variables, node, str, opts, result)
return str
}
function repeat (value, callback) {
let oldValue
let newValue = value
do {
oldValue = newValue
newValue = callback(oldValue)
} while (newValue !== oldValue && newValue.includes('$'))
return newValue
}
function declValue (variables, node, opts, result) {
node.value = repeat(node.value, value => {
return bothSyntaxes(variables, node, value, opts, result)
})
}
function declProp (variables, node, opts, result) {
node.prop = repeat(node.prop, value => {
return inStringSyntax(variables, node, value, opts, result)
})
}
function ruleSelector (variables, node, opts, result) {
node.selector = repeat(node.selector, value => {
return bothSyntaxes(variables, node, value, opts, result)
})
}
function atruleParams (variables, node, opts, result) {
node.params = repeat(node.params, value => {
return bothSyntaxes(variables, node, value, opts, result)
})
}
function comment (variables, node, opts, result) {
node.text = node.text.replace(/<<\$\(\s*(\w+)\s*\)>>/g, (all, name) => {
return variable(variables, node, all, name, opts, result)
})
}
function mixin (helpers, node) {
let name = node.params.split(/\s/, 1)[0]
let vars = node.params.slice(name.length).trim()
if (vars.length) {
node[IGNORE] = helpers.list.comma(vars).map(str => {
let arg = str.split(':', 1)[0]
return arg.slice(1).trim()
})
}
}
function isIgnore (node, value) {
if (node[IGNORE] && node[IGNORE].includes(value)) {
return true
} else if (node.parent) {
return isIgnore(node.parent, value)
} else {
return false
}
}
module.exports = (opts = {}) => {
if (!opts.unknown) {
opts.unknown = (node, name) => {
throw node.error('Undefined variable $' + name)
}
}
if (typeof opts.keep === 'undefined') {
opts.keep = false
}
return {
postcssPlugin: 'postcss-simple-vars',
prepare () {
let variables = {}
if (typeof opts.variables === 'function') {
variables = opts.variables()
} else if (typeof opts.variables === 'object') {
variables = { ...opts.variables }
}
for (let name in variables) {
if (name[0] === '$') {
name = name.slice(1)
variables[name] = variables[`$${name}`]
delete variables[`$${name}`]
}
variables[name] = transformBackslashSequences(variables[name])
}
return {
OnceExit (_, { result }) {
Object.keys(variables).forEach(key => {
result.messages.push({
plugin: 'postcss-simple-vars',
type: 'variable',
name: key,
value: variables[key]
})
})
if (opts.onVariables) {
opts.onVariables(variables)
}
},
Declaration (node, { result }) {
if (node.value.includes('$')) {
declValue(variables, node, opts, result)
}
if (node.prop[0] === '$' && node.prop[1] !== '(') {
if (!opts.only) definition(variables, node, opts)
} else if (node.prop.includes('$(')) {
declProp(variables, node, opts, result)
}
},
Comment (node, { result }) {
if (node.text.includes('$')) {
comment(variables, node, opts, result)
}
},
AtRule (node, helpers) {
if (node.name === 'define-mixin') {
mixin(helpers, node)
} else if (node.params && node.params.includes('$')) {
atruleParams(variables, node, opts, helpers.result)
}
},
Rule (node, { result }) {
if (node.selector.includes('$')) {
ruleSelector(variables, node, opts, result)
}
}
}
}
}
}
module.exports.postcss = true
@@ -0,0 +1,26 @@
{
"name": "postcss-simple-vars",
"version": "7.0.1",
"description": "PostCSS plugin for Sass-like variables",
"keywords": [
"postcss",
"css",
"postcss-plugin",
"sass",
"variables",
"vars"
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": "postcss/postcss-simple-vars",
"engines": {
"node": ">=14.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
"peerDependencies": {
"postcss": "^8.2.1"
}
}