soma-core 2.2.8 → 2.2.10

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.
Files changed (98) hide show
  1. package/core/build/compiler/full-manifest-builder.ts +1 -1
  2. package/core/build/compiler/host-config-sync.cjs +1 -1
  3. package/core/build/compiler/soma-manifest-webpack-plugin.js +2 -6
  4. package/core/build/compiler/soma-precompile.js +84 -4
  5. package/core/client/a11y/announcer.ts +2 -16
  6. package/core/client/base/SomaPageRootBase.ts +2 -2
  7. package/core/client/base/defineSomaView.ts +11 -2
  8. package/core/client/base/runtime-services.types.ts +57 -0
  9. package/core/client/data/role-gate.ts +2 -8
  10. package/core/client/engine/event-engine.ts +1 -0
  11. package/core/client/engines/diff/adapter-jsdiff.ts +27 -8
  12. package/core/client/engines/diff/code.ts +205 -0
  13. package/core/client/engines/diff/index.ts +107 -6
  14. package/core/client/engines/diff/items.ts +212 -0
  15. package/core/client/engines/diff/port.ts +215 -3
  16. package/core/client/engines/diff/prose.ts +443 -0
  17. package/core/client/engines/engine-adapters.ts +6 -0
  18. package/core/client/engines/highlight/adapter-lezer.ts +109 -0
  19. package/core/client/engines/highlight/index.ts +135 -0
  20. package/core/client/engines/highlight/port.ts +92 -0
  21. package/core/client/engines/markdown/adapter-markdown-it.ts +65 -0
  22. package/core/client/engines/markdown/blocks.ts +335 -0
  23. package/core/client/engines/markdown/index.ts +51 -0
  24. package/core/client/engines/markdown/port.ts +94 -0
  25. package/core/client/engines/markdown/vendor-modules.d.ts +6 -0
  26. package/core/client/engines/structured/adapter-js-yaml.ts +33 -0
  27. package/core/client/engines/structured/index.ts +139 -0
  28. package/core/client/engines/structured/port.ts +59 -0
  29. package/core/client/infra/http/SomaHttpService.ts +2 -4
  30. package/core/client/infra/notify/DefaultNotifyService.ts +2 -3
  31. package/core/client/infra/permission/SomaPermission.ts +1 -1
  32. package/core/client/render-ports/notify-renderer.ts +2 -46
  33. package/core/client/runtime/SomaRuntimeServices.ts +16 -45
  34. package/core/server/host/app-config-composer.ts +6 -52
  35. package/core/server/host/host-config-paths.cjs +2 -100
  36. package/core/server/host/precompiled-manifest.ts +69 -0
  37. package/core/server/host/source-packages.cjs +3 -0
  38. package/core/server/infra/host-config-paths.cjs +100 -0
  39. package/core/server/page-assets.ts +2 -70
  40. package/core/server/runtime-space/bindings.ts +33 -4
  41. package/core/server/runtime-space/store.ts +16 -1
  42. package/core/shared/app-config-merge.ts +59 -0
  43. package/core/shared/registry-generated/limits.ts +84 -4
  44. package/core/shared/types/announcer.types.ts +18 -0
  45. package/core/shared/types/notify.types.ts +26 -0
  46. package/core/shared/types/role-gate.types.ts +11 -0
  47. package/dist/browser/runtime-bundle.manifest.json +51 -7
  48. package/dist/browser/soma-runtime.js +120952 -104762
  49. package/dist/core/index.cjs +113613 -97412
  50. package/dist/host-native/aot-builder.cjs +582 -371
  51. package/dist/host-native/native-server.cjs +203 -72
  52. package/dist/lsp/component-tree.cjs +84 -4
  53. package/dist/types/build/compiler/full-manifest-builder.d.ts +1 -1
  54. package/dist/types/client/a11y/announcer.d.ts +2 -14
  55. package/dist/types/client/base/SomaPageRootBase.d.ts +2 -2
  56. package/dist/types/client/base/runtime-services.types.d.ts +50 -0
  57. package/dist/types/client/data/role-gate.d.ts +2 -8
  58. package/dist/types/client/engines/diff/code.d.ts +27 -0
  59. package/dist/types/client/engines/diff/index.d.ts +2 -1
  60. package/dist/types/client/engines/diff/items.d.ts +24 -0
  61. package/dist/types/client/engines/diff/port.d.ts +201 -2
  62. package/dist/types/client/engines/diff/prose.d.ts +80 -0
  63. package/dist/types/client/engines/engine-adapters.d.ts +6 -0
  64. package/dist/types/client/engines/highlight/adapter-lezer.d.ts +6 -0
  65. package/dist/types/client/engines/highlight/index.d.ts +15 -0
  66. package/dist/types/client/engines/highlight/port.d.ts +64 -0
  67. package/dist/types/client/engines/markdown/adapter-markdown-it.d.ts +6 -0
  68. package/dist/types/client/engines/markdown/blocks.d.ts +29 -0
  69. package/dist/types/client/engines/markdown/index.d.ts +9 -0
  70. package/dist/types/client/engines/markdown/port.d.ts +166 -0
  71. package/dist/types/client/engines/structured/adapter-js-yaml.d.ts +6 -0
  72. package/dist/types/client/engines/structured/index.d.ts +29 -0
  73. package/dist/types/client/engines/structured/port.d.ts +45 -0
  74. package/dist/types/client/infra/http/SomaHttpService.d.ts +1 -1
  75. package/dist/types/client/infra/notify/DefaultNotifyService.d.ts +2 -3
  76. package/dist/types/client/infra/permission/SomaPermission.d.ts +1 -1
  77. package/dist/types/client/render-ports/notify-renderer.d.ts +1 -56
  78. package/dist/types/client/runtime/SomaRuntimeServices.d.ts +9 -44
  79. package/dist/types/server/host/app-config-composer.d.ts +2 -3
  80. package/dist/types/server/host/host-config-paths.d.cts +2 -7
  81. package/dist/types/server/host/precompiled-manifest.d.ts +5 -0
  82. package/dist/types/server/host/source-packages.d.cts +5 -0
  83. package/dist/types/server/infra/host-config-paths.d.cts +7 -0
  84. package/dist/types/server/page-assets.d.ts +2 -5
  85. package/dist/types/server/runtime-space/store.d.ts +4 -0
  86. package/dist/types/shared/app-config-merge.d.ts +3 -0
  87. package/dist/types/shared/registry-generated/limits.d.ts +82 -4
  88. package/dist/types/shared/types/announcer.types.d.ts +14 -0
  89. package/dist/types/shared/types/notify.types.d.ts +36 -0
  90. package/dist/types/shared/types/role-gate.types.d.ts +8 -0
  91. package/host-native/src/aot-builder.ts +159 -96
  92. package/host-native/src/dev-chunk-gc.ts +104 -0
  93. package/host-native/src/host-prepare.ts +1 -1
  94. package/host-native/src/manifest-http.ts +1 -1
  95. package/host-native/src/page-http.ts +2 -67
  96. package/host-native/src/page-payload-cache.ts +68 -0
  97. package/host-native/src/public-packages.cjs +147 -50
  98. package/package.json +16 -2
