@akanjs/cli 3.0.1 → 3.0.2

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 (76) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-zfab7pkn.js → CodeAgent-szbjv4gv.js} +2 -2
  3. package/{CodeTui-0zhnr0pw.js → CodeTui-5nw86ab6.js} +1 -1
  4. package/{agent.command-aja6z9mn.js → agent.command-np1dffkb.js} +5 -5
  5. package/akanCode.js +2 -2
  6. package/{application.command-049ehgx3.js → application.command-gk69v1xs.js} +8 -8
  7. package/{applicationBuildRunner-75n5rpwp.js → applicationBuildRunner-wx09n9g6.js} +3 -3
  8. package/buildBatch.proc.js +4 -4
  9. package/{cloud.command-gw4kqxt8.js → cloud.command-tw06613r.js} +10 -10
  10. package/cloud.script-64gzba8r.js +20 -0
  11. package/{code.command-x9t6z5nw.js → code.command-hmtx14b2.js} +6 -6
  12. package/{context.command-yfbe1rtd.js → context.command-6aqvdx43.js} +13 -13
  13. package/context.runner-hnkvv3z3.js +21 -0
  14. package/{guideline.command-kq9gp690.js → guideline.command-axvf68gc.js} +2 -2
  15. package/guidelines/conventions/conventions.instruction.md +89 -17
  16. package/guidelines/queryRule/queryRule.instruction.md +4 -2
  17. package/guidelines/runtimeRule/runtimeRule.instruction.md +10 -5
  18. package/guidelines/transportRule/transportRule.instruction.md +40 -4
  19. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +1 -1
  20. package/incrementalBuilder.proc.js +3 -3
  21. package/{index-66yspb67.js → index-1bjkfvm9.js} +29 -27
  22. package/{index-b95yhqjr.js → index-1gs9g12n.js} +3 -3
  23. package/{index-y7hx1ygz.js → index-3xmzr1p1.js} +2 -2
  24. package/{index-mzjb6zp4.js → index-50jjwg8y.js} +1 -1
  25. package/{index-150s07n8.js → index-50wb2a26.js} +313 -93
  26. package/{index-8b639zes.js → index-6keyf4sg.js} +4 -4
  27. package/{index-vs8mefhy.js → index-bsv901fd.js} +7 -7
  28. package/{index-5pvxf7z0.js → index-cb6yc5mb.js} +2 -2
  29. package/{index-rfcz04w9.js → index-f4e08ptp.js} +4 -4
  30. package/{index-25fvrxmy.js → index-g38nhv87.js} +1 -1
  31. package/{index-m3xsb1ms.js → index-gtjgnv36.js} +29 -11
  32. package/{index-mb59b8x0.js → index-h9ht6s60.js} +1 -1
  33. package/{index-5g4rkrvt.js → index-hp3stk1m.js} +3 -3
  34. package/{index-h54yj9wr.js → index-hxnnfy57.js} +6 -5
  35. package/{index-kn5d4jmg.js → index-j38qkvkk.js} +7 -7
  36. package/{index-y5ga5w9t.js → index-jb0hmt3k.js} +3 -3
  37. package/{index-7p4c0yer.js → index-jk9xnck6.js} +33 -11
  38. package/{index-senscydg.js → index-k9rrten6.js} +6 -1
  39. package/{index-qe71g4ze.js → index-nwd6qzvv.js} +42 -23
  40. package/{index-a37by9hn.js → index-q6ft9fkc.js} +4 -4
  41. package/{index-br8pkrk1.js → index-t91a7339.js} +5 -5
  42. package/{index-c14nsvnv.js → index-xwprn9nr.js} +1 -1
  43. package/{index-fkvb79qe.js → index-z750gk1j.js} +15 -11
  44. package/{index-5q14pwzd.js → index-zwd84m0w.js} +4 -4
  45. package/{index-8kvy8qb4.js → index-zyw622y1.js} +12 -2
  46. package/index.js +21 -21
  47. package/{library.command-keqjevpp.js → library.command-9m2rdwwz.js} +3 -3
  48. package/{localRegistry.command-pydeq5zf.js → localRegistry.command-kda81jyk.js} +9 -9
  49. package/{module.command-dkrnqx3v.js → module.command-q63dffya.js} +5 -5
  50. package/{package.command-wmc0ys5y.js → package.command-y2jh0m99.js} +3 -3
  51. package/package.json +2 -2
  52. package/{page.command-tf3erhrv.js → page.command-f3e4cwhh.js} +3 -3
  53. package/{primitive.command-7hqpegj4.js → primitive.command-r4kq75qj.js} +6 -6
  54. package/{quality.command-8122axq3.js → quality.command-f7gzh26z.js} +9 -2
  55. package/{repair.command-mcy12h0n.js → repair.command-0qmyr6qa.js} +5 -5
  56. package/{scalar.command-vvvbzttc.js → scalar.command-kddn7av4.js} +4 -4
  57. package/{subspace.command-pzvqfy5h.js → subspace.command-ft65qvc4.js} +5 -7
  58. package/templates/app/tsconfig.json.template +1 -6
  59. package/templates/app/ui/Recipe/jellyButton.ts +1 -0
  60. package/templates/facetIndex/index.ts +21 -6
  61. package/templates/lib/dict.ts +9 -1
  62. package/templates/lib/srv.ts +2 -3
  63. package/templates/libRoot/common/index.ts +2 -7
  64. package/templates/libRoot/srvkit/index.ts +2 -7
  65. package/templates/libRoot/ui/index.ts +2 -7
  66. package/templates/libRoot/webkit/index.ts +2 -7
  67. package/templates/moduleRoot/index.tsx +3 -3
  68. package/{tunnel.command-82zz5xnq.js → tunnel.command-b3ymdk4f.js} +2 -2
  69. package/{workflow.command-y8x3kgjv.js → workflow.command-z1srcdfw.js} +10 -10
  70. package/{workspace.command-jvsb7brc.js → workspace.command-vp6vmx3z.js} +21 -21
  71. package/cloud.script-c723cpcb.js +0 -20
  72. package/context.runner-erfe68j5.js +0 -21
  73. package/index-bjwxs904.js +0 -77
  74. package/templates/libRoot/common/commonLogic.ts +0 -14
  75. package/templates/libRoot/srvkit/backendLogic.ts +0 -13
  76. package/templates/libRoot/webkit/frontendLogic.ts +0 -13
