tcdona_unilib 1.0.10 → 1.0.11

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/koka/async.ts ADDED
@@ -0,0 +1,9 @@
1
+ // Async effect types and utilities from 'koka'
2
+ export type {
3
+ Async,
4
+ MaybePromise,
5
+ } from 'koka'
6
+
7
+ export {
8
+ Eff,
9
+ } from 'koka'
package/koka/ctx.ts ADDED
@@ -0,0 +1,11 @@
1
+ // Context effect types and utilities from 'koka'
2
+ export type {
3
+ Ctx,
4
+ AnyCtx,
5
+ CtxValue,
6
+ } from 'koka'
7
+
8
+ export {
9
+ Eff,
10
+ EffSymbol,
11
+ } from 'koka'
package/koka/err.ts ADDED
@@ -0,0 +1,11 @@
1
+ // Error effect types and utilities from 'koka'
2
+ export type {
3
+ Err,
4
+ AnyErr,
5
+ ExtractErr,
6
+ ExcludeErr,
7
+ } from 'koka'
8
+
9
+ export {
10
+ Eff,
11
+ } from 'koka'
package/koka/gen.ts ADDED
@@ -0,0 +1,11 @@
1
+ // Generator utilities and stream types from 'koka'
2
+ export type {
3
+ StreamResult,
4
+ StreamResults,
5
+ StreamHandler,
6
+ } from 'koka'
7
+
8
+ export {
9
+ Eff,
10
+ isGenerator,
11
+ } from 'koka'
package/koka/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Main koka re-export file - exports everything from koka
2
+ export * from '../koka.ts'
package/koka/opt.ts ADDED
@@ -0,0 +1,9 @@
1
+ // Optional context effect types and utilities from 'koka'
2
+ export type {
3
+ Opt,
4
+ AnyOpt,
5
+ } from 'koka'
6
+
7
+ export {
8
+ Eff,
9
+ } from 'koka'
package/koka/result.ts ADDED
@@ -0,0 +1,13 @@
1
+ // Result types and utilities from 'koka'
2
+ export type {
3
+ Ok,
4
+ AnyOk,
5
+ Result as ResultType,
6
+ AnyResult,
7
+ InferOkValue,
8
+ } from 'koka'
9
+
10
+ export {
11
+ Result,
12
+ Eff,
13
+ } from 'koka'
package/koka/task.ts ADDED
@@ -0,0 +1,10 @@
1
+ // Task types and utilities from 'koka'
2
+ export type {
3
+ Task,
4
+ MaybeFunction,
5
+ } from 'koka'
6
+
7
+ export {
8
+ Eff,
9
+ isGenerator,
10
+ } from 'koka'
package/koka-domain.ts ADDED
@@ -0,0 +1,21 @@
1
+ // Type exports from 'koka-domain'
2
+ export type {
3
+ DomainErr,
4
+ Getter,
5
+ Updater,
6
+ Setter,
7
+ DomainOptions,
8
+ MaybeDomainEff,
9
+ Selector,
10
+ InferDomainState,
11
+ InferDomainRoot,
12
+ AnyDomain,
13
+ NestedArray,
14
+ NestedReadonlyArray,
15
+ } from 'koka-domain'
16
+
17
+ // Value exports from 'koka-domain'
18
+ export {
19
+ getDomainValue,
20
+ Domain,
21
+ } from 'koka-domain'
package/koka.ts ADDED
@@ -0,0 +1,39 @@
1
+ // Type exports from 'koka'
2
+ export type {
3
+ Err,
4
+ AnyErr,
5
+ Ctx,
6
+ Opt,
7
+ AnyCtx,
8
+ Async,
9
+ AnyOpt,
10
+ Msg,
11
+ AnyMsg,
12
+ SendMsg,
13
+ WaitMsg,
14
+ EffType,
15
+ AnyEff,
16
+ EffectHandlers,
17
+ ExtractErr,
18
+ ExcludeErr,
19
+ Ok,
20
+ AnyOk,
21
+ AnyResult,
22
+ InferOkValue,
23
+ Task,
24
+ MaybePromise,
25
+ MaybeFunction,
26
+ CtxValue,
27
+ MsgValue,
28
+ StreamResult,
29
+ StreamResults,
30
+ StreamHandler,
31
+ } from 'koka'
32
+
33
+ // Value exports from 'koka'
34
+ export {
35
+ EffSymbol,
36
+ Result,
37
+ Eff,
38
+ isGenerator
39
+ } from 'koka'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tcdona_unilib",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Unified dependency aggregation layer for shared libraries",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -44,7 +44,16 @@
44
44
  "./pinyinpro": "./pinyin-pro.ts",