@@ -3,8 +3,9 @@ import zlib from 'node:zlib';
3
3
  import { resolveHostLoginPath, SOMA_DEFAULT_LOGIN_PATH } from 'soma-core/server/host-assembly';
4
4
  import { isStatusError } from '../../core/server/runtime-space/errors';
5
5
  import { SomaPublishedPageError } from '../../core/server/host/published-page-assets';
6
+ import { PagePayloadBufferCache, clearPagePayloadBufferCache } from './page-payload-cache';
6
7
 
7
- export { SOMA_DEFAULT_LOGIN_PATH };
8
+ export { SOMA_DEFAULT_LOGIN_PATH, PagePayloadBufferCache, clearPagePayloadBufferCache };
8
9
 
9
10
  export function resolveLoginPath(
10
11
  assembly?: { readonly login?: { readonly path?: string } } | null,
@@ -21,72 +22,6 @@ export interface CacheableLoadedPage {
21
22
  const VARY_DEFAULT = 'Cookie, Authorization';
22
23
  const VARY_ENCODING = 'Cookie, Authorization, Accept-Encoding';
23
24
 
24
- interface CachedPagePayload {
25
- readonly utf8: Uint8Array;
26
- readonly gzip: Uint8Array | null;
27
- readonly etag: string;
28
- readonly size: number;
29
- }
30
-
31
- const MAX_CACHE_ENTRIES = 256;
32
- const MAX_CACHE_BYTES = 64 * 1024 * 1024; // 64MB
33
-
34
- class PagePayloadBufferLRU {
35
- private cache = new Map<string, CachedPagePayload>();
36
- private totalBytes = 0;
37
-
38
- get(key: string): CachedPagePayload | undefined {
39
- const entry = this.cache.get(key);
40
- if (!entry) return undefined;
41
- // LRU refresh: re-insert to end
42
- this.cache.delete(key);
43
- this.cache.set(key, entry);
44
- return entry;
45
- }
46
-
47
- set(key: string, entry: CachedPagePayload): void {
48
- if (this.cache.has(key)) {
49
- const old = this.cache.get(key)!;
50
- this.totalBytes -= old.size;
51
- this.cache.delete(key);
52
- }
53
- while (
54
- (this.cache.size >= MAX_CACHE_ENTRIES || this.totalBytes + entry.size > MAX_CACHE_BYTES) &&
55
- this.cache.size > 0
56
- ) {
57
- const firstKey = this.cache.keys().next().value;
58
- if (firstKey !== undefined) {
59
- const item = this.cache.get(firstKey);
60
- if (item) this.totalBytes -= item.size;
61
- this.cache.delete(firstKey);
62
- } else {
63
- break;
64
- }
65
- }
66
- this.cache.set(key, entry);
67
- this.totalBytes += entry.size;
68
- }
69
-
70
- clear(): void {
71
- this.cache.clear();
72
- this.totalBytes = 0;
73
- }
74
-
75
- get size(): number {
76
- return this.cache.size;
77
- }
78
-
79
- get bytes(): number {
80
- return this.totalBytes;
81
- }
82
- }
83
-
84
- export const PagePayloadBufferCache = new PagePayloadBufferLRU();
85
-
86
- export function clearPagePayloadBufferCache(): void {
87
- PagePayloadBufferCache.clear();
88
- }
89
-
90
25
  function weakEtag(body: string | Uint8Array): string {
91
26
  return `W/"${createHash('sha1').update(body).digest('hex').slice(0, 20)}"`;
92
27
  }
@@ -0,0 +1,68 @@
1
+ // 页面响应体预序列化二进制缓冲池(LRU),供 host-prepare.ts 与 page-http.ts 共用。
2
+ // 从契约层 page-http.ts 抽出至应用层,解除 host-prepare.ts -> page-http.ts 的反向依赖。
3
+
4
+ export interface CachedPagePayload {
5
+ readonly utf8: Uint8Array;
6
+ readonly gzip: Uint8Array | null;
7
+ readonly etag: string;
8
+ readonly size: number;
9
+ }
10
+
11
+ const MAX_CACHE_ENTRIES = 256;
12
+ const MAX_CACHE_BYTES = 64 * 1024 * 1024; // 64MB
13
+
14
+ class PagePayloadBufferLRU {
15
+ private cache = new Map<string, CachedPagePayload>();
16
+ private totalBytes = 0;
17
+
18
+ get(key: string): CachedPagePayload | undefined {
19
+ const entry = this.cache.get(key);
20
+ if (!entry) return undefined;
21
+ // LRU refresh: re-insert to end
22
+ this.cache.delete(key);
23
+ this.cache.set(key, entry);
24
+ return entry;
25
+ }
26
+
27
+ set(key: string, entry: CachedPagePayload): void {
28
+ if (this.cache.has(key)) {
29
+ const old = this.cache.get(key)!;
30
+ this.totalBytes -= old.size;
31
+ this.cache.delete(key);
32
+ }
33
+ while (
34
+ (this.cache.size >= MAX_CACHE_ENTRIES || this.totalBytes + entry.size > MAX_CACHE_BYTES) &&
35
+ this.cache.size > 0
36
+ ) {
37
+ const firstKey = this.cache.keys().next().value;
38
+ if (firstKey !== undefined) {
39
+ const item = this.cache.get(firstKey);
40
+ if (item) this.totalBytes -= item.size;
41
+ this.cache.delete(firstKey);
42
+ } else {
43
+ break;
44
+ }
45
+ }
46
+ this.cache.set(key, entry);
47
+ this.totalBytes += entry.size;
48
+ }
49
+
50
+ clear(): void {
51
+ this.cache.clear();
52
+ this.totalBytes = 0;
53
+ }
54
+
55
+ get size(): number {
56
+ return this.cache.size;
57
+ }
58
+
59
+ get bytes(): number {
60
+ return this.totalBytes;
61
+ }
62
+ }
63
+
64
+ export const PagePayloadBufferCache = new PagePayloadBufferLRU();
65
+
66
+ export function clearPagePayloadBufferCache(): void {
67
+ PagePayloadBufferCache.clear();
68
+ }
@@ -2,6 +2,11 @@
2
2
 
3
3
  const fs = require('node:fs');
4
4
  const path = require('node:path');
5
+ const {
6
+ isSomaSourcePackage,
7
+ readExplicitSourcePackages,
8
+ resolvePackageRoot,
9
+ } = require('../../core/server/host/source-packages.cjs');
5
10
 
6
11
  function readJson(filePath) {
7
12
  try {
@@ -16,6 +21,16 @@ function isSafePackageChild(packageRoot, candidate) {
16
21
  return candidate === packageRoot || candidate.startsWith(`${packageRoot}${path.sep}`);
17
22
  }
18
23
 
24
+ function isDirectoryOrSymlinkToDir(baseDir, entry) {
25
+ if (entry.isDirectory()) return true;
26
+ if (!entry.isSymbolicLink()) return false;
27
+ try {
28
+ return fs.statSync(path.join(baseDir, entry.name)).isDirectory();
29
+ } catch {
30
+ return false;
31
+ }
32
+ }
33
+
19
34
  function collectFiles(root) {
20
35
  if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) return [];
21
36
  const files = [];
@@ -60,59 +75,68 @@ function expandWildcardExportAliases(packageName, packageRoot, entry, target) {
60
75
  }
61
76
 
62
77
  /**
63
- * 枚举单个包 package.json 中的公开 exports 映射表。
78
+ * 枚举单个包 package.json 中的公开 exports 映射表(缺省 exports 时回退 main)。
64
79
  * 返回 map: specifier -> resolvedFilePath
65
80
  */
66
81
  function readPublicPackageAliases(packageName, packageRoot) {
67
- const exportsMap = readJson(path.join(packageRoot, 'package.json'))?.exports;
68
- if (!exportsMap || typeof exportsMap !== 'object') return {};
82
+ const pkgJson = readJson(path.join(packageRoot, 'package.json'));
83
+ const exportsMap = pkgJson?.exports;
69
84
 
70
85
  const exactAliases = {};
71
86
  const wildcardAliases = {};
72
87
 
73
- for (const [entry, descriptor] of Object.entries(exportsMap)) {
74
- if (entry !== '.' && !entry.startsWith('./')) continue;
75
- let target = null;
76
- if (typeof descriptor === 'string') {
77
- target = descriptor;
78
- } else if (descriptor && typeof descriptor === 'object') {
79
- target =
80
- descriptor.import?.default ??
81
- descriptor.import ??
82
- descriptor.default ??
83
- descriptor.require?.default ??
84
- descriptor.require;
85
- if (typeof target === 'object' && target !== null) {
86
- target = target.default;
88
+ if (exportsMap && typeof exportsMap === 'object') {
89
+ for (const [entry, descriptor] of Object.entries(exportsMap)) {
90
+ if (entry !== '.' && !entry.startsWith('./')) continue;
91
+ let target = null;
92
+ if (typeof descriptor === 'string') {
93
+ target = descriptor;
94
+ } else if (descriptor && typeof descriptor === 'object') {
95
+ target =
96
+ descriptor.import?.default ??
97
+ descriptor.import ??
98
+ descriptor.default ??
99
+ descriptor.require?.default ??
100
+ descriptor.require;
101
+ if (typeof target === 'object' && target !== null) {
102
+ target = target.default;
103
+ }
104
+ }
105
+ if (typeof target !== 'string' || !target.startsWith('./')) continue;
106
+
107
+ const isWildcard = entry.includes('*') || target.includes('*');
108
+ if (entry.includes('*') !== target.includes('*')) continue;
109
+ if (isWildcard) {
110
+ Object.assign(
111
+ wildcardAliases,
112
+ expandWildcardExportAliases(packageName, packageRoot, entry, target),
113
+ );
114
+ continue;
87
115
  }
116
+
117
+ const resolved = path.resolve(packageRoot, target);
118
+ if (!isSafePackageChild(packageRoot, resolved) || !fs.existsSync(resolved)) continue;
119
+ const publicPath = entry === '.' ? '' : entry.slice(2);
120
+ const specifier = publicPath ? `${packageName}/${publicPath}` : packageName;
121
+ exactAliases[specifier] = resolved;
88
122
  }
89
- if (typeof target !== 'string' || !target.startsWith('./')) continue;
90
-
91
- const isWildcard = entry.includes('*') || target.includes('*');
92
- if (entry.includes('*') !== target.includes('*')) continue;
93
- if (isWildcard) {
94
- Object.assign(
95
- wildcardAliases,
96
- expandWildcardExportAliases(packageName, packageRoot, entry, target),
97
- );
98
- continue;
123
+ } else if (typeof pkgJson?.main === 'string' && pkgJson.main.trim()) {
124
+ const resolved = path.resolve(packageRoot, pkgJson.main.trim());
125
+ if (isSafePackageChild(packageRoot, resolved) && fs.existsSync(resolved) && fs.statSync(resolved).isFile()) {
126
+ exactAliases[packageName] = resolved;
99
127
  }
100
-
101
- const resolved = path.resolve(packageRoot, target);
102
- if (!isSafePackageChild(packageRoot, resolved) || !fs.existsSync(resolved)) continue;
103
- const publicPath = entry === '.' ? '' : entry.slice(2);
104
- const specifier = publicPath ? `${packageName}/${publicPath}` : packageName;
105
- exactAliases[specifier] = resolved;
106
128
  }
107
129
 
108
130
  return { ...wildcardAliases, ...exactAliases };
109
131
  }
110
132
 
111
133
  /**
112
- * 扫描仓库/依赖中的全部 soma-* 包并生成完整的别名表
134
+ * 扫描仓库/依赖中的全部 soma-* 包及声明了 soma.source(或 SOMA_SOURCE_PACKAGES)的源包,
135
+ * 生成完整的公开入口别名表。源包判定唯一复用 core/server/host/source-packages.cjs(S1-d)。
113
136
  */
114
- function readAllSomaPublicAliases(hostDir, repoRoot, extraRoots = []) {
137
+ function readAllSomaPublicAliases(hostDir, repoRoot, extraRoots = [], env = process.env) {
115
138
  const aliases = {};
139
+ const explicitPackages = new Set(readExplicitSourcePackages(env));
116
140
  const searchRoots = [
117
141
  repoRoot,
118
142
  path.join(repoRoot, 'soma-core'),
@@ -130,37 +154,110 @@ function readAllSomaPublicAliases(hostDir, repoRoot, extraRoots = []) {
130
154
  }
131
155
 
132
156
  const seenPackages = new Set();
157
+ const seenNodeModules = new Set();
158
+
159
+ const shouldIncludePackage = (pkgName, pkgRoot) =>
160
+ Boolean(pkgName) && (pkgName.startsWith('soma-') || isSomaSourcePackage(pkgRoot, explicitPackages.has(pkgName)));
161
+
162
+ const registerPackage = (pkgName, pkgRoot) => {
163
+ if (!pkgName || seenPackages.has(pkgName) || !fs.existsSync(pkgRoot)) return;
164
+ if (!shouldIncludePackage(pkgName, pkgRoot)) return;
165
+ seenPackages.add(pkgName);
166
+ Object.assign(aliases, readPublicPackageAliases(pkgName, pkgRoot));
167
+ // 递归检查源包自带的嵌套 node_modules(防止传递源包未被提升到宿主根时漏扫)
168
+ const nestedNm = path.join(pkgRoot, 'node_modules');
169
+ if (fs.existsSync(nestedNm)) scanNodeModules(nestedNm);
170
+ };
171
+
172
+ const scanNodeModules = (nmDir) => {
173
+ let realNm = path.resolve(nmDir);
174
+ try {
175
+ realNm = fs.realpathSync(nmDir);
176
+ } catch {
177
+ /* keep resolved */
178
+ }
179
+ if (seenNodeModules.has(realNm)) return;
180
+ seenNodeModules.add(realNm);
181
+
182
+ let entries = [];
183
+ try {
184
+ entries = fs.readdirSync(nmDir, { withFileTypes: true });
185
+ } catch {
186
+ return;
187
+ }
188
+ for (const entry of entries) {
189
+ if (entry.name.startsWith('.')) continue;
190
+ if (!isDirectoryOrSymlinkToDir(nmDir, entry)) continue;
191
+ const entryPath = path.join(nmDir, entry.name);
192
+ if (entry.name.startsWith('@')) {
193
+ let scopedEntries = [];
194
+ try {
195
+ scopedEntries = fs.readdirSync(entryPath, { withFileTypes: true });
196
+ } catch {
197
+ scopedEntries = [];
198
+ }
199
+ for (const scoped of scopedEntries) {
200
+ if (scoped.name.startsWith('.')) continue;
201
+ if (!isDirectoryOrSymlinkToDir(entryPath, scoped)) continue;
202
+ registerPackage(`${entry.name}/${scoped.name}`, path.join(entryPath, scoped.name));
203
+ }
204
+ } else {
205
+ registerPackage(entry.name, entryPath);
206
+ }
207
+ }
208
+ };
133
209
 
134
210
  for (const searchRoot of searchRoots) {
135
- if (!fs.existsSync(searchRoot)) continue;
211
+ if (!searchRoot || !fs.existsSync(searchRoot)) continue;
136
212
  const pkgJsonPath = path.join(searchRoot, 'package.json');
137
213
  const pkgJson = readJson(pkgJsonPath);
138
- if (pkgJson?.name && pkgJson.name.startsWith('soma-') && !seenPackages.has(pkgJson.name)) {
139
- seenPackages.add(pkgJson.name);
140
- Object.assign(aliases, readPublicPackageAliases(pkgJson.name, searchRoot));
214
+ if (pkgJson?.name) {
215
+ registerPackage(pkgJson.name, searchRoot);
216
+ }
217
+
218
+ // 检查声明在 dependencies / devDependencies(含 file: 依赖)及 SOMA_SOURCE_PACKAGES 里的源包
219
+ const deps = {
220
+ ...(pkgJson?.dependencies ?? {}),
221
+ ...(pkgJson?.devDependencies ?? {}),
222
+ };
223
+ const depNames = new Set([...Object.keys(deps), ...explicitPackages]);
224
+ for (const depName of depNames) {
225
+ if (seenPackages.has(depName)) continue;
226
+ const depRoot = resolvePackageRoot(searchRoot, depName, deps[depName]);
227
+ if (depRoot) registerPackage(depName, depRoot);
141
228
  }
142
229
 
143
- // 检查子目录或 node_modules
230
+ // 扫描 node_modules(含实包、软链与 @scope/*)
144
231
  const nm = path.join(searchRoot, 'node_modules');
145
232
  if (fs.existsSync(nm)) {
146
- try {
147
- for (const entry of fs.readdirSync(nm, { withFileTypes: true })) {
148
- if (!entry.isDirectory()) continue;
149
- if (entry.name.startsWith('soma-') && !seenPackages.has(entry.name)) {
150
- const pkgPath = path.join(nm, entry.name);
151
- seenPackages.add(entry.name);
152
- Object.assign(aliases, readPublicPackageAliases(entry.name, pkgPath));
153
- }
154
- }
155
- } catch {}
233
+ scanNodeModules(nm);
156
234
  }
157
235
  }
158
236
 
159
237
  return aliases;
160
238
  }
161
239
 
240
+ /**
241
+ * 根据别名表构造 esbuild `onResolve` 过滤正则(精确覆盖全部公开包根,含 `@scope/pkg`);空表返回 null。
242
+ */
243
+ function createPublicAliasesFilter(aliases) {
244
+ const roots = new Set();
245
+ for (const spec of Object.keys(aliases || {})) {
246
+ const root = spec.startsWith('@')
247
+ ? spec.split('/').slice(0, 2).join('/')
248
+ : spec.split('/')[0];
249
+ if (root) roots.add(root);
250
+ }
251
+ if (roots.size === 0) return null;
252
+ const escaped = [...roots]
253
+ .sort()
254
+ .map((name) => name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
255
+ return new RegExp(`^(?:${escaped.join('|')})(?:/.*)?$`);
256
+ }
257
+
162
258
  module.exports = {
163
259
  readJson,
164
260
  readPublicPackageAliases,
165
261
  readAllSomaPublicAliases,
262
+ createPublicAliasesFilter,
166
263
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soma-core",
3
- "version": "2.2.8",
3
+ "version": "2.2.10",
4
4
  "description": "SOMA — Semantic Oriented Modular Architecture. A declarative frontend framework runtime with no UI framework dependency; native host shell ships in host-native/.",
5
5
  "keywords": [
6
6
  "soma",
@@ -311,6 +311,17 @@
311
311
  "dependencies": {
312
312
  "@atlaskit/pragmatic-drag-and-drop": "1.8.1",
313
313
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "1.2.0",
314
+ "@lezer/css": "1.3.9",
315
+ "@lezer/go": "1.0.1",
316
+ "@lezer/highlight": "1.2.5",
317
+ "@lezer/html": "1.3.13",
318
+ "@lezer/java": "1.2.0",
319
+ "@lezer/javascript": "1.5.6",
320
+ "@lezer/json": "1.0.3",
321
+ "@lezer/markdown": "1.8.1",
322
+ "@lezer/python": "1.1.19",
323
+ "@lezer/xml": "1.0.6",
324
+ "@lezer/yaml": "1.0.4",
314
325
  "@tanstack/table-core": "8.21.3",
315
326
  "@tanstack/virtual-core": "3.19.7",
316
327
  "@zag-js/combobox": "1.46.0",
@@ -328,11 +339,14 @@
328
339
  "esbuild": "0.25.12",
329
340
  "jiti": "1.21.7",
330
341
  "js-yaml": "4.3.2",
342
+ "markdown-it": "15.0.3",
343
+ "markdown-it-cjk-friendly": "3.0.0",
344
+ "markdown-it-footnote": "4.0.0",
331
345
  "mime-types": "2.1.35",
332
346
  "parse5": "7.3.0",
333
347
  "qrcode-generator": "2.0.4",
334
348
  "server-only": "0.0.1",
335
- "soma-foundation": "^0.1.5",
349
+ "soma-foundation": "^0.1.6",
336
350
  "temporal-polyfill": "0.3.2"
337
351
  },
338
352
  "peerDependencies": {