@@ -23,9 +23,9 @@ export default function getContent(scanInfo: AppInfo | LibInfo, dict: Dict) {
23
23
  if (fileTypes.length === 0) return null;
24
24
  return {
25
25
  filename: "index.ts",
26
- content: `
27
- ${fileTypes.map((type) => `import * as ${type} from "./${dict.Model}.${type}";`).join("\n")}
26
+ content: `${fileTypes.map((type) => `import * as ${type} from "./${dict.Model}.${type}";`).join("\n")}
28
27
 
29
- export const ${dict.Model} = { ${fileTypes.join(", ")} };`,
28
+ export const ${dict.Model} = { ${fileTypes.join(", ")} };
29
+ `,
30
30
  };
31
31
  }
@@ -9,10 +9,10 @@ import {
9
9
  runner,
10
10
  script,
11
11
  command
12
- } from "./index-a37by9hn.js";
12
+ } from "./index-q6ft9fkc.js";
13
13
  import {
14
14
  AppExecutor
15
- } from "./index-150s07n8.js";
15
+ } from "./index-50wb2a26.js";
16
16
  import {
17
17
  TunnelShare2
18
18
  } from "./index-2wc41k5w.js";
@@ -3,20 +3,20 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-a37by9hn.js";
6
+ } from "./index-q6ft9fkc.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-150s07n8.js";
8
+ import"./index-50wb2a26.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-mb59b8x0.js";
11
- import"./index-8kvy8qb4.js";
12
- import"./index-25fvrxmy.js";
13
- import"./index-rfcz04w9.js";
14
- import"./index-8b639zes.js";
15
- import"./index-5g4rkrvt.js";
16
- import"./index-5pvxf7z0.js";
10
+ import"./index-h9ht6s60.js";
11
+ import"./index-zyw622y1.js";
12
+ import"./index-g38nhv87.js";
13
+ import"./index-f4e08ptp.js";
14
+ import"./index-6keyf4sg.js";
15
+ import"./index-hp3stk1m.js";
16
+ import"./index-cb6yc5mb.js";
17
17
  import {
18
18
  WorkflowRunner
19
- } from "./index-vs8mefhy.js";
19
+ } from "./index-bsv901fd.js";
20
20
 
