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 +9 -0
- package/koka/ctx.ts +11 -0
- package/koka/err.ts +11 -0
- package/koka/gen.ts +11 -0
- package/koka/index.ts +2 -0
- package/koka/opt.ts +9 -0
- package/koka/result.ts +13 -0
- package/koka/task.ts +10 -0
- package/koka-domain.ts +21 -0
- package/koka.ts +39 -0
- package/package.json +13 -2
- package/tcproject.ts +0 -60
package/koka/async.ts
ADDED
package/koka/ctx.ts
ADDED
package/koka/err.ts
ADDED
package/koka/gen.ts
ADDED
package/koka/index.ts
ADDED
package/koka/opt.ts
ADDED
package/koka/result.ts
ADDED
package/koka/task.ts
ADDED
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.
|
|
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
|
-
}
|