45
45
  "./tinypool": "./tinypool.ts",
46
46
  "./dotenvx": "./dotenvx.ts",
47
- "./inquirer": "./inquirer.ts"
47
+ "./inquirer": "./inquirer.ts",
48
+ "./koka": "./koka.ts",
49
+ "./koka/err": "./koka/err.ts",
50
+ "./koka/ctx": "./koka/ctx.ts",
51
+ "./koka/opt": "./koka/opt.ts",
52
+ "./koka/async": "./koka/async.ts",
53
+ "./koka/result": "./koka/result.ts",
54
+ "./koka/task": "./koka/task.ts",
55
+ "./koka/gen": "./koka/gen.ts",
56
+ "./koka-domain": "./koka-domain.ts"
48
57
  },
49
58
  "scripts": {
50
59
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -74,6 +83,8 @@
74
83
  "exome": "^2.8.0",
75
84
  "hono": "^4.11.3",
76
85
  "hotkeys-js": "^4.0.0",
86
+ "koka": "^1.0.9",
87
+ "koka-domain": "^1.0.0",
77
88
  "magic-regexp": "^0.10.0",
78
89
  "marked": "^17.0.1",
79
90
  "nanoid": "^5.1.6",
package/tcproject.ts DELETED
@@ -1,60 +0,0 @@
1
- import { resolve } from 'tcdona_unilib/pathe';
2
-
3
- // Auto-generated from ~/.tcdona_unilib.yml
4
- // Do not edit manually
5
-
6
- export const projects = {
7
- "tcdoc": {
8
- "path": "/Users/admin/Documents/tc/tcdoc"
9
- },
10
- "tchono": {
11
- "path": "/Users/admin/Documents/tc/tchono"
12
- },
13
- "tcbrain": {
14
- "path": "/Users/admin/Documents/tc/tcbrain"
15
- },
16
- "tcnb": {
17
- "path": "/Users/admin/Documents/tc/tcnb"
18
- },
19
- "tcsdd": {
20
- "path": "/Users/admin/Documents/tc/tcsdd"
21
- },
22
- "tcobsd": {
23
- "path": "/Users/admin/Documents/tc/tcobsd"
24
- }
25
- } as const;
26
-
27
- /**
28
- * Get a resolve function bound to a project's root directory
29
- * @param name - The project name
30
- * @param paths - Additional path segments to resolve
31
- * @returns A bound resolve function or the resolved path if paths are provided
32
- *
33
- * @example
34
- * // Get a bound resolver for later use
35
- * const resolveInTcDoc = get('tcdoc');
36
- * const filePath = resolveInTcDoc('src', 'index.ts');
37
- *
38
- * @example
39
- * // Directly resolve a path
40
- * const filePath = get('tcdoc', 'src', 'index.ts')();
41
- */
42
- export function get(name: keyof typeof projects): typeof resolve;
43
- export function get(name: keyof typeof projects, ...paths: string[]): () => string;
44
- export function get(name: string): typeof resolve | undefined;
45
- export function get(name: string, ...paths: string[]): (() => string) | undefined;
46
- export function get(name: string, ...paths: string[]): any {
47
- const project = projects[name as keyof typeof projects];
48
- if (!project) {
49
- console.warn(`Project "${name}" not found in configuration`);
50
- return undefined;
51
- }
52
-
53
- if (paths.length === 0) {
54
- // Return a bound function that can be called later
55
- return resolve.bind(null, project.path);
56
- }
57
-
58
- // Return a bound function with the paths already included
59
- return resolve.bind(null, project.path, ...paths);
60
- }