soma-core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/SomaPageClient.tsx +364 -0
- package/app/api/[...path]/route.ts +9 -85
- package/app/api/page/route.ts +57 -35
- package/app/api/soma-manifest/route.ts +39 -0
- package/app/components/SomaHydrationShell.tsx +23 -0
- package/app/favicon.ico/route.ts +13 -0
- package/app/layout.tsx +2 -2
- package/app/loading.tsx +5 -0
- package/app/page.tsx +19 -128
- package/bin/soma-lsp.cjs +195 -0
- package/bin/soma-sync.cjs +3 -0
- package/bin/soma.cjs +13 -1
- package/core/api/IService.ts +6 -10
- package/core/api/load-host-service.ts +75 -0
- package/core/api/service-path.ts +39 -0
- package/core/base/SomaEntity.ts +3 -10
- package/core/base/SomaLocaleOnlyPageRoot.ts +3 -4
- package/core/base/SomaPageRootBase.ts +20 -3
- package/core/base/decorators/Event.ts +23 -0
- package/core/base/decorators/Locale.ts +35 -0
- package/core/base/decorators/Page.ts +16 -0
- package/core/base/decorators/Show.ts +20 -0
- package/core/base/decorators/ShowList.ts +34 -0
- package/core/base/decorators/index.ts +5 -0
- package/core/base/index.ts +2 -0
- package/core/base/runAsync.ts +32 -0
- package/core/compiler/full-manifest-builder.ts +33 -7
- package/core/compiler/host-config-sync.cjs +38 -0
- package/core/compiler/manifest-compiler.ts +3 -2
- package/core/compiler/page-base-resolver.ts +26 -0
- package/core/compiler/precompiled-manifest-loader.ts +34 -0
- package/core/compiler/rollup-plugin-soma.ts +45 -0
- package/core/compiler/rspack-plugin-soma.js +33 -0
- package/core/compiler/soma-manifest-webpack-plugin.js +188 -0
- package/core/compiler/soma-precompile.js +3513 -0
- package/core/compiler/soma-precompile.ts +52 -6
- package/core/compiler/soma-rspack-yaml-loader.js +22 -0
- package/core/compiler/soma-webpack-loader.js +7 -1
- package/core/compiler/vite-plugin-soma.ts +11 -1
- package/core/container/IContainerAdapter.ts +36 -0
- package/core/container/MiniProgramContainerAdapter.ts +190 -0
- package/core/container/ReactNativeContainerAdapter.ts +189 -0
- package/core/container/SomaContainerAdapter.ts +17 -6
- package/core/diagnostics/SomaDiagnostics.ts +1 -1
- package/core/diagnostics/SomaTelemetry.ts +100 -0
- package/core/diagnostics/telemetry-context.ts +15 -0
- package/core/engine/asset-resolver.ts +39 -4
- package/core/engine/dom-renderer.ts +169 -35
- package/core/engine/event-engine.ts +110 -41
- package/core/engine/on-change-engine.ts +71 -0
- package/core/engine/property-watcher.ts +117 -0
- package/core/engine/reactive-proxy.ts +11 -5
- package/core/engine/render-engine.ts +97 -11
- package/core/engine/runtime-builder.ts +88 -11
- package/core/engine/scope-resolver.ts +65 -9
- package/core/engine/soma-bootstrap.ts +448 -244
- package/core/engine/style-binder.ts +423 -0
- package/core/engine/theme-variables.ts +37 -0
- package/core/engine/timer-engine.ts +92 -0
- package/core/engine/trigger-engine.ts +55 -0
- package/core/host/app-config.stub.ts +2 -0
- package/core/host/locale.stub.ts +2 -0
- package/core/host/resolve-host-bootstrap.ts +28 -0
- package/core/host/soma-bootstrap-host.stub.ts +4 -0
- package/core/host/source-packages.ts +112 -0
- package/core/index.ts +33 -2
- package/core/infra/auth/TokenAuthService.ts +17 -3
- package/core/infra/http/IHttpClient.ts +11 -1
- package/core/infra/http/SomaHttpService.ts +89 -31
- package/core/infra/i18n/DefaultI18n.ts +6 -18
- package/core/infra/i18n/II18n.ts +2 -3
- package/core/infra/notify/DomNotifyService.ts +98 -0
- package/core/infra/notify/INotifyTheme.ts +22 -0
- package/core/infra/realtime/IRealtimeService.ts +23 -0
- package/core/infra/realtime/IRealtimeTransport.ts +9 -0
- package/core/infra/realtime/SomaRealtimeService.ts +95 -0
- package/core/infra/realtime/SseRealtimeTransport.ts +36 -0
- package/core/infra/realtime/WebSocketRealtimeTransport.ts +102 -0
- package/core/infra/router/router-path.ts +28 -0
- package/core/infra/storage/SessionStorageService.ts +59 -0
- package/core/lsp/cross-file-diagnostics.cjs +160 -0
- package/core/lsp/event-yaml-completion.cjs +106 -0
- package/core/lsp/extra-completion.cjs +64 -0
- package/core/lsp/lsp-navigation.cjs +191 -0
- package/core/lsp/ui-yaml-completion.cjs +170 -0
- package/core/manifest/manifest-contract.ts +12 -0
- package/core/middleware/createPermissionMiddleware.ts +37 -0
- package/core/parser/annotation-extractor.ts +113 -0
- package/core/parser/pipeline-parser.ts +344 -276
- package/core/parser/style-config-parser.ts +340 -0
- package/core/parser/timer-parser.ts +70 -0
- package/core/parser/trigger-parser.ts +90 -0
- package/core/parser/ui-config-parser.ts +73 -1
- package/core/quality/SomaQualityRegistry.ts +68 -0
- package/core/runtime/SomaRuntimeServices.ts +100 -0
- package/core/runtime/SomaSnapshotStore.ts +5 -3
- package/core/types/domain.types.ts +5 -2
- package/core/types/event.types.ts +82 -57
- package/core/types/manifest.types.ts +2 -0
- package/core/types/style-config.types.ts +76 -0
- package/core/types/timer.types.ts +23 -0
- package/core/types/trigger.types.ts +14 -0
- package/core/types/ui-config.types.ts +9 -0
- package/core/types/watcher.types.ts +29 -0
- package/dist/cli/soma.js +23 -23
- package/dist/core/index.cjs +9065 -0
- package/dist/diagnostics/telemetry.cjs +105 -0
- package/dist/preview-export.cjs +3401 -0
- package/dist/tsconfig.types.tsbuildinfo +1 -0
- package/dist/types/api/IService.d.ts +28 -0
- package/dist/types/api/load-host-service.d.ts +5 -0
- package/dist/types/api/service-path.d.ts +13 -0
- package/dist/types/base/SomaApi.d.ts +5 -0
- package/dist/types/base/SomaDict.d.ts +89 -0
- package/dist/types/base/SomaEntity.d.ts +15 -0
- package/dist/types/base/SomaHttpClient.d.ts +66 -0
- package/dist/types/base/SomaLocaleOnlyPageRoot.d.ts +3 -0
- package/dist/types/base/SomaPageRootBase.d.ts +49 -0
- package/dist/types/base/SomaValidator.d.ts +55 -0
- package/dist/types/base/decorators/Event.d.ts +10 -0
- package/dist/types/base/decorators/Locale.d.ts +9 -0
- package/dist/types/base/decorators/Page.d.ts +4 -0
- package/dist/types/base/decorators/Show.d.ts +7 -0
- package/dist/types/base/decorators/ShowList.d.ts +12 -0
- package/dist/types/base/decorators/index.d.ts +5 -0
- package/dist/types/base/index.d.ts +9 -0
- package/dist/types/base/runAsync.d.ts +12 -0
- package/dist/types/compiler/full-manifest-builder.d.ts +35 -0
- package/dist/types/compiler/manifest-compiler.d.ts +29 -0
- package/dist/types/compiler/page-base-resolver.d.ts +6 -0
- package/dist/types/compiler/precompiled-manifest-loader.d.ts +5 -0
- package/dist/types/compiler/rollup-plugin-soma.d.ts +14 -0
- package/dist/types/compiler/route-builder.d.ts +12 -0
- package/dist/types/compiler/soma-precompile.d.ts +40 -0
- package/dist/types/compiler/vite-plugin-soma.d.ts +34 -0
- package/dist/types/container/IContainerAdapter.d.ts +30 -0
- package/dist/types/container/MiniProgramContainerAdapter.d.ts +52 -0
- package/dist/types/container/ReactNativeContainerAdapter.d.ts +47 -0
- package/dist/types/container/SomaContainerAdapter.d.ts +30 -0
- package/dist/types/diagnostics/SomaDiagnostics.d.ts +64 -0
- package/dist/types/diagnostics/SomaTelemetry.d.ts +32 -0
- package/dist/types/diagnostics/telemetry-context.d.ts +4 -0
- package/dist/types/engine/asset-resolver.d.ts +17 -0
- package/dist/types/engine/dom-renderer.d.ts +41 -0
- package/dist/types/engine/event-engine.d.ts +64 -0
- package/dist/types/engine/lis.d.ts +10 -0
- package/dist/types/engine/on-change-engine.d.ts +16 -0
- package/dist/types/engine/property-watcher.d.ts +18 -0
- package/dist/types/engine/reactive-proxy.d.ts +58 -0
- package/dist/types/engine/render-engine.d.ts +73 -0
- package/dist/types/engine/runtime-builder.d.ts +58 -0
- package/dist/types/engine/scope-resolver.d.ts +90 -0
- package/dist/types/engine/soma-bootstrap.d.ts +112 -0
- package/dist/types/engine/style-binder.d.ts +81 -0
- package/dist/types/engine/theme-variables.d.ts +3 -0
- package/dist/types/engine/timer-engine.d.ts +19 -0
- package/dist/types/engine/trigger-engine.d.ts +16 -0
- package/dist/types/host/app-config.stub.d.ts +3 -0
- package/dist/types/host/locale.stub.d.ts +3 -0
- package/dist/types/host/resolve-host-bootstrap.d.ts +11 -0
- package/dist/types/host/soma-bootstrap-host.stub.d.ts +3 -0
- package/dist/types/host/source-packages.d.ts +8 -0
- package/dist/types/index.d.ts +35 -0
- package/dist/types/infra/auth/IAuthService.d.ts +12 -0
- package/dist/types/infra/auth/TokenAuthService.d.ts +26 -0
- package/dist/types/infra/cache/ICache.d.ts +12 -0
- package/dist/types/infra/cache/MemoryCache.d.ts +14 -0
- package/dist/types/infra/cache/ServerFileCache.d.ts +37 -0
- package/dist/types/infra/config/IConfig.d.ts +9 -0
- package/dist/types/infra/config/SomaConfig.d.ts +21 -0
- package/dist/types/infra/event-bus/IEventBus.d.ts +8 -0
- package/dist/types/infra/event-bus/SomaEventBus.d.ts +9 -0
- package/dist/types/infra/http/IHttpClient.d.ts +28 -0
- package/dist/types/infra/http/SomaHttpService.d.ts +27 -0
- package/dist/types/infra/i18n/DefaultI18n.d.ts +7 -0
- package/dist/types/infra/i18n/II18n.d.ts +6 -0
- package/dist/types/infra/logger/ConsoleLogger.d.ts +14 -0
- package/dist/types/infra/logger/ILogger.d.ts +17 -0
- package/dist/types/infra/notify/DefaultNotifyService.d.ts +16 -0
- package/dist/types/infra/notify/DomNotifyService.d.ts +16 -0
- package/dist/types/infra/notify/INotifyService.d.ts +12 -0
- package/dist/types/infra/notify/INotifyTheme.d.ts +12 -0
- package/dist/types/infra/permission/IPermission.d.ts +10 -0
- package/dist/types/infra/permission/SomaPermission.d.ts +19 -0
- package/dist/types/infra/realtime/IRealtimeService.d.ts +13 -0
- package/dist/types/infra/realtime/IRealtimeTransport.d.ts +8 -0
- package/dist/types/infra/realtime/SomaRealtimeService.d.ts +20 -0
- package/dist/types/infra/realtime/SseRealtimeTransport.d.ts +11 -0
- package/dist/types/infra/realtime/WebSocketRealtimeTransport.d.ts +30 -0
- package/dist/types/infra/router/IRouter.d.ts +16 -0
- package/dist/types/infra/router/SomaRouter.d.ts +18 -0
- package/dist/types/infra/router/router-path.d.ts +6 -0
- package/dist/types/infra/storage/IStorageService.d.ts +7 -0
- package/dist/types/infra/storage/MemoryStorageService.d.ts +15 -0
- package/dist/types/infra/storage/SessionStorageService.d.ts +14 -0
- package/dist/types/infra/timer/ITimer.d.ts +13 -0
- package/dist/types/infra/timer/SomaTimer.d.ts +21 -0
- package/dist/types/manifest/manifest-contract.d.ts +4 -0
- package/dist/types/middleware/SomaMiddlewareChain.d.ts +6 -0
- package/dist/types/middleware/createPermissionMiddleware.d.ts +14 -0
- package/dist/types/parser/annotation-extractor.d.ts +12 -0
- package/dist/types/parser/pipeline-parser.d.ts +62 -0
- package/dist/types/parser/style-config-parser.d.ts +20 -0
- package/dist/types/parser/timer-parser.d.ts +6 -0
- package/dist/types/parser/trigger-parser.d.ts +13 -0
- package/dist/types/parser/ui-config-parser.d.ts +34 -0
- package/dist/types/parser/yaml-loader.d.ts +21 -0
- package/dist/types/quality/SomaQualityRegistry.d.ts +31 -0
- package/dist/types/runtime/SomaRuntimeServices.d.ts +35 -0
- package/dist/types/runtime/SomaSnapshotStore.d.ts +13 -0
- package/dist/types/scheduler/SomaScheduler.d.ts +25 -0
- package/dist/types/types/domain.types.d.ts +82 -0
- package/dist/types/types/engine.types.d.ts +22 -0
- package/dist/types/types/event.types.d.ts +61 -0
- package/dist/types/types/keyboard.types.d.ts +4 -0
- package/dist/types/types/manifest.types.d.ts +29 -0
- package/dist/types/types/scheduler.types.d.ts +8 -0
- package/dist/types/types/style-config.types.d.ts +62 -0
- package/dist/types/types/timer.types.d.ts +19 -0
- package/dist/types/types/trigger.types.d.ts +12 -0
- package/dist/types/types/ui-config.types.d.ts +85 -0
- package/dist/types/types/watcher.types.d.ts +24 -0
- package/dist/types/validation/contract-validator.d.ts +40 -0
- package/editor/vscode/extension.js +39 -0
- package/editor/vscode/language-configuration.json +17 -0
- package/editor/vscode/package.json +98 -0
- package/editor/vscode/syntaxes/soma-event-yaml.tmLanguage.json +30 -0
- package/editor/vscode/syntaxes/soma-ui-yaml.tmLanguage.json +42 -0
- package/global.d.ts +22 -3
- package/next.config.js +73 -4
- package/package.json +58 -17
- package/tailwind.config.ts +36 -13
- package/tsconfig.json +6 -2
- package/core/router/RouteHandler.ts +0 -93
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { OnChangeRule } from './watcher.types';
|
|
2
|
+
/**
|
|
3
|
+
* 作用域声明
|
|
4
|
+
* 定义数据源路径和当前作用域别名
|
|
5
|
+
*/
|
|
6
|
+
export interface BindDeclaration {
|
|
7
|
+
/** 数据源路径。顶层 = Class 标识;嵌套层 = 父 var.属性路径 */
|
|
8
|
+
obj: string;
|
|
9
|
+
/** 当前层级别名,子层级和事件配置通过此别名引用数据 */
|
|
10
|
+
var: string;
|
|
11
|
+
/** 属性变化时触发的 Domain 方法(声明式 watch) */
|
|
12
|
+
onChange?: OnChangeRule[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 展示映射值 - 支持多种绑定类型
|
|
16
|
+
*
|
|
17
|
+
* 可以是以下形式之一:
|
|
18
|
+
* - 简单文本绑定字符串:"var.prop"
|
|
19
|
+
* - 嵌套绑定:包含 bind + show 的嵌套结构
|
|
20
|
+
* - 扩展绑定:包含 text / model / when / class 等高级绑定
|
|
21
|
+
*/
|
|
22
|
+
export type ShowValue = string | NestedShowMapping | ExtendedShowValue;
|
|
23
|
+
/**
|
|
24
|
+
* 嵌套展示映射
|
|
25
|
+
* 用于对象或列表级别的子作用域绑定
|
|
26
|
+
*/
|
|
27
|
+
export interface NestedShowMapping {
|
|
28
|
+
/** 子作用域声明 */
|
|
29
|
+
bind: BindDeclaration;
|
|
30
|
+
/** 子级展示映射 */
|
|
31
|
+
show: ShowMapping;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 扩展绑定值
|
|
35
|
+
* 支持 text、model、when、class 等高级绑定类型
|
|
36
|
+
*/
|
|
37
|
+
export interface ExtendedShowValue {
|
|
38
|
+
/** 文本绑定路径 */
|
|
39
|
+
text?: string;
|
|
40
|
+
/** 双向绑定路径(表单控件) */
|
|
41
|
+
model?: string;
|
|
42
|
+
/** 条件渲染路径(truthy 显示,"!path" 取反) */
|
|
43
|
+
when?: string;
|
|
44
|
+
/** CSS 类名动态绑定 { "class-names": "condition-path" } */
|
|
45
|
+
class?: Record<string, string>;
|
|
46
|
+
/** 子级展示映射 */
|
|
47
|
+
show?: ShowMapping;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 展示映射
|
|
51
|
+
* 键为 data-soma-id 属性值,值为 ShowValue
|
|
52
|
+
*
|
|
53
|
+
* 键的格式:
|
|
54
|
+
* - "somaId" — 默认文本绑定
|
|
55
|
+
* - "somaId@attr" — 属性绑定(如 somaId@src, somaId@href)
|
|
56
|
+
* - "somaId@html" — HTML 内容注入
|
|
57
|
+
*/
|
|
58
|
+
export type ShowMapping = Record<string, ShowValue>;
|
|
59
|
+
/**
|
|
60
|
+
* UI 配置顶层结构
|
|
61
|
+
* 对应 _ui.yaml 文件的完整结构
|
|
62
|
+
*/
|
|
63
|
+
export interface UiConfig {
|
|
64
|
+
/** 顶级作用域声明 */
|
|
65
|
+
bind: BindDeclaration;
|
|
66
|
+
/** 顶级展示映射 */
|
|
67
|
+
show: ShowMapping;
|
|
68
|
+
/**
|
|
69
|
+
* 初始化属性(引擎启动、Proxy 创建前写入)
|
|
70
|
+
* 键为 var 别名路径(如 page.title),值为初始值
|
|
71
|
+
*/
|
|
72
|
+
initProps?: Record<string, unknown>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* 解析后的 show 条目
|
|
76
|
+
* somaId@attr 语法拆分为 somaId + attrName
|
|
77
|
+
*/
|
|
78
|
+
export interface ParsedShowEntry {
|
|
79
|
+
/** 纯 data-soma-id(不含 @attr 后缀) */
|
|
80
|
+
somaId: string;
|
|
81
|
+
/** 属性绑定时的属性名(如 src、href、value) */
|
|
82
|
+
attrName?: string;
|
|
83
|
+
/** 原始绑定值 */
|
|
84
|
+
value: ShowValue;
|
|
85
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type WatchCallback = (newValue: unknown, oldValue: unknown, context: {
|
|
2
|
+
path: string;
|
|
3
|
+
root: object;
|
|
4
|
+
}) => void | Promise<void>;
|
|
5
|
+
export interface WatcherOptions {
|
|
6
|
+
/** 立即执行一次(读取当前值作为 newValue,oldValue 为 undefined) */
|
|
7
|
+
immediate?: boolean;
|
|
8
|
+
/** 前缀匹配:监听 path 及其所有子路径变更 */
|
|
9
|
+
prefix?: boolean;
|
|
10
|
+
/** 通配符匹配:path 中含 `*` 时启用(如 page.*.status) */
|
|
11
|
+
glob?: boolean;
|
|
12
|
+
/** 防抖延迟(ms) */
|
|
13
|
+
debounce?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface OnChangeRule {
|
|
16
|
+
/** 监听的数据路径(含 var 别名) */
|
|
17
|
+
condition: string;
|
|
18
|
+
/** Domain Class 方法名(相对 bind.var,如 onDeviceSelected → page.onDeviceSelected) */
|
|
19
|
+
callback: string;
|
|
20
|
+
/** 回调执行后是否触发 UI 全量刷新 */
|
|
21
|
+
refresh?: boolean;
|
|
22
|
+
/** 防抖延迟(ms) */
|
|
23
|
+
debounce?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SomaScopeResolver } from '../engine/scope-resolver';
|
|
2
|
+
import type { ParsedEvent } from '../types/event.types';
|
|
3
|
+
import type { UiConfig } from '../types/ui-config.types';
|
|
4
|
+
import type { SomaDiagnostics } from '../diagnostics/SomaDiagnostics';
|
|
5
|
+
export interface SomaContractValidationInput {
|
|
6
|
+
container: HTMLElement;
|
|
7
|
+
uiConfig: UiConfig;
|
|
8
|
+
eventConfig: ParsedEvent[];
|
|
9
|
+
resolver: SomaScopeResolver;
|
|
10
|
+
rootInstance: object;
|
|
11
|
+
}
|
|
12
|
+
export interface SomaContractReport {
|
|
13
|
+
errors: string[];
|
|
14
|
+
warnings: string[];
|
|
15
|
+
anchorIds: string[];
|
|
16
|
+
bindingCount: number;
|
|
17
|
+
eventCount: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class SomaContractError extends Error {
|
|
20
|
+
readonly report: SomaContractReport;
|
|
21
|
+
constructor(report: SomaContractReport);
|
|
22
|
+
}
|
|
23
|
+
export declare class SomaContractValidator {
|
|
24
|
+
private diagnostics;
|
|
25
|
+
constructor(diagnostics?: SomaDiagnostics);
|
|
26
|
+
validate(input: SomaContractValidationInput): SomaContractReport;
|
|
27
|
+
private collectAnchorStats;
|
|
28
|
+
private validateShowMapping;
|
|
29
|
+
private validateEvents;
|
|
30
|
+
private validateReadablePath;
|
|
31
|
+
private validateFunctionPath;
|
|
32
|
+
private validateSegments;
|
|
33
|
+
private validateFunctionOnTarget;
|
|
34
|
+
private resolveAliasSample;
|
|
35
|
+
private extractSomaId;
|
|
36
|
+
private isNestedShowMapping;
|
|
37
|
+
private isExtendedShowValue;
|
|
38
|
+
private addError;
|
|
39
|
+
private addWarning;
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const path = require('node:path');
|
|
2
|
+
const { spawn } = require('node:child_process');
|
|
3
|
+
const vscode = require('vscode');
|
|
4
|
+
|
|
5
|
+
/** @type {import('vscode').LanguageClient} */
|
|
6
|
+
let client;
|
|
7
|
+
|
|
8
|
+
function activate(context) {
|
|
9
|
+
const serverModule = path.join(__dirname, '../../bin/soma-lsp.cjs');
|
|
10
|
+
|
|
11
|
+
const serverOptions = {
|
|
12
|
+
run: { command: process.execPath, args: [serverModule] },
|
|
13
|
+
debug: { command: process.execPath, args: [serverModule] },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
const lc = require('vscode-languageclient/node');
|
|
18
|
+
client = new lc.LanguageClient('soma', 'SOMA', serverOptions, {
|
|
19
|
+
documentSelector: [
|
|
20
|
+
{ scheme: 'file', language: 'html' },
|
|
21
|
+
{ scheme: 'file', language: 'yaml' },
|
|
22
|
+
],
|
|
23
|
+
synchronize: {
|
|
24
|
+
fileEvents: lc.Workspace.createFileSystemWatcher('**/*.{html,yaml}'),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
context.subscriptions.push(client.start());
|
|
28
|
+
} catch {
|
|
29
|
+
vscode.window.showInformationMessage(
|
|
30
|
+
'SOMA: 安装 vscode-languageclient 后启用 LSP。运行: npx soma lsp',
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function deactivate() {
|
|
36
|
+
if (client) return client.stop();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = { activate, deactivate };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comments": {
|
|
3
|
+
"lineComment": "#"
|
|
4
|
+
},
|
|
5
|
+
"brackets": [
|
|
6
|
+
["{", "}"],
|
|
7
|
+
["[", "]"],
|
|
8
|
+
["(", ")"]
|
|
9
|
+
],
|
|
10
|
+
"autoClosingPairs": [
|
|
11
|
+
{ "open": "{", "close": "}" },
|
|
12
|
+
{ "open": "[", "close": "]" },
|
|
13
|
+
{ "open": "(", "close": ")" },
|
|
14
|
+
{ "open": "\"", "close": "\"" },
|
|
15
|
+
{ "open": "'", "close": "'" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
|
|
3
|
+
"name": "soma-vscode",
|
|
4
|
+
|
|
5
|
+
"displayName": "SOMA",
|
|
6
|
+
|
|
7
|
+
"description": "SOMA Language Server — html/ui/event 锚点诊断、YAML 补全与高亮",
|
|
8
|
+
|
|
9
|
+
"version": "1.1.0",
|
|
10
|
+
|
|
11
|
+
"publisher": "soma",
|
|
12
|
+
|
|
13
|
+
"engines": { "vscode": "^1.85.0" },
|
|
14
|
+
|
|
15
|
+
"categories": ["Linters", "Programming Languages", "Other"],
|
|
16
|
+
|
|
17
|
+
"activationEvents": ["onLanguage:html", "onLanguage:yaml"],
|
|
18
|
+
|
|
19
|
+
"main": "./extension.js",
|
|
20
|
+
|
|
21
|
+
"contributes": {
|
|
22
|
+
|
|
23
|
+
"languages": [
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
|
|
27
|
+
"id": "soma-ui-yaml",
|
|
28
|
+
|
|
29
|
+
"aliases": ["SOMA UI YAML"],
|
|
30
|
+
|
|
31
|
+
"extensions": ["_ui.yaml"],
|
|
32
|
+
|
|
33
|
+
"configuration": "./language-configuration.json"
|
|
34
|
+
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
{
|
|
38
|
+
|
|
39
|
+
"id": "soma-event-yaml",
|
|
40
|
+
|
|
41
|
+
"aliases": ["SOMA Event YAML"],
|
|
42
|
+
|
|
43
|
+
"extensions": ["_event.yaml"],
|
|
44
|
+
|
|
45
|
+
"configuration": "./language-configuration.json"
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
],
|
|
50
|
+
|
|
51
|
+
"grammars": [
|
|
52
|
+
|
|
53
|
+
{
|
|
54
|
+
|
|
55
|
+
"language": "soma-ui-yaml",
|
|
56
|
+
|
|
57
|
+
"scopeName": "source.soma-ui-yaml",
|
|
58
|
+
|
|
59
|
+
"path": "./syntaxes/soma-ui-yaml.tmLanguage.json"
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
{
|
|
64
|
+
|
|
65
|
+
"language": "soma-event-yaml",
|
|
66
|
+
|
|
67
|
+
"scopeName": "source.soma-event-yaml",
|
|
68
|
+
|
|
69
|
+
"path": "./syntaxes/soma-event-yaml.tmLanguage.json"
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
],
|
|
74
|
+
|
|
75
|
+
"configuration": {
|
|
76
|
+
|
|
77
|
+
"title": "SOMA",
|
|
78
|
+
|
|
79
|
+
"properties": {
|
|
80
|
+
|
|
81
|
+
"soma.lspPath": {
|
|
82
|
+
|
|
83
|
+
"type": "string",
|
|
84
|
+
|
|
85
|
+
"default": "soma-lsp",
|
|
86
|
+
|
|
87
|
+
"description": "Path to soma-lsp binary"
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SOMA Event YAML",
|
|
3
|
+
"scopeName": "source.soma-event-yaml",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{ "include": "#comments" },
|
|
6
|
+
{ "include": "#event-line" }
|
|
7
|
+
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"comments": {
|
|
10
|
+
"match": "^\\s*#.*$",
|
|
11
|
+
"name": "comment.line.number-sign.soma-event"
|
|
12
|
+
},
|
|
13
|
+
"event-line": {
|
|
14
|
+
"match": "^\\s*([\\w@.-]+)\\.([\\w.]+)\\s*:\\s*(UI_REFRESH|NAV_ACTION|NAV_STATIC|UI_INTERACT|CONFIRM)\\s*\\|\\s*(.+?)\\s*$",
|
|
15
|
+
"captures": {
|
|
16
|
+
"1": { "name": "entity.name.tag.soma-anchor" },
|
|
17
|
+
"2": { "name": "support.type.soma-trigger" },
|
|
18
|
+
"3": { "name": "keyword.control.soma-event-type" },
|
|
19
|
+
"4": { "name": "entity.name.function.soma-handler" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"fallback-anchor": {
|
|
23
|
+
"match": "^\\s*([\\w@.-]+)\\.([\\w.]+)\\s*:",
|
|
24
|
+
"captures": {
|
|
25
|
+
"1": { "name": "entity.name.tag.soma-anchor" },
|
|
26
|
+
"2": { "name": "support.type.soma-trigger" }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SOMA UI YAML",
|
|
3
|
+
"scopeName": "source.soma-ui-yaml",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{ "include": "#comments" },
|
|
6
|
+
{ "include": "#root-keys" },
|
|
7
|
+
{ "include": "#bind-block" },
|
|
8
|
+
{ "include": "#show-key" },
|
|
9
|
+
{ "include": "#path-value" }
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"comments": {
|
|
13
|
+
"match": "^\\s*#.*$",
|
|
14
|
+
"name": "comment.line.number-sign.soma-ui"
|
|
15
|
+
},
|
|
16
|
+
"root-keys": {
|
|
17
|
+
"match": "^(bind|show|model|when)\\s*:",
|
|
18
|
+
"captures": {
|
|
19
|
+
"1": { "name": "keyword.control.soma-ui-root" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"bind-block": {
|
|
23
|
+
"match": "^\\s{2}(obj|var)\\s*:\\s*(.+)$",
|
|
24
|
+
"captures": {
|
|
25
|
+
"1": { "name": "keyword.other.soma-bind-key" },
|
|
26
|
+
"2": { "name": "entity.name.type.soma-domain" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"show-key": {
|
|
30
|
+
"match": "^\\s{2}([\\w@.-]+)\\s*:",
|
|
31
|
+
"captures": {
|
|
32
|
+
"1": { "name": "entity.name.tag.soma-anchor" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"path-value": {
|
|
36
|
+
"match": ":\\s*(page\\.[\\w.]+)",
|
|
37
|
+
"captures": {
|
|
38
|
+
"1": { "name": "variable.other.soma-path" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
package/global.d.ts
CHANGED
|
@@ -8,7 +8,26 @@ declare module '*.yaml' {
|
|
|
8
8
|
export default content;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
declare module '*.yml' {
|
|
12
|
-
const content: string;
|
|
13
|
-
export default content;
|
|
11
|
+
declare module '*.yml' {
|
|
12
|
+
const content: string;
|
|
13
|
+
export default content;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Dev console API (window.__SOMA__ in npm run dev) */
|
|
17
|
+
interface SomaDevConsole {
|
|
18
|
+
getDiagnosticsSnapshot: () => import('./core/diagnostics/SomaDiagnostics').SomaDiagnosticsSnapshot | null;
|
|
19
|
+
getTelemetrySnapshot: () => Record<string, { count: number; avg: number; max: number; min: number }> | null;
|
|
20
|
+
getAvailableThemes?: () => string[];
|
|
21
|
+
getDomainInstance: () => unknown;
|
|
22
|
+
captureSnapshot: () => number | null;
|
|
23
|
+
restoreSnapshot: (id: number) => void;
|
|
24
|
+
switchTheme: (name: string | null) => void;
|
|
14
25
|
}
|
|
26
|
+
|
|
27
|
+
declare global {
|
|
28
|
+
interface Window {
|
|
29
|
+
__SOMA__?: SomaDevConsole;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export {};
|
package/next.config.js
CHANGED
|
@@ -1,33 +1,102 @@
|
|
|
1
1
|
/** @type {import('next').NextConfig} */
|
|
2
|
+
const fs = require('fs');
|
|
2
3
|
const path = require('path');
|
|
4
|
+
const { SomaManifestWebpackPlugin } = require('./core/compiler/soma-manifest-webpack-plugin');
|
|
3
5
|
|
|
4
6
|
const rawHostDir = process.env.SOMA_HOST_DIR;
|
|
5
7
|
if (!rawHostDir || !String(rawHostDir).trim()) {
|
|
6
8
|
throw new Error(
|
|
7
|
-
'[soma-core]
|
|
9
|
+
'[soma-core] Set SOMA_HOST_DIR to your host app root. Use `npx soma` or set it in npm scripts.',
|
|
8
10
|
);
|
|
9
11
|
}
|
|
10
12
|
const hostDir = path.resolve(rawHostDir);
|
|
11
13
|
|
|
14
|
+
function resolveOptionalHostFile(relativePath, fallbackPath) {
|
|
15
|
+
const hostFile = path.resolve(hostDir, relativePath);
|
|
16
|
+
if (fs.existsSync(hostFile)) {
|
|
17
|
+
return hostFile;
|
|
18
|
+
}
|
|
19
|
+
return path.resolve(__dirname, fallbackPath);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function readHostFileDependencyEntries() {
|
|
23
|
+
const packageJsonPath = path.join(hostDir, 'package.json');
|
|
24
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
30
|
+
const dependencies = {
|
|
31
|
+
...(packageJson.dependencies ?? {}),
|
|
32
|
+
...(packageJson.devDependencies ?? {}),
|
|
33
|
+
};
|
|
34
|
+
return Object.entries(dependencies)
|
|
35
|
+
.filter(([, version]) => typeof version === 'string' && version.startsWith('file:'))
|
|
36
|
+
.map(([name, version]) => ({
|
|
37
|
+
name,
|
|
38
|
+
root: path.resolve(hostDir, String(version).slice('file:'.length)),
|
|
39
|
+
}))
|
|
40
|
+
.filter((entry) => fs.existsSync(entry.root));
|
|
41
|
+
} catch {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function readEnvTranspilePackages() {
|
|
47
|
+
return String(process.env.SOMA_TRANSPILE_PACKAGES ?? '')
|
|
48
|
+
.split(',')
|
|
49
|
+
.map((item) => item.trim())
|
|
50
|
+
.filter(Boolean);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const hostFileDependencyEntries = readHostFileDependencyEntries();
|
|
54
|
+
const transpilePackages = [
|
|
55
|
+
...new Set(['soma-core', ...hostFileDependencyEntries.map((entry) => entry.name), ...readEnvTranspilePackages()]),
|
|
56
|
+
];
|
|
57
|
+
|
|
12
58
|
const nextConfig = {
|
|
13
59
|
experimental: {
|
|
14
60
|
externalDir: true,
|
|
61
|
+
serverComponentsExternalPackages: ['jiti'],
|
|
15
62
|
},
|
|
16
63
|
|
|
64
|
+
transpilePackages,
|
|
65
|
+
|
|
17
66
|
webpack: (config) => {
|
|
67
|
+
config.resolve.alias['@'] = __dirname;
|
|
68
|
+
config.resolve.alias['soma-core$'] = path.resolve(__dirname, 'core/index.ts');
|
|
69
|
+
config.resolve.alias['soma-core/base$'] = path.resolve(__dirname, 'core/base/index.ts');
|
|
18
70
|
config.resolve.alias['@core'] = path.resolve(__dirname, 'core');
|
|
71
|
+
for (const entry of hostFileDependencyEntries) {
|
|
72
|
+
config.resolve.alias[entry.name] = entry.root;
|
|
73
|
+
}
|
|
74
|
+
config.resolve.alias['@soma-host/bootstrap/soma-bootstrap'] = resolveOptionalHostFile(
|
|
75
|
+
'bootstrap/soma-bootstrap.ts',
|
|
76
|
+
'core/host/soma-bootstrap-host.stub.ts',
|
|
77
|
+
);
|
|
78
|
+
config.resolve.alias['@soma-host/config/locale.yaml'] = resolveOptionalHostFile(
|
|
79
|
+
'config/locale.yaml',
|
|
80
|
+
'core/host/locale.stub.ts',
|
|
81
|
+
);
|
|
82
|
+
config.resolve.alias['@soma-host/config/app.config.yaml'] = resolveOptionalHostFile(
|
|
83
|
+
'config/app.config.yaml',
|
|
84
|
+
'core/host/app-config.stub.ts',
|
|
85
|
+
);
|
|
19
86
|
config.resolve.alias['@soma-host'] = hostDir;
|
|
20
87
|
|
|
88
|
+
config.plugins.push(new SomaManifestWebpackPlugin({ hostDir }));
|
|
89
|
+
|
|
21
90
|
config.module.rules.push(
|
|
22
91
|
{
|
|
23
|
-
test: /_(ui|event)\.ya?ml$/,
|
|
92
|
+
test: /_(ui|event|style)\.ya?ml$/,
|
|
24
93
|
type: 'javascript/auto',
|
|
25
94
|
use: [
|
|
26
95
|
{ loader: path.resolve(__dirname, 'core/compiler/soma-webpack-loader.js') },
|
|
27
96
|
],
|
|
28
97
|
},
|
|
29
98
|
{
|
|
30
|
-
test: /\.(config|locale)\.ya?ml$/,
|
|
99
|
+
test: /\.(config|locale(\.[a-zA-Z-]+)?)\.ya?ml$/,
|
|
31
100
|
type: 'javascript/auto',
|
|
32
101
|
use: [
|
|
33
102
|
{ loader: path.resolve(__dirname, 'core/compiler/soma-webpack-loader.js') },
|
|
@@ -36,7 +105,7 @@ const nextConfig = {
|
|
|
36
105
|
{ test: /\.html$/, type: 'asset/source' },
|
|
37
106
|
{
|
|
38
107
|
test: /\.ya?ml$/,
|
|
39
|
-
exclude: /_(ui|event)\.ya?ml$|\.(config|locale)\.ya?ml$/,
|
|
108
|
+
exclude: /_(ui|event|style)\.ya?ml$|\.(config|locale(\.[a-zA-Z-]+)?)\.ya?ml$/,
|
|
40
109
|
type: 'asset/source',
|
|
41
110
|
},
|
|
42
111
|
{ test: /\.md$/, type: 'asset/source' },
|
package/package.json
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soma-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "SOMA — Semantic Oriented Modular Architecture. A declarative frontend framework runtime built on Next.js 14+ App Router.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"soma",
|
|
7
|
+
"declarative-ui",
|
|
8
|
+
"nextjs",
|
|
9
|
+
"framework",
|
|
10
|
+
"modular-architecture"
|
|
11
|
+
],
|
|
6
12
|
"license": "MIT",
|
|
7
13
|
"author": "ivan <228268157@qq.com>",
|
|
8
14
|
"repository": {
|
|
@@ -11,19 +17,48 @@
|
|
|
11
17
|
"directory": "soma-core"
|
|
12
18
|
},
|
|
13
19
|
"main": "./core/index.ts",
|
|
14
|
-
"types": "./
|
|
20
|
+
"types": "./dist/types/index.d.ts",
|
|
21
|
+
"typesVersions": {
|
|
22
|
+
"*": {
|
|
23
|
+
"diagnostics": [
|
|
24
|
+
"./core/diagnostics/SomaTelemetry.ts"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
15
28
|
"bin": {
|
|
16
|
-
"soma": "bin/soma.cjs"
|
|
29
|
+
"soma": "bin/soma.cjs",
|
|
30
|
+
"soma-lsp": "bin/soma-lsp.cjs"
|
|
17
31
|
},
|
|
18
32
|
"exports": {
|
|
19
|
-
".":
|
|
20
|
-
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/types/index.d.ts",
|
|
35
|
+
"import": "./core/index.ts",
|
|
36
|
+
"require": "./dist/core/index.cjs",
|
|
37
|
+
"default": "./core/index.ts"
|
|
38
|
+
},
|
|
39
|
+
"./base": {
|
|
40
|
+
"types": "./dist/types/base/index.d.ts",
|
|
41
|
+
"import": "./core/base/index.ts",
|
|
42
|
+
"default": "./core/base/index.ts"
|
|
43
|
+
},
|
|
44
|
+
"./compiler/vite": "./core/compiler/vite-plugin-soma.ts",
|
|
45
|
+
"./compiler/webpack-loader": "./core/compiler/soma-webpack-loader.js",
|
|
46
|
+
"./diagnostics": {
|
|
47
|
+
"types": "./dist/types/diagnostics/SomaTelemetry.d.ts",
|
|
48
|
+
"import": "./core/diagnostics/SomaTelemetry.ts",
|
|
49
|
+
"require": "./dist/diagnostics/telemetry.cjs",
|
|
50
|
+
"default": "./core/diagnostics/SomaTelemetry.ts"
|
|
51
|
+
}
|
|
21
52
|
},
|
|
22
53
|
"files": [
|
|
23
54
|
"bin/soma.cjs",
|
|
55
|
+
"bin/soma-lsp.cjs",
|
|
56
|
+
"bin/soma-sync.cjs",
|
|
24
57
|
"core/",
|
|
58
|
+
"editor/",
|
|
25
59
|
"app/",
|
|
26
60
|
"dist/",
|
|
61
|
+
"dist/vscode/",
|
|
27
62
|
"next.config.js",
|
|
28
63
|
"tailwind.config.ts",
|
|
29
64
|
"postcss.config.js",
|
|
@@ -35,17 +70,23 @@
|
|
|
35
70
|
},
|
|
36
71
|
"scripts": {
|
|
37
72
|
"build:cli": "tsc -p tsconfig.cli.json",
|
|
38
|
-
"
|
|
39
|
-
"build": "
|
|
40
|
-
"
|
|
73
|
+
"build:precompile": "esbuild core/compiler/soma-precompile.ts --bundle --platform=node --format=cjs --outfile=core/compiler/soma-precompile.js",
|
|
74
|
+
"build:core-dist": "node scripts/build-core-dist.mjs",
|
|
75
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
76
|
+
"build:all": "npm run build:cli && npm run build:core-dist && npm run build:types",
|
|
77
|
+
"package:vscode": "node scripts/package-vscode.mjs",
|
|
78
|
+
"prepublishOnly": "npm run build:all",
|
|
79
|
+
"dev": "next dev",
|
|
80
|
+
"build": "next build",
|
|
81
|
+
"start": "next start",
|
|
41
82
|
"lint": "next lint",
|
|
42
|
-
"test": "
|
|
43
|
-
"test:watch": "
|
|
44
|
-
"typecheck": "tsc --noEmit"
|
|
45
|
-
"prepublishOnly": "npm run build:cli"
|
|
83
|
+
"test": "vitest run",
|
|
84
|
+
"test:watch": "vitest",
|
|
85
|
+
"typecheck": "tsc --noEmit"
|
|
46
86
|
},
|
|
47
87
|
"dependencies": {
|
|
48
88
|
"dompurify": "^3.0.9",
|
|
89
|
+
"jiti": "^1.21.7",
|
|
49
90
|
"js-yaml": "^4.1.0",
|
|
50
91
|
"reflect-metadata": "^0.2.1"
|
|
51
92
|
},
|
|
@@ -55,7 +96,6 @@
|
|
|
55
96
|
"react-dom": ">=18.0.0"
|
|
56
97
|
},
|
|
57
98
|
"devDependencies": {
|
|
58
|
-
"@playwright/test": "^1.59.1",
|
|
59
99
|
"@types/dompurify": "^3.0.5",
|
|
60
100
|
"@types/js-yaml": "^4.0.9",
|
|
61
101
|
"@types/node": "^20.11.0",
|
|
@@ -63,15 +103,16 @@
|
|
|
63
103
|
"@types/react-dom": "^18.3.0",
|
|
64
104
|
"@vitest/coverage-v8": "^3.2.4",
|
|
65
105
|
"autoprefixer": "^10.4.17",
|
|
66
|
-
"
|
|
106
|
+
"esbuild": "^0.25.12",
|
|
67
107
|
"jsdom": "^26.1.0",
|
|
68
108
|
"next": "^14.2.0",
|
|
69
|
-
"playwright": "^1.59.1",
|
|
70
109
|
"postcss": "^8.4.33",
|
|
71
110
|
"react": "^18.3.0",
|
|
72
111
|
"react-dom": "^18.3.0",
|
|
73
112
|
"tailwindcss": "^3.4.1",
|
|
74
113
|
"typescript": "^5.3.3",
|
|
75
|
-
"vitest": "^3.2.4"
|
|
114
|
+
"vitest": "^3.2.4",
|
|
115
|
+
"ws": "^8.21.0",
|
|
116
|
+
"@types/ws": "^8.5.13"
|
|
76
117
|
}
|
|
77
118
|
}
|