akanjs 2.3.8-rc.4 → 2.3.8
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/CHANGELOG.md
CHANGED
package/README.ko.md
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
SEO 웹, iOS/Android 앱 패키지, 서버, 데이터베이스 계약, 인프라 산출물, 문서화까지 함께 이어지는
|
|
10
10
|
Bun-first 풀스택 TypeScript 프레임워크입니다.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
<img width="563" height="720" alt="multi-platform-dev" src="https://github.com/user-attachments/assets/de2ec810-7b7f-4e9d-8e9e-e565e648fb45" />
|
|
13
|
+
|
|
14
|
+
하나의 Akan.js 코드베이스에서 서버 렌더링, 클라이언트 렌더링, 모바일 앱, 서버, 데이터베이스까지 한 개발 흐름 안에서 함께 움직입니다.
|
|
15
15
|
|
|
16
16
|
## 왜 Akan인가
|
|
17
17
|
|
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@ No more framework assembly, duplicated declarations, or per-platform rewrites. A
|
|
|
8
8
|
full-stack TypeScript framework where business intent is written once, then compiled into SEO web surfaces,
|
|
9
9
|
iOS and Android app packages, servers, database contracts, infrastructure artifacts, and documentation.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
<img width="563" height="720" alt="multi-platform-dev" src="https://github.com/user-attachments/assets/de2ec810-7b7f-4e9d-8e9e-e565e648fb45" />
|
|
12
|
+
|
|
13
|
+
A single Akan.js codebase keeps server rendering, client rendering, mobile apps, server, and database moving in one development flow.
|
|
14
14
|
|
|
15
15
|
## Why Akan
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INJECT_META } from "akanjs/base";
|
|
2
|
-
import type
|
|
2
|
+
import { type AdaptorCls, CacheAdaptorRole, type InjectInfo } from "akanjs/service";
|
|
3
3
|
import { type DependencyNode, topologicalStages } from "./resolveHierarchy";
|
|
4
4
|
|
|
5
5
|
interface AdaptorNode extends DependencyNode {
|
|
@@ -54,6 +54,9 @@ export function resolveAdaptorHierarchy(
|
|
|
54
54
|
for (const [key, adaptor] of adaptorMap) {
|
|
55
55
|
const injectMap: Record<string, InjectInfo> = adaptor[INJECT_META] ?? {};
|
|
56
56
|
const dependencies: string[] = [];
|
|
57
|
+
const addDependency = (depKey: string) => {
|
|
58
|
+
if (depKey !== key && !dependencies.includes(depKey)) dependencies.push(depKey);
|
|
59
|
+
};
|
|
57
60
|
|
|
58
61
|
for (const [propKey, injectInfo] of Object.entries(injectMap)) {
|
|
59
62
|
if (injectInfo.type === "plug") {
|
|
@@ -65,11 +68,17 @@ export function resolveAdaptorHierarchy(
|
|
|
65
68
|
`on adaptor "${injectInfo.adaptor.refName}" which is not registered.`,
|
|
66
69
|
);
|
|
67
70
|
}
|
|
68
|
-
|
|
71
|
+
addDependency(depKey);
|
|
69
72
|
} else if (injectInfo.type === "use") {
|
|
70
73
|
if (adaptorMap.has(propKey) && propKey !== key) {
|
|
71
|
-
|
|
74
|
+
addDependency(propKey);
|
|
72
75
|
}
|
|
76
|
+
} else if (injectInfo.type === "memory") {
|
|
77
|
+
const depKey = classToKey.get(CacheAdaptorRole);
|
|
78
|
+
if (!depKey) {
|
|
79
|
+
throw new Error(`Adaptor "${key}" has a memory dependency but cache adaptor role is not registered.`);
|
|
80
|
+
}
|
|
81
|
+
addDependency(depKey);
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INJECT_META } from "akanjs/base";
|
|
2
|
-
import type
|
|
2
|
+
import { type AdaptorCls, type InjectInfo } from "akanjs/service";
|
|
3
3
|
import { type DependencyNode } from "./resolveHierarchy.d.ts";
|
|
4
4
|
interface AdaptorNode extends DependencyNode {
|
|
5
5
|
adaptor: AdaptorCls;
|