- Имитация GET/POST/DELETE поверх сокета: запрос-ответ, получение, сохранение, удаление
- Подписка/отписка на изменения данных
- Передача ошибок, связанных с запросом или подпиской
- Типизация: возможность описать union объектов событий в ts/openapi
- Использование одних и тех же типов для получения и обновления сущности
- Прозрачное, простое в реализации на сервере (де)мультиплексирование запросов на другое устройство и ответов/событий от него
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace $ { | |
export class $mpk_gql_ws extends $yuf_ws_host { | |
override url() { return '/v1/graphql' } | |
override restart_delay() { return 60000 } | |
token() { return null as string | null | undefined } | |
@ $mol_mem | |
authorized(next?: boolean) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
: "${SRC_PATH:=$(pwd)}" | |
: "${PROJECT_NAME:="mssc-inspection"}" | |
MAM_DIR="$SRC_PATH/.ci/mam" | |
# replace - in project name to / | |
APP_PATH="$(echo "${PROJECT_NAME}" | sed 's/-/\//g')" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace $ { | |
export type $mol_file_type = 'file' | 'dir' | 'link' | |
export interface $mol_file_stat { | |
type: $mol_file_type | |
size: number | |
atime: Date | |
mtime: Date | |
ctime: Date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unlinkDir: /home/urchik/projects/ocas/mam/hyoo/board/-/hyoo/board/logo | |
unlinkDir: /home/urchik/projects/ocas/mam/hyoo/board/-/hyoo/board | |
unlinkDir: /home/urchik/projects/ocas/mam/hyoo/board/group/-css | |
unlinkDir: /home/urchik/projects/ocas/mam/hyoo/board/group/-view.tree | |
reset: /home/urchik/projects/ocas/mam/hyoo/board/-/hyoo/board/logo | |
reset: /home/urchik/projects/ocas/mam/hyoo/board/-/hyoo/board | |
reset: /home/urchik/projects/ocas/mam/hyoo/board/group/-css | |
reset: /home/urchik/projects/ocas/mam/hyoo/board/group/-view.tree | |
reset: /home/urchik/projects/ocas/mam/hyoo/board/-/hyoo/board | |
reset: /home/urchik/projects/ocas/mam/hyoo/board/-/hyoo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
entryPoints: | |
http: | |
address: :9081 | |
https: | |
address: :9082 | |
http: | |
tls: {} | |
local_http: | |
address: :9091 | |
providers: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
import url from 'node:url' | |
import { basename, join } from 'node:path' | |
import { stat, writeFile, readFile } from 'node:fs/promises' | |
import { spawn } from 'node:child_process' | |
/** | |
* @param {unknown} value | |
* @returns {value is import('esbuild').Plugin} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
cloc . --not-match-d=".*(node_modules|-|legacy|npm|\.mam|\.ci|adm).*" | |
424 text files. | |
287 unique files. | |
3980 files ignored. | |
github.com/AlDanial/cloc v 2.00 T=0.32 s (890.4 files/s, 59111.0 lines/s) | |
------------------------------------------------------------------------------- | |
Language files blank comment code | |
------------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { buildSync } from 'esbuild' | |
import { join } from 'path' | |
import { writeFileSync, readFileSync } from 'fs' | |
import { spawnSync } from 'child_process' | |
export function gdKitBuild({ args }) { | |
const monorepo_root = process.cwd() | |
const sync_opts = { | |
stdio: 'inherit', | |
stderr: 'inherit', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace $ { | |
const str = () => ('00000000000000000' + (Math.random() * 0xffffffffffffffff).toString(16)).slice(-16) | |
export class $gd_kit_entity extends $mol_object { | |
constructor(id?: string) { | |
super() | |
if (id) this.id = $mol_const(id) | |
} |
NewerOlder