21
21
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
22
22
  import { Logger } from "akanjs/common";
@@ -11,7 +11,7 @@ import {
11
11
  runner,
12
12
  script,
13
13
  command
14
- } from "./index-a37by9hn.js";
14
+ } from "./index-q6ft9fkc.js";
15
15
  import {
16
16
  extractAgentBlock,
17
17
  collectScopeRecipeSources,
@@ -22,7 +22,7 @@ import {
22
22
  AppExecutor,
23
23
  LibExecutor,
24
24
  PkgExecutor
25
- } from "./index-150s07n8.js";
25
+ } from "./index-50wb2a26.js";
26
26
  import {
27
27
  countBlocking,
28
28
  formatStyleContract,
@@ -32,43 +32,43 @@ import {
32
32
  collectRecipeSources2,
33
33
  scanRecipes2
34
34
  } from "./index-hj6w4ka1.js";
35
- import"./index-mb59b8x0.js";
36
- import"./index-8kvy8qb4.js";
35
+ import"./index-h9ht6s60.js";
36
+ import"./index-zyw622y1.js";
37
37
  import"./index-zzvvc845.js";
38
38
  import {
39
39
  AgentScript
40
- } from "./index-b95yhqjr.js";
41
- import"./index-senscydg.js";
42
- import"./index-7p4c0yer.js";
40
+ } from "./index-1gs9g12n.js";
41
+ import"./index-k9rrten6.js";
42
+ import"./index-jk9xnck6.js";
43
43
  import {
44
44
  LibraryScript
45
- } from "./index-66yspb67.js";
45
+ } from "./index-1bjkfvm9.js";
46
46
  import {
47
47
  ApplicationScript
48
- } from "./index-qe71g4ze.js";
48
+ } from "./index-nwd6qzvv.js";
49
49
  import"./index-7md2g9vw.js";
50
50
  import"./index-2ahj896a.js";
51
51
  import {
52
52
  PackageScript
53
- } from "./index-y7hx1ygz.js";
53
+ } from "./index-3xmzr1p1.js";
54
54
  import {
55
55
  getNpmRegistryUrl,
56
56
  getLatestPackageVersion
57
- } from "./index-h54yj9wr.js";
57
+ } from "./index-hxnnfy57.js";
58
58
  import {
59
59
  CloudScript2
60
- } from "./index-br8pkrk1.js";
61
- import"./index-kn5d4jmg.js";
62
- import"./index-5g4rkrvt.js";
63
- import"./index-25fvrxmy.js";
64
- import"./index-rfcz04w9.js";
65
- import"./index-8b639zes.js";
66
- import"./index-5pvxf7z0.js";
67
- import"./index-vs8mefhy.js";
60
+ } from "./index-t91a7339.js";
61
+ import"./index-j38qkvkk.js";
62
+ import"./index-hp3stk1m.js";
63
+ import"./index-g38nhv87.js";
64
+ import"./index-f4e08ptp.js";
65
+ import"./index-6keyf4sg.js";
66
+ import"./index-cb6yc5mb.js";
67
+ import"./index-bsv901fd.js";
68
68
  import {
69
69
  ContextScript
70
- } from "./index-5q14pwzd.js";
71
- import"./index-mzjb6zp4.js";
70
+ } from "./index-zwd84m0w.js";
71
+ import"./index-50jjwg8y.js";
72
72
 
