@akanjs/cli 0.0.118 → 0.0.120

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 (181) hide show
  1. package/cjs/index.js +45 -1
  2. package/cjs/src/templates/libRoot/akan.config.js +36 -0
  3. package/cjs/src/templates/libRoot/base/baseLogic.js +35 -0
  4. package/cjs/src/templates/libRoot/base/index.js +29 -0
  5. package/cjs/src/templates/libRoot/common/commonLogic.js +35 -0
  6. package/cjs/src/templates/libRoot/common/index.js +29 -0
  7. package/cjs/src/templates/libRoot/jest.config.js +1 -1
  8. package/cjs/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +31 -0
  9. package/cjs/src/templates/libRoot/lib/___libName__/__libName__.service.js +42 -0
  10. package/cjs/src/templates/libRoot/lib/___libName__/__libName__.store.js +36 -0
  11. package/cjs/src/templates/libRoot/lib/___libName__/_server.js +34 -0
  12. package/cjs/src/templates/libRoot/lib/option.js +42 -0
  13. package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +57 -0
  14. package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +38 -0
  15. package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +34 -0
  16. package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +51 -0
  17. package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +80 -0
  18. package/cjs/src/templates/libRoot/lib/setting/_server.js +48 -0
  19. package/cjs/src/templates/libRoot/lib/setting/index.js +61 -0
  20. package/cjs/src/templates/libRoot/lib/setting/setting.constant.js +46 -0
  21. package/cjs/src/templates/libRoot/lib/setting/setting.dictionary.js +46 -0
  22. package/cjs/src/templates/libRoot/lib/setting/setting.document.js +48 -0
  23. package/cjs/src/templates/libRoot/lib/setting/setting.service.js +37 -0
  24. package/cjs/src/templates/libRoot/lib/setting/setting.signal.js +34 -0
  25. package/cjs/src/templates/libRoot/lib/setting/setting.store.js +41 -0
  26. package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +43 -0
  27. package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +38 -0
  28. package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +33 -0
  29. package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +51 -0
  30. package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +62 -0
  31. package/cjs/src/templates/libRoot/lib/summary/_server.js +48 -0
  32. package/cjs/src/templates/libRoot/lib/summary/index.js +67 -0
  33. package/cjs/src/templates/libRoot/lib/summary/summary.constant.js +44 -0
  34. package/cjs/src/templates/libRoot/lib/summary/summary.dictionary.js +49 -0
  35. package/cjs/src/templates/libRoot/lib/summary/summary.document.js +48 -0
  36. package/cjs/src/templates/libRoot/lib/summary/summary.service.js +34 -0
  37. package/cjs/src/templates/libRoot/lib/summary/summary.signal.js +34 -0
  38. package/cjs/src/templates/libRoot/lib/summary/summary.store.js +41 -0
  39. package/cjs/src/templates/libRoot/lib/user/User.Template.js +65 -0
  40. package/cjs/src/templates/libRoot/lib/user/User.Unit.js +38 -0
  41. package/cjs/src/templates/libRoot/lib/user/User.Util.js +94 -0
  42. package/cjs/src/templates/libRoot/lib/user/User.View.js +66 -0
  43. package/cjs/src/templates/libRoot/lib/user/User.Zone.js +74 -0
  44. package/cjs/src/templates/libRoot/lib/user/_server.js +48 -0
  45. package/cjs/src/templates/libRoot/lib/user/index.js +61 -0
  46. package/cjs/src/templates/libRoot/lib/user/user.constant.js +67 -0
  47. package/cjs/src/templates/libRoot/lib/user/user.dictionary.js +52 -0
  48. package/cjs/src/templates/libRoot/lib/user/user.document.js +54 -0
  49. package/cjs/src/templates/libRoot/lib/user/user.service.js +42 -0
  50. package/cjs/src/templates/libRoot/lib/user/user.signal.js +34 -0
  51. package/cjs/src/templates/libRoot/lib/user/user.signal.spec.js +37 -0
  52. package/cjs/src/templates/libRoot/lib/user/user.signal.test.js +39 -0
  53. package/cjs/src/templates/libRoot/lib/user/user.store.js +39 -0
  54. package/cjs/src/templates/libRoot/nest/backendLogic.js +34 -0
  55. package/cjs/src/templates/libRoot/nest/index.js +29 -0
  56. package/cjs/src/templates/libRoot/next/frontendLogic.js +34 -0
  57. package/cjs/src/templates/libRoot/next/index.js +29 -0
  58. package/cjs/src/templates/libRoot/ui/index.js +29 -0
  59. package/esm/index.js +45 -1
  60. package/esm/src/templates/libRoot/akan.config.js +16 -0
  61. package/esm/src/templates/libRoot/base/baseLogic.js +15 -0
  62. package/esm/src/templates/libRoot/base/index.js +9 -0
  63. package/esm/src/templates/libRoot/common/commonLogic.js +15 -0
  64. package/esm/src/templates/libRoot/common/index.js +9 -0
  65. package/esm/src/templates/libRoot/jest.config.js +1 -1
  66. package/esm/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +11 -0
  67. package/esm/src/templates/libRoot/lib/___libName__/__libName__.service.js +22 -0
  68. package/esm/src/templates/libRoot/lib/___libName__/__libName__.store.js +16 -0
  69. package/esm/src/templates/libRoot/lib/___libName__/_server.js +14 -0
  70. package/esm/src/templates/libRoot/lib/option.js +22 -0
  71. package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +37 -0
  72. package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +18 -0
  73. package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +14 -0
  74. package/esm/src/templates/libRoot/lib/setting/Setting.View.js +31 -0
  75. package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +60 -0
  76. package/esm/src/templates/libRoot/lib/setting/_server.js +28 -0
  77. package/esm/src/templates/libRoot/lib/setting/index.js +41 -0
  78. package/esm/src/templates/libRoot/lib/setting/setting.constant.js +26 -0
  79. package/esm/src/templates/libRoot/lib/setting/setting.dictionary.js +26 -0
  80. package/esm/src/templates/libRoot/lib/setting/setting.document.js +28 -0
  81. package/esm/src/templates/libRoot/lib/setting/setting.service.js +17 -0
  82. package/esm/src/templates/libRoot/lib/setting/setting.signal.js +14 -0
  83. package/esm/src/templates/libRoot/lib/setting/setting.store.js +21 -0
  84. package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +23 -0
  85. package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +18 -0
  86. package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +13 -0
  87. package/esm/src/templates/libRoot/lib/summary/Summary.View.js +31 -0
  88. package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +42 -0
  89. package/esm/src/templates/libRoot/lib/summary/_server.js +28 -0
  90. package/esm/src/templates/libRoot/lib/summary/index.js +47 -0
  91. package/esm/src/templates/libRoot/lib/summary/summary.constant.js +24 -0
  92. package/esm/src/templates/libRoot/lib/summary/summary.dictionary.js +29 -0
  93. package/esm/src/templates/libRoot/lib/summary/summary.document.js +28 -0
  94. package/esm/src/templates/libRoot/lib/summary/summary.service.js +14 -0
  95. package/esm/src/templates/libRoot/lib/summary/summary.signal.js +14 -0
  96. package/esm/src/templates/libRoot/lib/summary/summary.store.js +21 -0
  97. package/esm/src/templates/libRoot/lib/user/User.Template.js +45 -0
  98. package/esm/src/templates/libRoot/lib/user/User.Unit.js +18 -0
  99. package/esm/src/templates/libRoot/lib/user/User.Util.js +74 -0
  100. package/esm/src/templates/libRoot/lib/user/User.View.js +46 -0
  101. package/esm/src/templates/libRoot/lib/user/User.Zone.js +54 -0
  102. package/esm/src/templates/libRoot/lib/user/_server.js +28 -0
  103. package/esm/src/templates/libRoot/lib/user/index.js +41 -0
  104. package/esm/src/templates/libRoot/lib/user/user.constant.js +47 -0
  105. package/esm/src/templates/libRoot/lib/user/user.dictionary.js +32 -0
  106. package/esm/src/templates/libRoot/lib/user/user.document.js +34 -0
  107. package/esm/src/templates/libRoot/lib/user/user.service.js +22 -0
  108. package/esm/src/templates/libRoot/lib/user/user.signal.js +14 -0
  109. package/esm/src/templates/libRoot/lib/user/user.signal.spec.js +17 -0
  110. package/esm/src/templates/libRoot/lib/user/user.signal.test.js +19 -0
  111. package/esm/src/templates/libRoot/lib/user/user.store.js +19 -0
  112. package/esm/src/templates/libRoot/nest/backendLogic.js +14 -0
  113. package/esm/src/templates/libRoot/nest/index.js +9 -0
  114. package/esm/src/templates/libRoot/next/frontendLogic.js +14 -0
  115. package/esm/src/templates/libRoot/next/index.js +9 -0
  116. package/esm/src/templates/libRoot/ui/index.js +9 -0
  117. package/package.json +1 -1
  118. package/src/cloud/cloud.command.d.ts +1 -0
  119. package/src/cloud/cloud.runner.d.ts +1 -0
  120. package/src/cloud/cloud.script.d.ts +1 -0
  121. package/src/library/library.runner.d.ts +1 -1
  122. package/src/templates/libRoot/akan.config.d.ts +5 -0
  123. package/src/templates/libRoot/base/baseLogic.d.ts +5 -0
  124. package/src/templates/libRoot/base/index.d.ts +5 -0
  125. package/src/templates/libRoot/common/commonLogic.d.ts +5 -0
  126. package/src/templates/libRoot/common/index.d.ts +5 -0
  127. package/src/templates/libRoot/env/env.server.example.ts.template +7 -0
  128. package/src/templates/libRoot/env/env.server.testing.ts.template +7 -0
  129. package/src/templates/libRoot/jest.config.d.ts +1 -1
  130. package/src/templates/libRoot/lib/___libName__/__libName__.dictionary.d.ts +6 -0
  131. package/src/templates/libRoot/lib/___libName__/__libName__.service.d.ts +6 -0
  132. package/src/templates/libRoot/lib/___libName__/__libName__.store.d.ts +6 -0
  133. package/src/templates/libRoot/lib/___libName__/_server.d.ts +7 -0
  134. package/src/templates/libRoot/lib/option.d.ts +6 -0
  135. package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +9 -0
  136. package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +9 -0
  137. package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +9 -0
  138. package/src/templates/libRoot/lib/setting/Setting.View.d.ts +9 -0
  139. package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +9 -0
  140. package/src/templates/libRoot/lib/setting/_server.d.ts +6 -0
  141. package/src/templates/libRoot/lib/setting/index.d.ts +9 -0
  142. package/src/templates/libRoot/lib/setting/setting.constant.d.ts +7 -0
  143. package/src/templates/libRoot/lib/setting/setting.dictionary.d.ts +7 -0
  144. package/src/templates/libRoot/lib/setting/setting.document.d.ts +6 -0
  145. package/src/templates/libRoot/lib/setting/setting.service.d.ts +7 -0
  146. package/src/templates/libRoot/lib/setting/setting.signal.d.ts +6 -0
  147. package/src/templates/libRoot/lib/setting/setting.store.d.ts +6 -0
  148. package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +9 -0
  149. package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +9 -0
  150. package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +9 -0
  151. package/src/templates/libRoot/lib/summary/Summary.View.d.ts +9 -0
  152. package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +9 -0
  153. package/src/templates/libRoot/lib/summary/_server.d.ts +6 -0
  154. package/src/templates/libRoot/lib/summary/index.d.ts +9 -0
  155. package/src/templates/libRoot/lib/summary/summary.constant.d.ts +7 -0
  156. package/src/templates/libRoot/lib/summary/summary.dictionary.d.ts +7 -0
  157. package/src/templates/libRoot/lib/summary/summary.document.d.ts +6 -0
  158. package/src/templates/libRoot/lib/summary/summary.service.d.ts +7 -0
  159. package/src/templates/libRoot/lib/summary/summary.signal.d.ts +6 -0
  160. package/src/templates/libRoot/lib/summary/summary.store.d.ts +6 -0
  161. package/src/templates/libRoot/lib/user/User.Template.d.ts +9 -0
  162. package/src/templates/libRoot/lib/user/User.Unit.d.ts +9 -0
  163. package/src/templates/libRoot/lib/user/User.Util.d.ts +9 -0
  164. package/src/templates/libRoot/lib/user/User.View.d.ts +9 -0
  165. package/src/templates/libRoot/lib/user/User.Zone.d.ts +9 -0
  166. package/src/templates/libRoot/lib/user/_server.d.ts +6 -0
  167. package/src/templates/libRoot/lib/user/index.d.ts +9 -0
  168. package/src/templates/libRoot/lib/user/user.constant.d.ts +7 -0
  169. package/src/templates/libRoot/lib/user/user.dictionary.d.ts +7 -0
  170. package/src/templates/libRoot/lib/user/user.document.d.ts +7 -0
  171. package/src/templates/libRoot/lib/user/user.service.d.ts +7 -0
  172. package/src/templates/libRoot/lib/user/user.signal.d.ts +6 -0
  173. package/src/templates/libRoot/lib/user/user.signal.spec.d.ts +6 -0
  174. package/src/templates/libRoot/lib/user/user.signal.test.d.ts +6 -0
  175. package/src/templates/libRoot/lib/user/user.store.d.ts +6 -0
  176. package/src/templates/libRoot/nest/backendLogic.d.ts +5 -0
  177. package/src/templates/libRoot/nest/index.d.ts +5 -0
  178. package/src/templates/libRoot/next/frontendLogic.d.ts +5 -0
  179. package/src/templates/libRoot/next/index.d.ts +5 -0
  180. package/src/templates/libRoot/package.json.template +2 -3
  181. package/src/templates/libRoot/ui/index.d.ts +5 -0
