tcdona_unilib 1.0.11 → 1.0.14

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 (72) hide show
  1. package/.prettierrc.json +6 -0
  2. package/animejs.ts +13 -1
  3. package/ast-grep.ts +42 -0
  4. package/big.ts +2 -2
  5. package/clipboardy.ts +1 -1
  6. package/dayjs.ts +2 -2
  7. package/dotenvx.ts +15 -2
  8. package/eff/aff.ts +161 -0
  9. package/eff/aff.util.ts +218 -0
  10. package/eff/eff.delay.ts +21 -0
  11. package/eff/eff.ts +225 -0
  12. package/eff/effcan.ts +286 -0
  13. package/eff/throwable.ts +11 -0
  14. package/effector.ts +33 -2
  15. package/es-toolkit.ts +1 -7
  16. package/exome.ts +10 -2
  17. package/hono.ts +18 -2
  18. package/hotkeys-js.ts +3 -2
  19. package/idmeta.json +42 -0
  20. package/inquirer.ts +1 -1
  21. package/koka/async.ts +2 -7
  22. package/koka/ctx.ts +2 -9
  23. package/koka/err.ts +2 -9
  24. package/koka/gen.ts +2 -9
  25. package/koka/index.ts +1 -1
  26. package/koka/opt.ts +2 -7
  27. package/koka/result.ts +6 -9
  28. package/koka/task.ts +2 -8
  29. package/koka-domain.ts +13 -16
  30. package/koka.ts +29 -34
  31. package/magic-regexp.ts +28 -2
  32. package/marked.ts +28 -2
  33. package/nanoid.ts +7 -1
  34. package/nanostores.ts +31 -2
  35. package/neverthrow.ts +2 -2
  36. package/package.json +24 -33
  37. package/pathe.ts +16 -1
  38. package/pinyin-pro.ts +16 -2
  39. package/prettier.ts +20 -2
  40. package/staticMeta/enum.api.ts +111 -82
  41. package/staticMeta/err.ts +64 -0
  42. package/staticMeta/file.yml.ts +22 -13
  43. package/staticMeta/md.html2md.ts +38 -0
  44. package/staticMeta/md.md2html.ts +203 -0
  45. package/staticMeta/path.init.ts +12 -12
  46. package/staticMeta/string.nanoid.ts +7 -7
  47. package/staticMeta/url.ts +57 -54
  48. package/tinypool.ts +29 -2
  49. package/turndown.ts +1 -1
  50. package/vite.ts +2 -2
  51. package/viteplugin/md.plugin.dist.d.ts +18 -0
  52. package/viteplugin/md.plugin.dist.js +1133 -0
  53. package/viteplugin/md.plugin.ts +22 -0
  54. package/viteplugin/vite-env.d.ts +6 -0
  55. package/viteplugin/vite.config.ts +62 -0
  56. package/vue.ts +2 -12
  57. package/zod.ts +19 -2
  58. package/zx.ts +25 -1
  59. package/@ast-grep.ts +0 -18
  60. package/comctx.ts +0 -2
  61. package/hono/cors.ts +0 -1
  62. package/hono/logger.ts +0 -1
  63. package/hono/timeout.ts +0 -1
  64. package/staticMeta/ast.scan.ts +0 -131
  65. package/staticMeta/ast.ts +0 -259
  66. package/staticMeta/eff.delay.ts +0 -17
  67. package/staticMeta/eff.ts +0 -203
  68. package/staticMeta/iduniq.ts +0 -320
  69. package/staticMeta/idupdate.ts +0 -374
  70. package/staticMeta/pkg.json.ts +0 -138
  71. package/staticMeta/project.ts +0 -98
  72. package/staticMeta/sync.ts +0 -296