73
73
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
74
74
  import path from "path";
@@ -1,20 +0,0 @@
1
- // @bun
2
- import {
3
- CloudScript2
4
- } from "./index-br8pkrk1.js";
5
- import"./index-h54yj9wr.js";
6
- import"./index-y7hx1ygz.js";
7
- import"./index-qe71g4ze.js";
8
- import"./index-mzjb6zp4.js";
9
- import"./index-66yspb67.js";
10
- import"./index-7p4c0yer.js";
11
- import"./index-94s080qm.js";
12
- import"./index-a37by9hn.js";
13
- import"./index-7md2g9vw.js";
14
- import"./index-senscydg.js";
15
- import"./index-150s07n8.js";
16
- import"./index-2ahj896a.js";
17
- import"./index-52w0fvh8.js";
18
- export {
19
- CloudScript2 as CloudScript
20
- };
@@ -1,21 +0,0 @@
1
- // @bun
2
- import {
3
- ContextRunner2
4
- } from "./index-kn5d4jmg.js";
5
- import"./index-vs8mefhy.js";
6
- import"./index-5pvxf7z0.js";
7
- import"./index-8b639zes.js";
8
- import"./index-5g4rkrvt.js";
9
- import"./index-rfcz04w9.js";
10
- import"./index-25fvrxmy.js";
11
- import"./index-7p4c0yer.js";
12
- import"./index-8kvy8qb4.js";
13
- import"./index-mb59b8x0.js";
14
- import"./index-zzvvc845.js";
15
- import"./index-a37by9hn.js";
16
- import"./index-150s07n8.js";
17
- import"./index-hj6w4ka1.js";
18
- import"./index-52w0fvh8.js";
19
- export {
20
- ContextRunner2 as ContextRunner
21
- };
package/index-bjwxs904.js DELETED
@@ -1,77 +0,0 @@
1
- // @bun
2
- // pkgs/@akanjs/devkit/libSource.ts
3
- class LibSource {
4
- static manifestKey = "akan";
5
- static unhashedDirs = ["env"];
6
- #lib;
7
- constructor(lib) {
8
- this.#lib = lib;
9
- }
10
- get #prefix() {
11
- return `libs/${this.#lib.name}/`;
12
- }
13
- #isHashed(file) {
14
- const relative = file.slice(this.#prefix.length);
15
- return !LibSource.unhashedDirs.includes(relative.split("/")[0] ?? "");
16
- }
17
- static unstamped(manifestContent) {
18
- const manifest = JSON.parse(manifestContent);
19
- delete manifest[LibSource.manifestKey];
20
- return JSON.stringify(manifest);
21
- }
22
- static async hashFiles(files, manifestFile, read) {
23
- const hasher = new Bun.CryptoHasher("sha256");
24
- for (const file of files) {
25
- const content = await read(file);
26
- hasher.update(file);
27
- hasher.update("\x00");
28
- hasher.update(file === manifestFile ? LibSource.unstamped(content) : content);
29
- hasher.update("\x00");
30
- }
31
- return hasher.digest("hex").slice(0, 32);
32
- }
33
- async computeHash() {
34
- const files = (await this.#lib.workspace.listGitFiles([`libs/${this.#lib.name}`], { untracked: true })).filter((file) => this.#isHashed(file));
35
- return await LibSource.hashFiles(files, `${this.#prefix}package.json`, (file) => this.#lib.workspace.readFile(file));
36
- }
37
- async read() {
38
- const manifest = await this.#lib.getPackageJson();
39
- const akan = manifest[LibSource.manifestKey];
40
- return akan?.source ?? null;
41
- }
42
- async write({ origin, sha }) {
43
- const [manifest, hash] = await Promise.all([this.#lib.getPackageJson(), this.computeHash()]);
44
- const akan = manifest[LibSource.manifestKey] ?? {};
45
- const stamp = { origin, sha, hash, syncedAt: new Date().toISOString() };
46
- await this.#lib.setPackageJson({ ...manifest, [LibSource.manifestKey]: { ...akan, source: stamp } });
47
- return stamp;
48
- }
49
- async syncStamp({ origin, sha }) {
50
- const [current, hash] = await Promise.all([this.read(), this.computeHash()]);
51
- if (current?.origin === origin && current.sha === sha && current.hash === hash)
52
- return { stamp: current, changed: false };
53
- return { stamp: await this.write({ origin, sha }), changed: true };
54
- }
55
- async status() {
56
- const [stamp, hash] = await Promise.all([this.read(), this.computeHash()]);
57
- const drift = !stamp ? "unstamped" : stamp.hash === hash ? "clean" : "drifted";
58
- return { lib: this.#lib.name, drift, stamp, hash };
59
- }
60
- }
61
- function formatLibStatuses(statuses) {
62
- const marks = { clean: "clean ", drifted: "DRIFTED ", unstamped: "unstamped" };
63
- const sections = [
64
- "Akan Library Source Status",
65
- "",
66
- ...statuses.map((status) => {
67
- const origin = status.stamp ? `${status.stamp.origin}@${status.stamp.sha}` : "no akan.source in package.json";
68
- return ` ${marks[status.drift]} libs/${status.lib} ${origin}`;
69
- }),
70
- "",
71
- `drifted: ${statuses.filter((status) => status.drift === "drifted").length} / ${statuses.length}`
72
- ];
73
- return sections.join(`
74
- `);
75
- }
76
-
77
- export { LibSource, formatLibStatuses };
@@ -1,14 +0,0 @@
1
- interface Dict {
2
- libName: string;
3
- }
4
- export default function getContent(scanInfo: null, dict: Dict) {
5
- return `
6
- // 현 디렉토리에서는 프로젝트 내 전체적으로 사용되는 세부적인 로직을 구현하며, 따라서 백/프론트 비의존적인 pure js 코드만 구현 가능합니다.
7
- // base폴더와 다른점은, common 코드는 사용하는 파일에서만 import되기 때문에, 외부라이브러리를 import해서 사용하거나 상세한 로직을 구현할 수 있습니다.
8
- // @${dict.libName}/common에서는 서버/클라이언트 관련 라이브러리(@*/server, @*/server, @*/client, @*/client)를 모두 import할 수 없으며, @*/base와 @*/common 라이브러리만 import 가능합니다.
9
-
10
- export const someCommonLogic = () => {
11
- //
12
- };
13
- `;
14
- }
@@ -1,13 +0,0 @@
1
- interface Dict {
2
- libName: string;
3
- }
4
- export default function getContent(scanInfo: null, dict: Dict) {
5
- return `
6
- // 현 디렉토리에서는 백엔드에서 사용하는 로직을 추가할 수 있습니다.
7
- // @${dict.libName}/srvkit에서는 클라이언트 관련 라이브러리(@*/client, @*/webkit)를 import할 수 없습니다.
8
-
9
- export const someBackendLogic = () => {
10
- //
11
- };
12
- `;
13
- }
@@ -1,13 +0,0 @@
1
- interface Dict {
2
- libName: string;
3
- }
4
- export default function getContent(scanInfo: null, dict: Dict) {
5
- return `
6
- // 현 디렉토리에서는 프론트엔드에서 사용하는 로직을 추가할 수 있습니다.
7
- // @${dict.libName}/webkit에서는 클라이언트 관련 라이브러리(@*/server, @*/srvkit)를 import할 수 없습니다.
8
-
9
- export const someFrontendLogic = () => {
10
- //
11
- };
12
- `;
13
- }