@@ -0,0 +1,41 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/index.tsx
2
+ function getContent(scanResult, dict = {}) {
3
+ return {
4
+ filename: "index.tsx",
5
+ content: `
6
+ import { Signal } from "@util/ui";
7
+ import { AiOutlineUser } from "react-icons/ai";
8
+
9
+ import * as Template from "./User.Template";
10
+ import * as Unit from "./User.Unit";
11
+ import * as Util from "./User.Util";
12
+ import * as View from "./User.View";
13
+ import * as Zone from "./User.Zone";
14
+
15
+ export const User = {
16
+ Menu: {
17
+ Admin: {
18
+ key: "user",
19
+ label: "User",
20
+ icon: <AiOutlineUser />,
21
+ render: () => <Zone.Admin />,
22
+ },
23
+ Doc: {
24
+ key: "user",
25
+ label: "User",
26
+ icon: <AiOutlineUser />,
27
+ render: () => <Signal.Doc.Zone refName="user" />,
28
+ },
29
+ },
30
+ Template,
31
+ Unit,
32
+ Util,
33
+ View,
34
+ Zone,
35
+ };
36
+ `
37
+ };
38
+ }
39
+ export {
40
+ getContent as default
41
+ };
@@ -0,0 +1,47 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.constant.ts
2
+ function getContent(scanResult, dict) {
3
+ return `
4
+ import { as, from, Model, sortOf, via } from "@akanjs/constant";
5
+
6
+ import {
7
+ libUserFilters,
8
+ libUserInputs,
9
+ libUserInsights,
10
+ libUsers,
11
+ libUserSummaries,
12
+ root,
13
+ } from "../__lib/lib.constant";
14
+
15
+ @Model.Input("${dict.LibName}UserInput")
16
+ export class ${dict.LibName}UserInput {}
17
+
18
+ @Model.Object("${dict.LibName}User")
19
+ export class ${dict.LibName}User extends as(${dict.LibName}UserInput) {}
20
+
21
+ @Model.Insight("${dict.LibName}UserInsight")
22
+ export class ${dict.LibName}UserInsight {}
23
+
24
+ @Model.Summary("${dict.LibName}UserSummary")
25
+ export class ${dict.LibName}UserSummary {}
26
+
27
+ @Model.Filter("${dict.LibName}UserFilter")
28
+ export class ${dict.LibName}UserFilter extends sortOf(root.User, {}) {}
29
+
30
+ export class UserInput extends from(...libUserInputs, ${dict.LibName}UserInput) {}
31
+ export class UserObject extends from(...libUsers, ${dict.LibName}User) {}
32
+
33
+ @Model.Light("LightUser")
34
+ export class LightUser extends via(UserObject, ["nickname", "image", "roles", "status"] as const) {}
35
+
36
+ @Model.Full("User")
37
+ export class User extends via(UserObject, LightUser, root.User, root.LightUser) {}
38
+
39
+ export class UserSummary extends from(...libUserSummaries, ${dict.LibName}UserSummary) {}
40
+ export class UserInsight extends from(...libUserInsights, ${dict.LibName}UserInsight) {}
41
+
42
+ export class UserFilter extends from(...libUserFilters, ${dict.LibName}UserFilter) {}
43
+ `;
44
+ }
45
+ export {
46
+ getContent as default
47
+ };
@@ -0,0 +1,32 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.dictionary.ts
2
+ function getContent(scanResult, dict) {
3
+ return `
4
+ import { ExtendModelDictionary, SignalDictionary, SummaryDictionary } from "@akanjs/dictionary";
5
+
6
+ import type { ${dict.Libname}User, ${dict.Libname}UserFilter, ${dict.Libname}UserInsight, ${dict.Libname}UserSummary } from "./user.constant";
7
+ import type { UserSignal } from "./user.signal";
8
+
9
+ const modelDictionary = {
10
+ // * ==================== Model ==================== * //
11
+ // * ==================== Model ==================== * //
12
+ // * ==================== Insight ==================== * //
13
+ // * ==================== Insight ==================== * //
14
+ // * ==================== Filter ==================== * //
15
+ // * ==================== Filter ==================== * //
16
+ // * ==================== Etc ==================== * //
17
+ // * ==================== Etc ==================== * //
18
+ } satisfies ExtendModelDictionary<${dict.Libname}User, ${dict.Libname}UserInsight, ${dict.Libname}UserFilter>;
19
+
20
+ export const userSummaryDictionary = {} satisfies SummaryDictionary<${dict.Libname}UserSummary>;
21
+
22
+ const signalDictionary = {
23
+ // * ==================== Endpoint ==================== * //
24
+ // * ==================== Endpoint ==================== * //
25
+ } satisfies SignalDictionary<UserSignal, ${dict.Libname}User>;
26
+
27
+ export const userDictionary = { ...modelDictionary, ...signalDictionary };
28
+ `;
29
+ }
30
+ export {
31
+ getContent as default
32
+ };
@@ -0,0 +1,34 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.document.ts
2
+ function getContent(scanResult, dict) {
3
+ return `
4
+ import { beyond, by, Database, into, type SchemaOf } from "@akanjs/document";
5
+
6
+ import { rootUser } from "../__lib/lib.document";
7
+ import { cnst } from "../cnst";
8
+
9
+ @Database.Input(() => cnst.UserInput)
10
+ export class UserInput extends by(rootUser.Input, cnst.UserInput) {}
11
+
12
+ @Database.Document(() => cnst.User)
13
+ export class User extends by(rootUser.Doc, cnst.User) {}
14
+
15
+ @Database.Model(() => cnst.User)
16
+ export class UserModel extends into(User, cnst.userCnst) {
17
+ async getSummary(): Promise<cnst.UserSummary> {
18
+ return {
19
+ ...(await this.getDefaultSummary()),
20
+ };
21
+ }
22
+ }
23
+
24
+ @Database.Middleware(() => cnst.User)
25
+ export class UserMiddleware extends beyond(UserModel, User) {
26
+ onSchema(schema: SchemaOf<UserModel, User>) {
27
+ //
28
+ }
29
+ }
30
+ `;
31
+ }
32
+ export {
33
+ getContent as default
34
+ };
@@ -0,0 +1,22 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.service.ts
2
+ function getContent(scanResult, dict) {
3
+ return `
4
+ import { ExtendedUserService, Service } from "@akanjs/service";
5
+
6
+ import { LibUserService } from "../__lib/lib.service";
7
+ import { cnst } from "../cnst";
8
+ import * as db from "../db";
9
+
10
+ @Service("UserService")
11
+ export class UserService extends ExtendedUserService(db.userDb, LibUserService) {
12
+ async summarize${dict.LibName}(): Promise<cnst.${dict.LibName}UserSummary> {
13
+ return {
14
+ ...(await this.userModel.getSummary()),
15
+ };
16
+ }
17
+ }
18
+ `;
19
+ }
20
+ export {
21
+ getContent as default
22
+ };
@@ -0,0 +1,14 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.signal.ts
2
+ function getContent(scanResult, dict = {}) {
3
+ return `
4
+ import { LogSignal, Signal } from "@akanjs/signal";
5
+
6
+ import { cnst, Srvs } from "../cnst";
7
+
8
+ @Signal(() => cnst.User)
9
+ export class UserSignal extends LogSignal(Srvs) {}
10
+ `;
11
+ }
12
+ export {
13
+ getContent as default
14
+ };
@@ -0,0 +1,17 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.signal.spec.ts
2
+ function getContent(scanResult, dict = {}) {
3
+ return `
4
+ import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
5
+ import * as userSpec from "@shared/lib/user/user.signal.spec";
6
+
7
+ import { cnst } from "../cnst";
8
+ import { fetch } from "../fetch";
9
+
10
+ export * from "@shared/lib/user/user.signal.spec";
11
+ export type UserAgent = userSpec.UserAgent<typeof fetch, cnst.User, cnst.UserInput>;
12
+ export type AdminAgent = adminSpec.AdminAgent<typeof fetch>;
13
+ `;
14
+ }
15
+ export {
16
+ getContent as default
17
+ };
@@ -0,0 +1,19 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.signal.test.ts
2
+ function getContent(scanResult, dict) {
3
+ return `
4
+ import * as userSpec from "@${dict.libName}/lib/user/user.signal.spec";
5
+
6
+ describe("User Signal", () => {
7
+ describe("Sign", () => {
8
+ let adminAgent: userSpec.AdminAgent;
9
+ let userAgent: userSpec.UserAgent;
10
+ it("can signup", async () => {
11
+ //
12
+ });
13
+ });
14
+ });
15
+ `;
16
+ }
17
+ export {
18
+ getContent as default
19
+ };
@@ -0,0 +1,19 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/lib/user/user.store.ts
2
+ function getContent(scanResult, dict = {}) {
3
+ return `
4
+ import { stateOf, Store } from "@akanjs/store";
5
+
6
+ import { cnst } from "../cnst";
7
+ import { fetch, userGql } from "../fetch";
8
+
9
+ @Store(() => cnst.User)
10
+ export class UserStore extends stateOf(userGql, {
11
+ self: fetch.defaultUser as cnst.User,
12
+ }) {
13
+ //
14
+ }
15
+ `;
16
+ }
17
+ export {
18
+ getContent as default
19
+ };
@@ -0,0 +1,14 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/nest/backendLogic.ts
2
+ function getContent(scanResult, dict) {
3
+ return `
4
+ // \uD604 \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C\uB294 \uBC31\uC5D4\uB4DC\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 \uB85C\uC9C1\uC744 \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
5
+ // @${dict.libName}/nest\uC5D0\uC11C\uB294 \uD074\uB77C\uC774\uC5B8\uD2B8 \uAD00\uB828 \uB77C\uC774\uBE0C\uB7EC\uB9AC(@*/client, @*/next)\uB97C import\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
6
+
7
+ export const someBackendLogic = () => {
8
+ //
9
+ };
10
+ `;
11
+ }
12
+ export {
13
+ getContent as default
14
+ };
@@ -0,0 +1,9 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/nest/index.ts
2
+ function getContent(scanResult, dict = {}) {
3
+ return `
4
+ export * from "./backendLogic";
5
+ `;
6
+ }
7
+ export {
8
+ getContent as default
9
+ };
@@ -0,0 +1,14 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/next/frontendLogic.ts
2
+ function getContent(scanResult, dict) {
3
+ return `
4
+ // \uD604 \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C\uB294 \uD504\uB860\uD2B8\uC5D4\uB4DC\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 \uB85C\uC9C1\uC744 \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
5
+ // @${dict.libName}/next\uC5D0\uC11C\uB294 \uD074\uB77C\uC774\uC5B8\uD2B8 \uAD00\uB828 \uB77C\uC774\uBE0C\uB7EC\uB9AC(@*/server, @*/nest)\uB97C import\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
6
+
7
+ export const someFrontendLogic = () => {
8
+ //
9
+ };
10
+ `;
11
+ }
12
+ export {
13
+ getContent as default
14
+ };
@@ -0,0 +1,9 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/next/index.ts
2
+ function getContent(scanResult, dict = {}) {
3
+ return `
4
+ export * from "./frontendLogic";
5
+ `;
6
+ }
7
+ export {
8
+ getContent as default
9
+ };
@@ -0,0 +1,9 @@
1
+ // pkgs/@akanjs/cli/src/templates/libRoot/ui/index.ts
2
+ function getContent(scanResult, dict = {}) {
3
+ return `
4
+ // export { YourComponent } from "./YourComponent";
5
+ `;
6
+ }
7
+ export {
8
+ getContent as default
9
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sourceType": "module",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.118",
4
+ "version": "0.0.120",
5
5
  "bin": {
6
6
  "akan": "cjs/index.js"
7
7
  },
@@ -8,4 +8,5 @@ export declare class CloudCommand {
8
8
  resetLlm(): void;
9
9
  ask(question: string): Promise<void>;
10
10
  deployAkan(workspace: Workspace): Promise<void>;
11
+ update(workspace: Workspace): Promise<void>;
11
12
  }
@@ -6,4 +6,5 @@ export declare class CloudRunner {
6
6
  resetLlm(): void;
7
7
  getAkanPkgs(workspace: Workspace): Promise<string[]>;
8
8
  deployAkan(workspace: Workspace, akanPkgs: string[]): Promise<void>;
9
+ update(workspace: Workspace): Promise<void>;
9
10
  }
@@ -7,4 +7,5 @@ export declare class CloudScript {
7
7
  resetLlm(): void;
8
8
  ask(question: string): Promise<void>;
9
9
  deployAkan(workspace: Workspace): Promise<void>;
10
+ update(workspace: Workspace): Promise<void>;
10
11
  }
@@ -2,7 +2,7 @@ import { Lib, LibExecutor, Workspace } from "@akanjs/devkit";
2
2
  export declare class LibraryRunner {
3
3
  #private;
4
4
  scanSync(lib: Lib): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
5
- createLibrary(libName: string, workspace: Workspace): Promise<void>;
5
+ createLibrary(libName: string, workspace: Workspace): Promise<LibExecutor>;
6
6
  removeLibrary(lib: Lib): Promise<void>;
7
7
  installLibrary(workspace: Workspace, libName: string): Promise<LibExecutor>;
8
8
  mergeLibraryDependencies(lib: Lib): Promise<void>;
@@ -0,0 +1,5 @@
1
+ interface Dict {
2
+ libName: string;
3
+ }
4
+ export default function getContent(scanResult: null, dict: Dict): string;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Dict {
2
+ libName: string;
3
+ }
4
+ export default function getContent(scanResult: null, dict: Dict): string;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Dict {
2
+ [key: string]: string;
3
+ }
4
+ export default function getContent(scanResult: null, dict?: Dict): string;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Dict {
2
+ libName: string;
3
+ }
4
+ export default function getContent(scanResult: null, dict: Dict): string;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Dict {
2
+ [key: string]: string;
3
+ }
4
+ export default function getContent(scanResult: null, dict?: Dict): string;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ import { env as shared } from "@shared/server";
2
+
3
+ import type { ModulesOptions } from "../lib/option";
4
+
5
+ export const env: ModulesOptions = {
6
+ ...shared,
7
+ };
@@ -0,0 +1,7 @@
1
+ import { env as shared } from "@shared/server";
2
+
3
+ import type { ModulesOptions } from "../lib/option";
4
+
5
+ export const env: ModulesOptions = {
6
+ ...shared,
7
+ };
@@ -1,6 +1,6 @@
1
1
  import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
- appName: string;
3
+ libName: string;
4
4
  }
5
5
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
6
6
  export {};
@@ -0,0 +1,6 @@
1
+ interface Dict {
2
+ libName: string;
3
+ LibName: string;
4
+ }
5
+ export default function getContent(scanResult: null, dict: Dict): string;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ interface Dict {
2
+ libName: string;
3
+ LibName: string;
4
+ }
5
+ export default function getContent(scanResult: null, dict: Dict): string;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ interface Dict {
2
+ libName: string;
3
+ LibName: string;
4
+ }
5
+ export default function getContent(scanResult: null, dict: Dict): string;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ appName: string;
4
+ AppName: string;
5
+ }
6
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): string;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): string;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ LibName: string;
5
+ }
6
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ LibName: string;
5
+ }
6
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): string;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ LibName: string;
5
+ }
6
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): string;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): string;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ appName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ [key: string]: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ libName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
6
+ export {};