package/eff/eff.ts ADDED
@@ -0,0 +1,225 @@
1
+ /**
2
+ * Eff 框架:基于 Result 的异步任务管理
3
+ * - root/create:创建异步任务
4
+ * - all/any/race/allSettled:并行或竞速执行多个任务
5
+ * - Signal 传播:支持任务取消和自动清理
6
+ * - 支持返回 Result AsyncResult 不支持直接返回值
7
+ */
8
+ import type { Result } from 'neverthrow'
9
+ import { err, ok, ResultAsync } from 'neverthrow'
10
+
11
+ export interface EffContext {
12
+ signal: AbortSignal
13
+ }
14
+
15
+ /**
16
+ * 任务执行器类型
17
+ *
18
+ * 设计说明:
19
+ * - 只接受函数,不接受直接的 ResultAsync<T, E>
20
+ * - 原因:函数形式表示延迟执行(调用时才执行),而 ResultAsync 表示已开始执行
21
+ * - 与 Promise.all 设计一致:接受函数数组而非 Promise 数组
22
+ * - 保持类型简单,避免运行时 instanceof 检查
23
+ * - 未来不应修改为支持 ResultAsync,以保持语义清晰和性能最优
24
+ */
25
+ type EffExecutor<T, E> = (ctx: EffContext) => PromiseLike<Result<T, E>>
26
+ type NonEmptyArray<T> = readonly [T, ...T[]]
27
+
28
+ const ABORT_REASON = { SETTLED: 'settled', COMPLETED: 'completed' } as const
29
+ const noop = () => {}
30
+
31
+ /**
32
+ * 将父 signal abort 传播到子 controller,返回解绑函数
33
+ */
34
+ const link = (
35
+ parentSignal: AbortSignal,
36
+ childController: AbortController,
37
+ ): (() => void) => {
38
+ if (parentSignal.aborted) {
39
+ childController.abort(parentSignal.reason)
40
+ return noop
41
+ }
42
+ const handler = () => childController.abort(parentSignal.reason)
43
+ parentSignal.addEventListener('abort', handler, { once: true })
44
+ return () => parentSignal.removeEventListener('abort', handler)
45
+ }
46
+
47
+ /**
48
+ * 并行运行多个任务,通过回调函数允许调用方控制何时 settle
49
+ *
50
+ * 类型参数说明:
51
+ * - T: 各个任务的成功值类型
52
+ * - E: 各个任务的错误值类型
53
+ * - R: 最终返回的成功值类型(由 onResult 的 settle 决定)
54
+ * - ER: 最终返回的错误值类型(由 onResult 的 settle 决定)
55
+ */
56
+ const runAll = <T, E, R, ER>(
57
+ executors: NonEmptyArray<EffExecutor<T, E>>,
58
+ parentSignal: AbortSignal,
59
+ onResult: (
60
+ result: Result<T, E>,
61
+ index: number,
62
+ settle: (r: Result<R, ER>) => void,
63
+ context: {
64
+ resultCount: number
65
+ okValues: T[]
66
+ errValues: E[]
67
+ allResults: Result<T, E>[]
68
+ },
69
+ ) => void,
70
+ ): ResultAsync<R, ER> =>
71
+ Eff.create(({ signal: parentSignal }) => {
72
+ const controller = new AbortController()
73
+ const unlink = link(parentSignal, controller)
74
+
75
+ return new Promise((resolve) => {
76
+ let done = false
77
+ const context = {
78
+ resultCount: 0,
79
+ okValues: [] as T[],
80
+ errValues: [] as E[],
81
+ allResults: [] as Result<T, E>[],
82
+ }
83
+
84
+ const settle = (r: Result<R, ER>) => {
85
+ if (done) return
86
+ done = true
87
+ unlink()
88
+ controller.abort(ABORT_REASON.SETTLED)
89
+ resolve(r)
90
+ }
91
+
92
+ if (parentSignal.aborted) {
93
+ settle(ok([] as R))
94
+ return
95
+ }
96
+
97
+ let remaining = executors.length
98
+
99
+ executors.forEach((executor, i) => {
100
+ Eff.create(executor, controller.signal).then((r) => {
101
+ if (done) return
102
+ remaining--
103
+ onResult(r, i, settle, context)
104
+ if (remaining === 0) settle(ok(context.allResults as R))
105
+ })
106
+ })
107
+ })
108
+ }, parentSignal)
109
+
110
+ export class Eff {
111
+ /**
112
+ * 创建根级任务(无父 signal)
113
+ */
114
+ static root<T, E>(executor: EffExecutor<T, E>): ResultAsync<T, E> {
115
+ const controller = new AbortController()
116
+ const promise: Promise<Result<T, E>> = Promise.resolve()
117
+ .then(() => executor({ signal: controller.signal }))
118
+ .catch((e) => err(e as E))
119
+ .finally(() => controller.abort(ABORT_REASON.COMPLETED))
120
+ return new ResultAsync(promise)
121
+ }
122
+
123
+ /**
124
+ * 创建子任务(继承父 signal,支持取消传播)
125
+ */
126
+ static create<T, E>(
127
+ executor: EffExecutor<T, E>,
128
+ parentSignal: AbortSignal,
129
+ ): ResultAsync<T, E> {
130
+ const controller = new AbortController()
131
+ const unlink = link(parentSignal, controller)
132
+
133
+ const promise: Promise<Result<T, E>> = Promise.resolve()
134
+ .then(() => executor({ signal: controller.signal }))
135
+ .catch((e) => err(e as E))
136
+ .finally(() => {
137
+ unlink()
138
+ controller.abort(ABORT_REASON.COMPLETED)
139
+ })
140
+
141
+ return new ResultAsync(promise)
142
+ }
143
+
144
+ /**
145
+ * 全部成功才成功,任一失败立即失败并 abort 其他
146
+ */
147
+ static all<T, E>(
148
+ executors: NonEmptyArray<EffExecutor<T, E>>,
149
+ parentSignal: AbortSignal,
150
+ ): ResultAsync<T[], E> {
151
+ return runAll<T, E, T[], E>(
152
+ executors,
153
+ parentSignal,
154
+ (result, index, settle, context) => {
155
+ result.match(
156
+ (v) => {
157
+ context.okValues[index] = v
158
+ context.resultCount++
159
+ if (context.resultCount === executors.length) {
160
+ settle(ok(context.okValues))
161
+ }
162
+ },
163
+ (e) => settle(err(e)),
164
+ )
165
+ },
166
+ )
167
+ }
168
+
169
+ /**
170
+ * 任一成功立即成功并 abort 其他,全部失败才失败
171
+ */
172
+ static any<T, E>(
173
+ executors: NonEmptyArray<EffExecutor<T, E>>,
174
+ parentSignal: AbortSignal,
175
+ ): ResultAsync<T, E[]> {
176
+ return runAll<T, E, T, E[]>(
177
+ executors,
178
+ parentSignal,
179
+ (result, index, settle, context) => {
180
+ result.match(
181
+ (v) => settle(ok(v)),
182
+ (e) => {
183
+ context.errValues[index] = e
184
+ context.resultCount++
185
+ if (context.resultCount === executors.length) {
186
+ settle(err(context.errValues))
187
+ }
188
+ },
189
+ )
190
+ },
191
+ )
192
+ }
193
+
194
+ /**
195
+ * 任一完成立即返回其结果并 abort 其他
196
+ */
197
+ static race<T, E>(
198
+ executors: NonEmptyArray<EffExecutor<T, E>>,
199
+ parentSignal: AbortSignal,
200
+ ): ResultAsync<T, E> {
201
+ return runAll<T, E, T, E>(
202
+ executors,
203
+ parentSignal,
204
+ (result, _index, settle) => {
205
+ settle(result)
206
+ },
207
+ )
208
+ }
209
+
210
+ /**
211
+ * 等待全部完成,收集所有结果(不因某个失败而 abort)
212
+ */
213
+ static allSettled<T, E>(
214
+ executors: NonEmptyArray<EffExecutor<T, E>>,
215
+ parentSignal: AbortSignal,
216
+ ): ResultAsync<Result<T, E>[], never> {
217
+ return runAll<T, E, Result<T, E>[], never>(
218
+ executors,
219
+ parentSignal,
220
+ (result, index, _settle, context) => {
221
+ context.allResults[index] = result
222
+ },
223
+ )
224
+ }
225
+ }
package/eff/effcan.ts ADDED
@@ -0,0 +1,286 @@
1
+ /**
2
+ * EffCan 框架:基于 ResultAsync 的异步任务管理
3
+ * 与 Eff 的区别:
4
+ * - Executor 返回 ResultAsync<T, E> 而非 PromiseLike<Result<T, E>>
5
+ * - 假设 executor 不会抛出错误(无 catch 处理)
6
+ * - 保持 signal 生成/传递的语义和无内存泄露风险
7
+ *
8
+ * 设计原则与注意事项:
9
+ * 1. 内存管理
10
+ * - linkSignal 返回的解绑函数必须被调用(在 runAll 的 settle 中执行)
11
+ * - cleanup 需要在 Ok/Err 都执行(通过 andTee + orTee 组合实现)
12
+ * - 若修改清理逻辑,务必确保两个分支都能执行
13
+ *
14
+ * 2. Signal abort 阶段
15
+ * - SETTLED: 标志多任务中至少一个已确定结果,触发其他任务中断
16
+ * - COMPLETED: 标志单个任务完成,用于事后清理
17
+ * - 注意顺序:settle() 先调用 unlink(),再 abort(SETTLED),保证解绑后才中断
18
+ *
19
+ * 3. runAll 中的 done 标志
20
+ * - 防止 settle 被多次调用(Promise resolve 只有一次效果,但可能重复执行副作用)
21
+ * - 也防止已 settle 后的结果被重复处理
22
+ *
23
+ * 4. allSettled 的特殊性
24
+ * - 不因任一失败而 abort,但仍需执行并发控制
25
+ * - 返回类型 never 表示这个操作本身不会产生错误
26
+ */
27
+ import type { Result } from 'neverthrow'
28
+ import { err, ok, ResultAsync } from 'neverthrow'
29
+
30
+ export interface EffContext {
31
+ signal: AbortSignal
32
+ }
33
+
34
+ /**
35
+ * 任务执行器类型
36
+ * - 返回 ResultAsync<T, E>,表示异步任务已开始执行
37
+ * - 假设不会抛出错误,错误应通过 Err 返回
38
+ */
39
+ type EffCanExecutor<T, E> = (ctx: EffContext) => ResultAsync<T, E>
40
+ type NonEmptyArray<T> = readonly [T, ...T[]]
41
+
42
+ const ABORT_REASON = { SETTLED: 'settled', COMPLETED: 'completed' } as const
43
+ const noop = () => {}
44
+
45
+ /**
46
+ * 将父 signal abort 传播到子 controller,返回解绑函数
47
+ */
48
+ const linkSignal = (
49
+ parentSignal: AbortSignal,
50
+ controller: AbortController,
51
+ ): (() => void) => {
52
+ if (parentSignal.aborted) {
53
+ controller.abort(parentSignal.reason)
54
+ return noop
55
+ }
56
+ const handler = () => controller.abort(parentSignal.reason)
57
+ parentSignal.addEventListener('abort', handler, { once: true })
58
+ return () => parentSignal.removeEventListener('abort', handler)
59
+ }
60
+
61
+ /**
62
+ * 并行运行多个任务,通过回调函数允许调用方控制何时 settle
63
+ *
64
+ * 类型参数说明:
65
+ * - T: 各个任务的成功值类型
66
+ * - E: 各个任务的错误值类型
67
+ * - R: 最终返回的成功值类型(由 onResult 的 settle 决定)
68
+ * - ER: 最终返回的错误值类型(由 onResult 的 settle 决定)
69
+ *
70
+ * 关键设计细节:
71
+ * - 使用 childSignal 而非 signal,确保所有子任务中断后再结束
72
+ * - settle 被调用时:
73
+ * 1. done 标志防止重复处理
74
+ * 2. unlink() 移除父子 signal 关联(防止内存泄露)
75
+ * 3. abort(SETTLED) 中断所有未完成的子任务
76
+ * 4. resolve(r) Promise 才真正完成
77
+ * - 若所有任务都完成但没被 settle,则在 remaining === 0 时调用
78
+ * - 初始 signal.aborted 检查处理已被中止的父任务场景
79
+ */
80
+ const runAll = <T, E, R, ER>(
81
+ executors: NonEmptyArray<EffCanExecutor<T, E>>,
82
+ parentSignal: AbortSignal,
83
+ onResult: (
84
+ result: Result<T, E>,
85
+ index: number,
86
+ settle: (r: Result<R, ER>) => void,
87
+ context: {
88
+ resultCount: number
89
+ okValues: T[]
90
+ errValues: E[]
91
+ allResults: Result<T, E>[]
92
+ },
93
+ ) => void,
94
+ ): ResultAsync<R, ER> =>
95
+ EffCan.create(({ signal }) => {
96
+ const controller = new AbortController()
97
+ const childSignal = controller.signal
98
+ const unlink = linkSignal(signal, controller)
99
+
100
+ const promise = new Promise<Result<R, ER>>((resolve) => {
101
+ let done = false
102
+ const context = {
103
+ resultCount: 0,
104
+ okValues: [] as T[],
105
+ errValues: [] as E[],
106
+ allResults: [] as Result<T, E>[],
107
+ }
108
+
109
+ const settle = (r: Result<R, ER>) => {
110
+ if (done) return
111
+ done = true
112
+ unlink()
113
+ controller.abort(ABORT_REASON.SETTLED)
114
+ resolve(r)
115
+ }
116
+
117
+ if (signal.aborted) {
118
+ settle(ok([] as R))
119
+ return
120
+ }
121
+
122
+ let remaining = executors.length
123
+
124
+ executors.forEach((executor, i) => {
125
+ EffCan.create(executor, childSignal).then((r) => {
126
+ if (done) return
127
+ remaining--
128
+ onResult(r, i, settle, context)
129
+ if (remaining === 0) settle(ok(context.allResults as R))
130
+ })
131
+ })
132
+ })
133
+
134
+ return new ResultAsync(promise)
135
+ }, parentSignal)
136
+
137
+ export class EffCan {
138
+ /**
139
+ * 创建根级任务(无父 signal)
140
+ *
141
+ * 关键细节:
142
+ * - resultAsync.andTee(cleanup) 在 Ok 分支执行清理
143
+ * - resultAsync.orTee(cleanup) 在 Err 分支执行清理
144
+ * - 类型断言 as ResultAsync<T, E> 是必要的,因为 orTee 返回的类型推导会变复杂
145
+ * - cleanup 在两个分支都调用确保 abort(COMPLETED) 被执行
146
+ *
147
+ * 为何用 andTee + orTee 而不是其他方式:
148
+ * - .map() 只在 Ok 时执行(Err 时内存未释放)
149
+ * - .then() 返回 PromiseLike 而 ResultAsync 需要 Promise(不兼容)
150
+ * - andTee + orTee 是 neverthrow 提供的原生方式,无副作用污染
151
+ */
152
+ static root<T, E>(executor: EffCanExecutor<T, E>): ResultAsync<T, E> {
153
+ const controller = new AbortController()
154
+ const resultAsync = executor({ signal: controller.signal })
155
+
156
+ const cleanup = () => {
157
+ controller.abort(ABORT_REASON.COMPLETED)
158
+ }
159
+
160
+ return resultAsync.andTee(cleanup).orTee(cleanup) as ResultAsync<T, E>
161
+ }
162
+
163
+ /**
164
+ * 创建子任务(继承父 signal,支持取消传播)
165
+ *
166
+ * 关键细节:
167
+ * - parentSignal 中止时会自动中止 controller(通过 linkSignal)
168
+ * - unlink() 必须在清理时调用,否则会形成 EventListener 泄露
169
+ * - unlink() 调用顺序很重要:先 unlink,再 abort,避免竞态条件
170
+ * - cleanup 需要在两个分支都执行(通过 andTee + orTee)
171
+ *
172
+ * 内存泄露风险点:
173
+ * 1. 若遗漏 unlink() 调用,parentSignal 的 abort 监听器永不移除 → 内存泄露
174
+ * 2. 若只用 .map() 而不用 .orTee(),Err 分支的 unlink 不执行 → 内存泄露
175
+ * 3. 若改为手动 Promise 包装,需确保 finally 块执行(当前 andTee+orTee 方式更安全)
176
+ */
177
+ static create<T, E>(
178
+ executor: EffCanExecutor<T, E>,
179
+ parentSignal: AbortSignal,
180
+ ): ResultAsync<T, E> {
181
+ const controller = new AbortController()
182
+ const unlink = linkSignal(parentSignal, controller)
183
+
184
+ const resultAsync = executor({ signal: controller.signal })
185
+
186
+ const cleanup = () => {
187
+ unlink()
188
+ controller.abort(ABORT_REASON.COMPLETED)
189
+ }
190
+
191
+ return resultAsync.andTee(cleanup).orTee(cleanup) as ResultAsync<T, E>
192
+ }
193
+
194
+ /**
195
+ * 全部成功才成功,任一失败立即失败并 abort 其他
196
+ */
197
+ static all<T, E>(
198
+ executors: NonEmptyArray<EffCanExecutor<T, E>>,
199
+ parentSignal: AbortSignal,
200
+ ): ResultAsync<T[], E> {
201
+ return runAll<T, E, T[], E>(
202
+ executors,
203
+ parentSignal,
204
+ (result, index, settle, context) => {
205
+ result.match(
206
+ (v) => {
207
+ context.okValues[index] = v
208
+ context.resultCount++
209
+ if (context.resultCount === executors.length) {
210
+ settle(ok(context.okValues))
211
+ }
212
+ },
213
+ (e) => settle(err(e)),
214
+ )
215
+ },
216
+ )
217
+ }
218
+
219
+ /**
220
+ * 任一成功立即成功并 abort 其他,全部失败才失败
221
+ */
222
+ static any<T, E>(
223
+ executors: NonEmptyArray<EffCanExecutor<T, E>>,
224
+ parentSignal: AbortSignal,
225
+ ): ResultAsync<T, E[]> {
226
+ return runAll<T, E, T, E[]>(
227
+ executors,
228
+ parentSignal,
229
+ (result, index, settle, context) => {
230
+ result.match(
231
+ (v) => settle(ok(v)),
232
+ (e) => {
233
+ context.errValues[index] = e
234
+ context.resultCount++
235
+ if (context.resultCount === executors.length) {
236
+ settle(err(context.errValues))
237
+ }
238
+ },
239
+ )
240
+ },
241
+ )
242
+ }
243
+
244
+ /**
245
+ * 任一完成立即返回其结果并 abort 其他
246
+ */
247
+ static race<T, E>(
248
+ executors: NonEmptyArray<EffCanExecutor<T, E>>,
249
+ parentSignal: AbortSignal,
250
+ ): ResultAsync<T, E> {
251
+ return runAll<T, E, T, E>(
252
+ executors,
253
+ parentSignal,
254
+ (result, _index, settle) => {
255
+ settle(result)
256
+ },
257
+ )
258
+ }
259
+
260
+ /**
261
+ * 等待全部完成,收集所有结果(不因某个失败而 abort)
262
+ *
263
+ * 关键特性:
264
+ * - 与 all/any/race 不同,allSettled 不提前 settle,总是等所有任务完成
265
+ * - onResult 中不调用 settle,只收集结果
266
+ * - 当 remaining === 0 时才调用 settle(ok(context.allResults))(在 runAll 中)
267
+ * - 返回类型 never 表示外层 Result 的 Err 永不出现(永远 Ok)
268
+ *
269
+ * 用途:
270
+ * 1. 需要所有结果而不关心单个失败时
271
+ * 2. 并发执行多个独立任务并收集所有状态
272
+ * 3. 无需因一个失败而中止其他任务的场景
273
+ */
274
+ static allSettled<T, E>(
275
+ executors: NonEmptyArray<EffCanExecutor<T, E>>,
276
+ parentSignal: AbortSignal,
277
+ ): ResultAsync<Result<T, E>[], never> {
278
+ return runAll<T, E, Result<T, E>[], never>(
279
+ executors,
280
+ parentSignal,
281
+ (result, index, _settle, context) => {
282
+ context.allResults[index] = result
283
+ },
284
+ )
285
+ }
286
+ }
@@ -0,0 +1,11 @@
1
+ import { fromThrowable } from 'neverthrow'
2
+ import { TcErr, fileInit } from '../staticMeta/enum.api'
3
+
4
+ const fileId = fileInit('eff/throwable.ts')
5
+
6
+ export const jsonParse = fromThrowable(JSON.parse, (e) => {
7
+ new TcErr({
8
+ fileId: fileId('jsonParse'),
9
+ cause: e,
10
+ })
11
+ })
package/effector.ts CHANGED
@@ -1,2 +1,33 @@
1
- export { createEvent, createStore, createEffect, createDomain, sample, combine, attach, merge, split, forward, guard, restore, scopeBind, allSettled, fork, serialize, hydrate, clearNode, withRegion, launch, is } from 'effector';
2
- export type { Event, Store, Effect, Domain, Scope, Unit, EventCallable, StoreWritable } from 'effector';
1
+ export {
2
+ createEvent,
3
+ createStore,
4
+ createEffect,
5
+ createDomain,
6
+ sample,
7
+ combine,
8
+ attach,
9
+ merge,
10
+ split,
11
+ forward,
12
+ guard,
13
+ restore,
14
+ scopeBind,
15
+ allSettled,
16
+ fork,
17
+ serialize,
18
+ hydrate,
19
+ clearNode,
20
+ withRegion,
21
+ launch,
22
+ is,
23
+ } from 'effector'
24
+ export type {
25
+ Event,
26
+ Store,
27
+ Effect,
28
+ Domain,
29
+ Scope,
30
+ Unit,
31
+ EventCallable,
32
+ StoreWritable,
33
+ } from 'effector'
package/es-toolkit.ts CHANGED
@@ -50,14 +50,12 @@ export {
50
50
  zip,
51
51
  zipObject,
52
52
  zipWith,
53
-
54
53
  debounce,
55
54
  throttle,
56
55
  once,
57
56
  noop,
58
57
  identity,
59
58
  range,
60
-
61
59
  clone,
62
60
  cloneDeep,
63
61
  isEqual,
@@ -70,7 +68,6 @@ export {
70
68
  invert,
71
69
  mapKeys,
72
70
  mapValues,
73
-
74
71
  camelCase,
75
72
  capitalize,
76
73
  kebabCase,
@@ -84,7 +81,6 @@ export {
84
81
  trimEnd,
85
82
  trimStart,
86
83
  pad,
87
-
88
84
  mean,
89
85
  meanBy,
90
86
  sum,
@@ -93,11 +89,9 @@ export {
93
89
  clamp,
94
90
  random,
95
91
  randomInt,
96
-
97
92
  delay,
98
93
  timeout,
99
94
  retry,
100
-
101
95
  isNil,
102
96
  isNull,
103
97
  isUndefined,
@@ -109,4 +103,4 @@ export {
109
103
  isSymbol,
110
104
  isLength,
111
105
  isTypedArray,
112
- } from 'es-toolkit';
106
+ } from 'es-toolkit'
package/exome.ts CHANGED
@@ -1,2 +1,10 @@
1
- export { Exome, addMiddleware, getExomeId, onAction, subscribe, update, runMiddleware } from 'exome';
2
- export type { Middleware } from 'exome';
1
+ export {
2
+ Exome,
3
+ addMiddleware,
4
+ getExomeId,
5
+ onAction,
6
+ subscribe,
7
+ update,
8
+ runMiddleware,
9
+ } from 'exome'
10
+ export type { Middleware } from 'exome'
package/hono.ts CHANGED
@@ -1,4 +1,20 @@
1
- export { Hono } from "hono"
1
+ // 导入所有需要的模块
2
+ import { Hono } from 'hono'
3
+ import { cors } from 'hono/cors'
4
+ import { logger } from 'hono/logger'
5
+ import { timeout } from 'hono/timeout'
6
+
7
+ // 导出 Hono 主类
8
+ export { Hono }
9
+
10
+ // 导出 hono 中间件为对象,避免命名冲突
11
+ export const honoMiddleware = {
12
+ cors,
13
+ logger,
14
+ timeout,
15
+ }
16
+
17
+ // 导出类型
2
18
  export type {
3
19
  Env,
4
20
  ErrorHandler,
@@ -20,4 +36,4 @@ export type {
20
36
  InferRequestType,
21
37
  InferResponseType,
22
38
  ClientRequestOptions,
23
- } from "hono"
39
+ } from 'hono'
package/hotkeys-js.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { default } from 'hotkeys-js';
2
- export type { HotkeysEvent, KeyHandler } from 'hotkeys-js';
1
+ import { default as hotkey } from 'hotkeys-js'
2
+ export { hotkey }
3
+ export type { HotkeysEvent, KeyHandler } from 'hotkeys-js'
package/idmeta.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "generatedAt": "2026-01-02T15:48:35.553Z",
3
+ "projectRoot": "/Users/admin/Documents/tc/tcdona_unilib",
4
+ "totalFiles": 50,
5
+ "files": [
6
+ [
7
+ "/Users/admin/Documents/tc/tcdona_unilib/staticMeta/ast.scan.ts",
8
+ "staticMeta/ast.scan.ts",
9
+ true,
10
+ "fileId",
11
+ [[595, 629]],
12
+ []
13
+ ],
14
+ [
15
+ "/Users/admin/Documents/tc/tcdona_unilib/staticMeta/sync.ts",
16
+ "staticMeta/sync.ts",
17
+ true,
18
+ "fileId",
19
+ [[337, 371]],
20
+ [
21
+ "deleteFileFailed",
22
+ "cleanupFailed",
23
+ "syncEntryFailed",
24
+ "syncStart",
25
+ "syncDirectoryFailed",
26
+ "syncComplete",
27
+ "syncStatsCopied",
28
+ "syncStatsSkipped",
29
+ "syncStatsDeleted",
30
+ "syncStatsErrors"
31
+ ]
32
+ ],
33
+ [
34
+ "/Users/admin/Documents/tc/tcdona_unilib/eff/throwable.ts",
35
+ "eff/throwable.ts",
36
+ true,
37
+ "fileId",
38
+ [[116, 139]],
39
+ ["jsonParse"]
40
+ ]
41
+ ]
42
+ }
package/inquirer.ts CHANGED
@@ -10,4 +10,4 @@ export {
10
10
  password,
11
11
  search,
12
12
  select,
13
- } from "@inquirer/prompts"
13
+ } from '@inquirer/prompts'