@akanjs/cli 0.0.40 → 0.0.41

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/index.d.ts +1 -2
  2. package/index.js +3786 -3286
  3. package/package.json +33 -2
  4. package/src/application/application.command.d.ts +26 -0
  5. package/src/application/application.prompt.d.ts +2 -0
  6. package/src/application/application.runner.d.ts +35 -0
  7. package/src/application/application.script.d.ts +36 -0
  8. package/src/cloud/cloud.command.d.ts +8 -0
  9. package/src/cloud/cloud.runner.d.ts +7 -0
  10. package/src/cloud/cloud.script.d.ts +7 -0
  11. package/src/library/library.command.d.ts +8 -0
  12. package/src/library/library.runner.d.ts +4 -0
  13. package/src/library/library.script.d.ts +8 -0
  14. package/src/module/module.command.d.ts +13 -0
  15. package/src/module/module.prompt.d.ts +15 -0
  16. package/src/module/module.runner.d.ts +17 -0
  17. package/src/module/module.script.d.ts +11 -0
  18. package/src/package/package.command.d.ts +9 -0
  19. package/src/package/package.runner.d.ts +6 -0
  20. package/src/package/package.script.d.ts +7 -0
  21. package/src/package/page/page.command.d.ts +6 -0
  22. package/src/package/page/page.runner.d.ts +4 -0
  23. package/src/package/page/page.script.d.ts +5 -0
  24. package/src/workspace/workspace.command.d.ts +8 -0
  25. package/src/workspace/workspace.runner.d.ts +6 -0
  26. package/src/workspace/workspace.script.d.ts +7 -0
  27. package/src/templates/__scalar/__model__/__model__.constant.js +0 -34
  28. package/src/templates/__scalar/__model__/__model__.dictionary.js +0 -45
  29. package/src/templates/__scalar/__model__/__model__.document.js +0 -32
  30. package/src/templates/app/akan.config.ts.template +0 -5
  31. package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +0 -43
  32. package/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +0 -44
  33. package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +0 -38
  34. package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +0 -46
  35. package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +0 -37
  36. package/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +0 -39
  37. package/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +0 -56
  38. package/src/templates/app/app/[lang]/(__appName__)/layout.js +0 -48
  39. package/src/templates/app/app/[lang]/admin/layout.js +0 -49
  40. package/src/templates/app/app/[lang]/admin/page.js +0 -59
  41. package/src/templates/app/app/csr.js +0 -30
  42. package/src/templates/app/app/index.html.template +0 -13
  43. package/src/templates/app/app/layout.js +0 -34
  44. package/src/templates/app/app/robots.js +0 -39
  45. package/src/templates/app/app/sitemap.js +0 -35
  46. package/src/templates/app/base/baseLogic.js +0 -34
  47. package/src/templates/app/base/index.js +0 -28
  48. package/src/templates/app/capacitor.config.ts.template +0 -8
  49. package/src/templates/app/common/commonLogic.js +0 -34
  50. package/src/templates/app/common/index.js +0 -28
  51. package/src/templates/app/env/env.client.js +0 -37
  52. package/src/templates/app/env/env.client.type.js +0 -34
  53. package/src/templates/app/env/env.server.js +0 -37
  54. package/src/templates/app/jest.config.js +0 -35
  55. package/src/templates/app/lib/___appName__/__appName__.dictionary.js +0 -30
  56. package/src/templates/app/lib/___appName__/__appName__.service.js +0 -41
  57. package/src/templates/app/lib/___appName__/__appName__.store.js +0 -35
  58. package/src/templates/app/lib/___appName__/_server.js +0 -33
  59. package/src/templates/app/lib/option.js +0 -41
  60. package/src/templates/app/lib/setting/Setting.Template.js +0 -53
  61. package/src/templates/app/lib/setting/Setting.Unit.js +0 -34
  62. package/src/templates/app/lib/setting/Setting.Util.js +0 -30
  63. package/src/templates/app/lib/setting/Setting.View.js +0 -47
  64. package/src/templates/app/lib/setting/Setting.Zone.js +0 -76
  65. package/src/templates/app/lib/setting/_server.js +0 -47
  66. package/src/templates/app/lib/setting/index.js +0 -57
  67. package/src/templates/app/lib/setting/setting.constant.js +0 -45
  68. package/src/templates/app/lib/setting/setting.dictionary.js +0 -45
  69. package/src/templates/app/lib/setting/setting.document.js +0 -47
  70. package/src/templates/app/lib/setting/setting.service.js +0 -36
  71. package/src/templates/app/lib/setting/setting.signal.js +0 -33
  72. package/src/templates/app/lib/setting/setting.store.js +0 -40
  73. package/src/templates/app/lib/summary/Summary.Template.js +0 -39
  74. package/src/templates/app/lib/summary/Summary.Unit.js +0 -34
  75. package/src/templates/app/lib/summary/Summary.Util.js +0 -29
  76. package/src/templates/app/lib/summary/Summary.View.js +0 -47
  77. package/src/templates/app/lib/summary/Summary.Zone.js +0 -58
  78. package/src/templates/app/lib/summary/_server.js +0 -47
  79. package/src/templates/app/lib/summary/index.js +0 -63
  80. package/src/templates/app/lib/summary/summary.constant.js +0 -43
  81. package/src/templates/app/lib/summary/summary.dictionary.js +0 -48
  82. package/src/templates/app/lib/summary/summary.document.js +0 -47
  83. package/src/templates/app/lib/summary/summary.service.js +0 -33
  84. package/src/templates/app/lib/summary/summary.signal.js +0 -33
  85. package/src/templates/app/lib/summary/summary.store.js +0 -40
  86. package/src/templates/app/lib/user/User.Template.js +0 -61
  87. package/src/templates/app/lib/user/User.Unit.js +0 -34
  88. package/src/templates/app/lib/user/User.Util.js +0 -90
  89. package/src/templates/app/lib/user/User.View.js +0 -62
  90. package/src/templates/app/lib/user/User.Zone.js +0 -70
  91. package/src/templates/app/lib/user/_server.js +0 -47
  92. package/src/templates/app/lib/user/index.js +0 -57
  93. package/src/templates/app/lib/user/user.constant.js +0 -66
  94. package/src/templates/app/lib/user/user.dictionary.js +0 -51
  95. package/src/templates/app/lib/user/user.document.js +0 -53
  96. package/src/templates/app/lib/user/user.service.js +0 -41
  97. package/src/templates/app/lib/user/user.signal.js +0 -33
  98. package/src/templates/app/lib/user/user.signal.spec.js +0 -36
  99. package/src/templates/app/lib/user/user.signal.test.js +0 -38
  100. package/src/templates/app/lib/user/user.store.js +0 -38
  101. package/src/templates/app/main.js +0 -39
  102. package/src/templates/app/middleware.js +0 -34
  103. package/src/templates/app/nest/backendLogic.js +0 -33
  104. package/src/templates/app/nest/index.js +0 -28
  105. package/src/templates/app/next/frontendLogic.js +0 -33
  106. package/src/templates/app/next/index.js +0 -28
  107. package/src/templates/app/page.test.ts.template +0 -10
  108. package/src/templates/app/playwright.config.ts.template +0 -6
  109. package/src/templates/app/postcss.config.js.template +0 -10
  110. package/src/templates/app/public/favicon.ico +0 -0
  111. package/src/templates/app/public/icons/icon-128x128.png +0 -0
  112. package/src/templates/app/public/icons/icon-144x144.png +0 -0
  113. package/src/templates/app/public/icons/icon-152x152.png +0 -0
  114. package/src/templates/app/public/icons/icon-192x192.png +0 -0
  115. package/src/templates/app/public/icons/icon-256x256.png +0 -0
  116. package/src/templates/app/public/icons/icon-384x384.png +0 -0
  117. package/src/templates/app/public/icons/icon-48x48.png +0 -0
  118. package/src/templates/app/public/icons/icon-512x512.png +0 -0
  119. package/src/templates/app/public/icons/icon-72x72.png +0 -0
  120. package/src/templates/app/public/icons/icon-96x96.png +0 -0
  121. package/src/templates/app/public/logo.svg +0 -70
  122. package/src/templates/app/public/manifest.json.template +0 -67
  123. package/src/templates/app/tsconfig.json.template +0 -22
  124. package/src/templates/app/tsconfig.spec.json.template +0 -7
  125. package/src/templates/app/ui/Footer.js +0 -63
  126. package/src/templates/app/ui/MainHeader.js +0 -127
  127. package/src/templates/app/ui/index.js +0 -29
  128. package/src/templates/client.js +0 -41
  129. package/src/templates/crudPages/[__model__Id]/edit/page.js +0 -69
  130. package/src/templates/crudPages/[__model__Id]/page.js +0 -79
  131. package/src/templates/crudPages/new/page.js +0 -66
  132. package/src/templates/crudPages/page.js +0 -67
  133. package/src/templates/index.js +0 -30
  134. package/src/templates/lib/__lib/extends/summary.constant.js +0 -42
  135. package/src/templates/lib/__lib/lib.constant.js +0 -52
  136. package/src/templates/lib/__lib/lib.dictionary.js +0 -41
  137. package/src/templates/lib/__lib/lib.document.js +0 -40
  138. package/src/templates/lib/__lib/lib.service.js +0 -82
  139. package/src/templates/lib/__lib/lib.signal.js +0 -35
  140. package/src/templates/lib/__lib/lib.store.js +0 -33
  141. package/src/templates/lib/__scalar/_server.js +0 -38
  142. package/src/templates/lib/cnst.js +0 -31
  143. package/src/templates/lib/cnst_.js +0 -50
  144. package/src/templates/lib/db.js +0 -52
  145. package/src/templates/lib/dict.js +0 -44
  146. package/src/templates/lib/fetch.js +0 -47
  147. package/src/templates/lib/sig.js +0 -36
  148. package/src/templates/lib/srv.js +0 -51
  149. package/src/templates/lib/st.js +0 -35
  150. package/src/templates/lib/store.js +0 -51
  151. package/src/templates/lib/usePage.js +0 -32
  152. package/src/templates/libRoot/.gitignore.template +0 -15
  153. package/src/templates/libRoot/jest.config.js +0 -35
  154. package/src/templates/libRoot/package.json.template +0 -5
  155. package/src/templates/libRoot/tsconfig.json.template +0 -11
  156. package/src/templates/libRoot/tsconfig.spec.json.template +0 -7
  157. package/src/templates/module/__Model__.Template.js +0 -50
  158. package/src/templates/module/__Model__.Unit.js +0 -38
  159. package/src/templates/module/__Model__.Util.js +0 -66
  160. package/src/templates/module/__Model__.View.js +0 -44
  161. package/src/templates/module/__Model__.Zone.js +0 -79
  162. package/src/templates/module/__model__.constant.js +0 -68
  163. package/src/templates/module/__model__.dictionary.js +0 -97
  164. package/src/templates/module/__model__.document.js +0 -52
  165. package/src/templates/module/__model__.service.js +0 -40
  166. package/src/templates/module/__model__.signal.js +0 -59
  167. package/src/templates/module/__model__.signal.spec.js +0 -38
  168. package/src/templates/module/__model__.signal.test.js +0 -47
  169. package/src/templates/module/__model__.store.js +0 -38
  170. package/src/templates/module/_server.js +0 -46
  171. package/src/templates/module/index.js +0 -57
  172. package/src/templates/pkgRoot/tsconfig.json.template +0 -12
  173. package/src/templates/server.js +0 -58
  174. package/src/templates/workplaceRoot/.env.template +0 -20
  175. package/src/templates/workplaceRoot/.gitignore.template +0 -195
  176. package/src/templates/workplaceRoot/.prettierignore.template +0 -10
  177. package/src/templates/workplaceRoot/.prettierrc.json.template +0 -5
  178. package/src/templates/workplaceRoot/.swcrc.template +0 -9
  179. package/src/templates/workplaceRoot/README.md.template +0 -37
  180. package/src/templates/workplaceRoot/eslint.config.js.template +0 -141
  181. package/src/templates/workplaceRoot/tsconfig.json.template +0 -29
@@ -1,42 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var summary_constant_exports = {};
19
- __export(summary_constant_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(summary_constant_exports);
23
- const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
24
- function getContent(scanResult, dict = {}) {
25
- if (!scanResult)
26
- return null;
27
- const databaseModulesExceptExtends = scanResult.files.constants.databases.filter(
28
- (module2) => !["summary", "user", "setting"].includes(module2)
29
- );
30
- const hasUser = scanResult.files.constants.databases.includes("user");
31
- const hasSummary = scanResult.files.constants.databases.includes("summary");
32
- const isRootUserLib = !scanResult.akanConfig.rootLib;
33
- if (!hasSummary)
34
- return null;
35
- return `
36
- ${databaseModulesExceptExtends.map((module2) => `import { ${capitalize(module2)}Summary } from "../../${module2}/${module2}.constant";`).join("\n")}
37
- ${hasUser ? `import { ${isRootUserLib ? "" : capitalize(scanResult.name)}UserSummary } from "../../user/user.constant";` : ""}
38
-
39
- export const modelSummaries = [${[...databaseModulesExceptExtends, ...hasUser ? [`${isRootUserLib ? "" : scanResult.name}User`] : []].map((module2) => `${capitalize(module2)}Summary`).join(", ")}] as const;
40
- `;
41
- }
42
- module.exports = module.exports.default;
@@ -1,52 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var lib_constant_exports = {};
19
- __export(lib_constant_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(lib_constant_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const libs = scanResult.akanConfig.libs;
27
- const userLibs = scanResult.akanConfig.libs.filter(
28
- (libName) => scanResult.libs[libName].files.constants.databases.includes("user")
29
- );
30
- const settingLibs = scanResult.akanConfig.libs.filter(
31
- (libName) => scanResult.libs[libName].files.constants.databases.includes("setting")
32
- );
33
- const summaryLibs = scanResult.akanConfig.libs.filter(
34
- (libName) => scanResult.libs[libName].files.constants.databases.includes("summary")
35
- );
36
- return `
37
- ${libs.map((lib) => `import { cnst as ${lib} } from "@${lib}";`).join("\n")}
38
-
39
- ${libs.map((lib) => `export { cnst as ${lib} } from "@${lib}";`).join("\n")}
40
-
41
- ${scanResult.akanConfig.rootLib ? `export const root = ${scanResult.akanConfig.rootLib};` : ""}
42
- export const libSummaries = [${summaryLibs.map((lib) => `${lib}.Summary`).join(", ")}] as const;
43
- export const libSettings = [${settingLibs.map((lib) => `${lib}.Setting`).join(", ")}] as const;
44
- export const libSettingInputs = [${settingLibs.map((lib) => `${lib}.SettingInput`).join(", ")}] as const;
45
- export const libUserInputs = [${userLibs.map((lib) => `${lib}.UserInput`).join(", ")}] as const;
46
- export const libUsers = [${userLibs.map((lib) => `${lib}.User`).join(", ")}] as const;
47
- export const libUserInsights = [${userLibs.map((lib) => `${lib}.UserInsight`).join(", ")}] as const;
48
- export const libUserSummaries = [${userLibs.map((lib) => `${lib}.UserSummary`).join(", ")}] as const;
49
- export const libUserFilters = [${userLibs.map((lib) => `${lib}.UserFilter`).join(", ")}] as const;
50
- `;
51
- }
52
- module.exports = module.exports.default;
@@ -1,41 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var lib_dictionary_exports = {};
19
- __export(lib_dictionary_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(lib_dictionary_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const libs = scanResult.akanConfig.libs;
27
- const moduleDictionaries = scanResult.files.constants.databases.filter(
28
- (module2) => module2 !== "summary" && module2 !== "setting"
29
- );
30
- return `
31
- ${libs.length === 0 ? `import { rootDictionary } from "@akanjs/dictionary";` : ""}
32
- ${libs.map((lib) => `import { dictionary as ${lib} } from "@${lib}";`).join("\n")}
33
-
34
- ${moduleDictionaries.map((module2) => `import { ${module2}SummaryDictionary } from "../${module2}/${module2}.dictionary";`).join("\n")}
35
-
36
- export const libDictionaries = [${libs.length === 0 ? "rootDictionary" : libs.join(", ")}] as const;
37
-
38
- export const libSummaryDictionary = { ${moduleDictionaries.map((module2) => `...${module2}SummaryDictionary`).join(", ")} };
39
- `;
40
- }
41
- module.exports = module.exports.default;
@@ -1,40 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var lib_document_exports = {};
19
- __export(lib_document_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(lib_document_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const libs = scanResult.akanConfig.libs;
27
- const rootLib = scanResult.akanConfig.rootLib;
28
- return `
29
- ${libs.map((lib) => `import { db as ${lib} } from "@${lib}/server";`).join("\n")}
30
-
31
- ${libs.map((lib) => `export { db as ${lib} } from "@${lib}/server";`).join("\n")}
32
-
33
- ${rootLib ? `export const root = ${rootLib};` : ""}
34
- ${rootLib ? `export const rootUser = ${rootLib}.userDb;` : ""}
35
- ${rootLib ? `export const rootSetting = ${rootLib}.settingDb;` : ""}
36
- ${rootLib ? `export const rootSummary = ${rootLib}.summaryDb;` : ""}
37
- export const libDbs = [${libs.join(", ")}] as const;
38
- `;
39
- }
40
- module.exports = module.exports.default;
@@ -1,82 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var lib_service_exports = {};
19
- __export(lib_service_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(lib_service_exports);
23
- const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
24
- function getContent(scanResult, dict = {}) {
25
- if (!scanResult)
26
- return null;
27
- const libs = scanResult.akanConfig.libs;
28
- const libsHasSummary = libs.filter((lib) => scanResult.libs[lib].files.constants.databases.includes("summary"));
29
- const databaseModules = scanResult.files.constants.databases;
30
- const databaseModulesWithoutExtendModels = databaseModules.filter(
31
- (module2) => !["summary", "setting", "user"].includes(module2)
32
- );
33
- const userLibs = scanResult.akanConfig.libs.filter(
34
- (libName) => scanResult.libs[libName].files.constants.databases.includes("user")
35
- );
36
- const settingLibs = scanResult.akanConfig.libs.filter(
37
- (libName) => scanResult.libs[libName].files.constants.databases.includes("setting")
38
- );
39
- const summaryLibs = scanResult.akanConfig.libs.filter(
40
- (libName) => scanResult.libs[libName].files.constants.databases.includes("summary")
41
- );
42
- return `
43
- ${libs.length ? libsHasSummary.length ? `import { ExtendedSummaryService, MixSrvs, Srv } from "@akanjs/service";` : `import { DbService, Srv } from "@akanjs/service";` : `import type { BackendEnv } from "@akanjs/base";`}
44
- ${libs.map((lib) => `import { option as ${lib}Option, srv as ${lib} } from "@${lib}/server";`).join("\n")}
45
-
46
- import * as db from "../db";
47
- import type * as srv from "../srv";
48
-
49
- ${libs.map((lib) => `export { srv as ${lib} } from "@${lib}/server";`).join("\n")}
50
-
51
- ${summaryLibs.length > 0 ? `export const LibSummaryService = MixSrvs(${summaryLibs.map((lib) => `${lib}.SummaryService`).join(", ")});` : ""}
52
- ${settingLibs.length > 0 ? `export const LibSettingService = MixSrvs(${settingLibs.map((lib) => `${lib}.SettingService`).join(", ")});` : ""}
53
- ${userLibs.length > 0 ? `export const LibUserService = MixSrvs(${userLibs.map((lib) => `${lib}.UserService`).join(", ")});` : ""}
54
-
55
- export const libAllSrvs = { ${libs.map((lib) => `...${lib}.allSrvs`).join(", ")} };
56
-
57
- export type LibOptions = ${libs.length ? libs.map((lib) => `${lib}Option.ModulesOptions`).join(" & ") : "BackendEnv"};
58
- ${libs.length ? `
59
- export class ProtoSummaryService extends ${libsHasSummary.length ? "ExtendedSummaryService(db.summaryDb, LibSummaryService)" : "DbService(db.summaryDb)"} {
60
- @Srv() protected readonly userService: srv.UserService;
61
- ${databaseModulesWithoutExtendModels.map((module2) => ` @Srv() protected readonly ${module2}Service: srv.${capitalize(module2)}Service;`).join("\n")}
62
-
63
- async get${capitalize(scanResult.name)}Summary() {
64
- return {
65
- ${databaseModulesWithoutExtendModels.map((module2) => ` ...(await this.${module2}Service.summarize()),`).join("\n")}
66
- ...(await this.userService.summarize${capitalize(scanResult.name)}()),
67
- };
68
- }
69
- ${scanResult.type === "app" ? `
70
- async makeSummary(archiveType: "periodic" | "non-periodic" = "non-periodic"): Promise<db.Summary> {
71
- const summary = {
72
- ${libsHasSummary.map((lib) => ` ...(await this.get${capitalize(lib)}Summary()),`).join("\n")}
73
- ...(await this.get${capitalize(scanResult.name)}Summary()),
74
- };
75
- return (await this.summaryModel.archive(archiveType, summary)) as unknown as db.Summary;
76
- }
77
- ` : ""}
78
- }
79
- ` : ""}
80
- `;
81
- }
82
- module.exports = module.exports.default;
@@ -1,35 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var lib_signal_exports = {};
19
- __export(lib_signal_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(lib_signal_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const libs = scanResult.akanConfig.libs;
27
- return `
28
- ${libs.length > 0 ? "" : `import { baseFetch } from "@akanjs/signal";`}
29
- ${libs.map((lib) => `import { fetch as ${lib} } from "@${lib}";`).join("\n")}
30
-
31
- export const root = ${libs.length ? scanResult.akanConfig.rootLib ?? libs[0] : "baseFetch"};
32
- export const libFetches = [${libs.length ? libs.join(", ") : "baseFetch"}] as const;
33
- `;
34
- }
35
- module.exports = module.exports.default;
@@ -1,33 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var lib_store_exports = {};
19
- __export(lib_store_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(lib_store_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const libs = scanResult.akanConfig.libs;
27
- return `
28
- ${libs.map((lib) => `import { store as ${lib} } from "@${lib}/client";`).join("\n")}
29
-
30
- export const libStores = [${libs.join(", ")}] as const;
31
- `;
32
- }
33
- module.exports = module.exports.default;
@@ -1,38 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var server_exports = {};
19
- __export(server_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(server_exports);
23
- const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
24
- function getContent(scanResult, dict = {}) {
25
- if (!scanResult)
26
- return null;
27
- const scalarModules = scanResult.files.constants.scalars;
28
- return `
29
- import { scalarModulesOf } from "@akanjs/server";
30
-
31
- import type { ModulesOptions } from "../option";
32
- import { allSrvs } from "../srv";
33
- ${scalarModules.map((module2) => `import { ${capitalize(module2)} } from "./${module2}/${module2}.constant";`).join("\n")}
34
-
35
- export const registerScalarModule = (option: ModulesOptions) => scalarModulesOf({ constants: [${scalarModules.map((module2) => capitalize(module2)).join(", ")}] }, allSrvs);
36
- `;
37
- }
38
- module.exports = module.exports.default;
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var cnst_exports = {};
19
- __export(cnst_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(cnst_exports);
23
- function getContent(scanResult, dict = {}) {
24
- return `
25
- import type { AllSrvs } from "./srv";
26
-
27
- export * as cnst from "./cnst_";
28
- export const Srvs = {} as AllSrvs;
29
- `;
30
- }
31
- module.exports = module.exports.default;
@@ -1,50 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var cnst_exports = {};
19
- __export(cnst_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(cnst_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const databaseModules = scanResult.files.constants.databases;
27
- const scalarModules = scanResult.files.constants.scalars;
28
- const rootLib = scanResult.akanConfig.rootLib;
29
- return `
30
- import { cnstOf } from "@akanjs/constant";
31
-
32
- ${rootLib ? `import { root } from "./__lib/lib.constant";` : ""}
33
- ${databaseModules.map((module2) => `import * as ${module2} from "./${module2}/${module2}.constant";`).join("\n")}
34
-
35
- export * from "./__lib/lib.constant";
36
- ${databaseModules.map((module2) => `export * from "./${module2}/${module2}.constant";`).join("\n")}
37
- ${scalarModules.map((module2) => `export * from "./__scalar/${module2}/${module2}.constant";`).join("\n")}
38
-
39
- ${databaseModules.map((module2) => {
40
- const names = {
41
- Module: module2.charAt(0).toUpperCase() + module2.slice(1)
42
- };
43
- if (module2 === "setting" || module2 === "summary")
44
- return `export const ${module2}Cnst = cnstOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.Light${names.Module}, ${rootLib ? "root" : module2}.${names.Module}Insight, ${rootLib ? "root" : module2}.${names.Module}Filter);`;
45
- else
46
- return `export const ${module2}Cnst = cnstOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.Light${names.Module}, ${module2}.${names.Module}Insight, ${module2}.${names.Module}Filter, ${module2}.${names.Module}Summary);`;
47
- }).join("\n")}
48
- `;
49
- }
50
- module.exports = module.exports.default;
@@ -1,52 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var db_exports = {};
19
- __export(db_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(db_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const databaseModules = scanResult.files.constants.databases;
27
- const scalarModules = scanResult.files.constants.scalars;
28
- const rootLib = scanResult.akanConfig.rootLib;
29
- return `
30
- import { dbOf } from "@akanjs/document";
31
-
32
- ${rootLib ? `import { root } from "./__lib/lib.constant";` : ""}
33
- import { cnst } from "./cnst";
34
-
35
- ${databaseModules.map((module2) => `import * as ${module2} from "./${module2}/${module2}.document";`).join("\n")}
36
-
37
- export type * from "./__lib/lib.document";
38
- ${databaseModules.map((module2) => `export type * from "./${module2}/${module2}.document";`).join("\n")}
39
- ${scalarModules.map((module2) => `export type * from "./__scalar/${module2}/${module2}.document";`).join("\n")}
40
-
41
- ${databaseModules.map((module2) => {
42
- const names = {
43
- Module: module2.charAt(0).toUpperCase() + module2.slice(1)
44
- };
45
- if (module2 === "setting" || module2 === "summary")
46
- return `export const ${module2}Db = dbOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.${names.Module}Model, ${module2}.${names.Module}Middleware, cnst.${names.Module}, cnst.${rootLib ? "root." : ""}${names.Module}Insight, cnst.${rootLib ? "root." : ""}${names.Module}Filter);`;
47
- else
48
- return `export const ${module2}Db = dbOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.${names.Module}Model, ${module2}.${names.Module}Middleware, cnst.${names.Module}, cnst.${names.Module}Insight, cnst.${names.Module}Filter, cnst.${names.Module}Summary);`;
49
- }).join("\n")}
50
- `;
51
- }
52
- module.exports = module.exports.default;
@@ -1,44 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var dict_exports = {};
19
- __export(dict_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(dict_exports);
23
- function getContent(scanResult, dict = {}) {
24
- if (!scanResult)
25
- return null;
26
- const databaseModules = scanResult.files.dictionary.databases;
27
- const scalarModules = scanResult.files.dictionary.scalars;
28
- const serviceModules = scanResult.files.dictionary.services;
29
- return `
30
- import { makeDictionary, makeTrans } from "@akanjs/dictionary";
31
-
32
- import { libDictionaries } from "./__lib/lib.dictionary";
33
- ${databaseModules.map((module2) => `import { ${module2}Dictionary } from "./${module2}/${module2}.dictionary";`).join("\n")}
34
- ${serviceModules.map((module2) => `import { ${module2}Dictionary } from "./_${module2}/${module2}.dictionary";`).join("\n")}
35
- ${scalarModules.map((module2) => `import { ${module2}Dictionary } from "./__scalar/${module2}/${module2}.dictionary";`).join("\n")}
36
-
37
- export const dictionary = makeDictionary(...libDictionaries, {
38
- ${[...databaseModules, ...scalarModules, ...serviceModules].map((module2) => `${module2}: ${module2}Dictionary`).join(",\n ")}
39
- } as const);
40
-
41
- export const { Revert, translate, msg } = makeTrans(dictionary);
42
- `;
43
- }
44
- module.exports = module.exports.default;
@@ -1,47 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var fetch_exports = {};
19
- __export(fetch_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(fetch_exports);
23
- const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
24
- function getContent(scanResult, dict = {}) {
25
- if (!scanResult)
26
- return null;
27
- const databaseModules = scanResult.files.signal.databases;
28
- const scalarConstantModules = scanResult.files.constants.scalars;
29
- const serviceModules = scanResult.files.signal.services;
30
- return `
31
- import { fetchOf, gqlOf, makeFetch, scalarUtilOf } from "@akanjs/signal";
32
-
33
- import { root, libFetches } from "./__lib/lib.signal";
34
- import { cnst } from "./cnst";
35
- import * as sig from "./sig";
36
-
37
- ${databaseModules.map((module2) => `${["user", "setting", "summary"].includes(module2) ? "export " : ""}const ${module2}Gql = gqlOf(cnst.${module2}Cnst, sig.${capitalize(module2)}Signal${scanResult.name !== "shared" && ["user", "setting", "summary"].includes(module2) ? `, { overwrite: root.${module2}Gql }` : ""});`).join("\n")}
38
-
39
- export const fetch = makeFetch(...libFetches, {
40
- ${databaseModules.map((module2) => `...${module2}Gql,`).join("\n")}
41
- ${scalarConstantModules.map((module2) => `...scalarUtilOf("${module2}" as const, cnst.${capitalize(module2)}),`).join("\n")}
42
- ${serviceModules.map((module2) => `...fetchOf(sig.${capitalize(module2)}Signal),`).join("\n")}
43
- ${databaseModules.map((module2) => `${module2}Gql,`).join("\n")}
44
- });
45
- `;
46
- }
47
- module.exports = module.exports.default;
@@ -1,36 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var sig_exports = {};
19
- __export(sig_exports, {
20
- default: () => getContent
21
- });
22
- module.exports = __toCommonJS(sig_exports);
23
- const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
24
- function getContent(scanResult, dict = {}) {
25
- if (!scanResult)
26
- return null;
27
- const databaseModules = scanResult.files.signal.databases;
28
- const scalarModules = scanResult.files.signal.scalars;
29
- const serviceModules = scanResult.files.signal.services;
30
- return `
31
- ${databaseModules.map((module2) => `export { ${capitalize(module2)}Signal } from "./${module2}/${module2}.signal";`).join("\n")}
32
- ${serviceModules.map((module2) => `export { ${capitalize(module2)}Signal } from "./_${module2}/${module2}.signal";`).join("\n")}
33
- ${scalarModules.map((module2) => `export { ${capitalize(module2)}Signal } from "./__scalar/${module2}/${module2}.signal";`).join("\n")}
34
- `;
35
- }
36
- module.exports = module.exports.default;