@akanjs/devkit 2.1.0-rc.0 → 2.1.0-rc.1

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/README.ko.md ADDED
@@ -0,0 +1,65 @@
1
+ # @akanjs/devkit
2
+
3
+ [문서](https://akanjs.com/docs) | [npm](https://www.npmjs.com/package/@akanjs/devkit) | [런타임](https://www.npmjs.com/package/akanjs)
4
+
5
+ Akan.js를 위한 development tooling primitive입니다.
6
+
7
+ `@akanjs/devkit`은 Akan CLI와 프레임워크 수준 tooling에서 사용하는 build runner, workspace
8
+ executor, config loader, dependency scanner, frontend artifact builder, command decorator, prompt,
9
+ release helper를 담고 있습니다. 애플리케이션 런타임 코드가 아니라 tooling과 package author를 위한
10
+ 패키지입니다.
11
+
12
+ ## 설치
13
+
14
+ 대부분의 사용자는 devkit 대신 CLI를 설치하면 됩니다.
15
+
16
+ ```bash
17
+ bun install -g @akanjs/cli@latest
18
+ ```
19
+
20
+ Akan-aware tooling을 직접 만들 때만 `@akanjs/devkit`을 설치하세요.
21
+
22
+ ```bash
23
+ bun add -d @akanjs/devkit
24
+ ```
25
+
26
+ ## 사용 예시
27
+
28
+ ```ts
29
+ import { ApplicationBuildRunner, WorkspaceExecutor } from "@akanjs/devkit";
30
+
31
+ const workspace = WorkspaceExecutor.fromRoot();
32
+ const app = await workspace.getApp("my-app");
33
+ const runner = new ApplicationBuildRunner(app);
34
+
35
+ await runner.build();
36
+ ```
37
+
38
+ ## 제공하는 것
39
+
40
+ - Workspace, app, library, package, module executor.
41
+ - `akan.config.ts` 로딩과 정규화.
42
+ - Application build, typecheck, SSR, CSR, release runner.
43
+ - Dependency scanning과 package metadata 생성 helper.
44
+ - Frontend build transform과 RSC/SSR artifact builder.
45
+ - `@akanjs/cli`가 사용하는 command/script decorator.
46
+ - AI prompt, guideline, code-generation 지원 utility.
47
+ - Capacitor와 mobile release helper.
48
+
49
+ ## 패키지 경계
50
+
51
+ - 런타임 코드는 `akanjs`에서 import해야 합니다. `AppConfig`, `LibConfig`, `AppInfo`, `LibInfo` 같은
52
+ 공유 config 타입도 `akanjs`에서 가져옵니다.
53
+ - CLI 사용자는 `@akanjs/cli`를 설치하면 됩니다. published CLI는 이 devkit을 내부에 번들링합니다.
54
+ - Tooling author는 Akan workspace introspection이나 build API가 필요할 때 `@akanjs/devkit`을 직접
55
+ import할 수 있습니다.
56
+
57
+ ## 요구사항
58
+
59
+ - [Bun](https://bun.sh) `>=1.3.13`
60
+ - TypeScript
61
+ - Optional peer는 Capacitor integration처럼 해당 기능을 사용할 때만 필요합니다.
62
+
63
+ ## 라이선스
64
+
65
+ MIT
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @akanjs/devkit
2
+
3
+ [Docs](https://akanjs.com/docs) | [npm](https://www.npmjs.com/package/@akanjs/devkit) | [Runtime](https://www.npmjs.com/package/akanjs)
4
+
5
+ Development tooling primitives for Akan.js.
6
+
7
+ `@akanjs/devkit` contains the build runners, workspace executors, config loaders, dependency scanners,
8
+ frontend artifact builders, command decorators, prompts, and release helpers used by the Akan CLI and by
9
+ framework-level tooling. It is intended for tools and package authors, not for application runtime code.
10
+
11
+ ## Install
12
+
13
+ Most users should install the CLI instead:
14
+
15
+ ```bash
16
+ bun install -g @akanjs/cli@latest
17
+ ```
18
+
19
+ Install `@akanjs/devkit` directly only when building Akan-aware tooling:
20
+
21
+ ```bash
22
+ bun add -d @akanjs/devkit
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ```ts
28
+ import { ApplicationBuildRunner, WorkspaceExecutor } from "@akanjs/devkit";
29
+
30
+ const workspace = WorkspaceExecutor.fromRoot();
31
+ const app = await workspace.getApp("my-app");
32
+ const runner = new ApplicationBuildRunner(app);
33
+
34
+ await runner.build();
35
+ ```
36
+
37
+ ## What It Provides
38
+
39
+ - Workspace, app, library, package, and module executors.
40
+ - `akan.config.ts` loading and normalization.
41
+ - Application build, typecheck, SSR, CSR, and release runners.
42
+ - Dependency scanning and package metadata generation helpers.
43
+ - Frontend build transforms and RSC/SSR artifact builders.
44
+ - Command/script decorators used by `@akanjs/cli`.
45
+ - AI prompt, guideline, and code-generation support utilities.
46
+ - Capacitor and mobile release helpers.
47
+
48
+ ## Package Boundary
49
+
50
+ - Runtime code should import from `akanjs`, including shared config types such as `AppConfig`, `LibConfig`,
51
+ `AppInfo`, and `LibInfo`.
52
+ - CLI users should install `@akanjs/cli`; the published CLI bundles this devkit internally.
53
+ - Tooling authors can import `@akanjs/devkit` directly when they need Akan workspace introspection or build APIs.
54
+
55
+ ## Requirements
56
+
57
+ - [Bun](https://bun.sh) `>=1.3.13`
58
+ - TypeScript
59
+ - Optional peers are only needed for the features that use them, such as Capacitor integration.
60
+
61
+ ## License
62
+
63
+ MIT
@@ -1,4 +1,5 @@
1
1
  import { confirm, input, select } from "@inquirer/prompts";
2
+ import path from "node:path";
2
3
  import { Logger } from "akanjs/common";
3
4
  import chalk from "chalk";
4
5
  import { type Command, program } from "commander";
@@ -221,10 +222,17 @@ export const runCommands = async (...commands: CommandCls[]) => {
221
222
  process.exit(1);
222
223
  });
223
224
  const __dirname = getDirname(import.meta.url);
224
- const hasPackageJson = await FileSys.fileExists(`${__dirname}/../package.json`);
225
- process.env.AKAN_VERSION = hasPackageJson
226
- ? (await FileSys.readJson<PackageJson>(`${__dirname}/../package.json`)).version
227
- : "0.0.1";
225
+ const packageJsonCandidates = [`${path.dirname(Bun.main)}/package.json`, `${__dirname}/../package.json`];
226
+ let cliPackageJson: PackageJson | null = null;
227
+ for (const packageJsonPath of packageJsonCandidates) {
228
+ if (!(await FileSys.fileExists(packageJsonPath))) continue;
229
+ const packageJson = await FileSys.readJson<PackageJson>(packageJsonPath);
230
+ if (packageJson.name === "@akanjs/cli" || packageJson.name === "@akanjs/devkit") {
231
+ cliPackageJson = packageJson;
232
+ break;
233
+ }
234
+ }
235
+ process.env.AKAN_VERSION = cliPackageJson?.version ?? "0.0.1";
228
236
 
229
237
  // Custom help handling
230
238
  const hasHelpFlag = process.argv.includes("--help") || process.argv.includes("-h");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "2.1.0-rc.0",
3
+ "version": "2.1.0-rc.1",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {