akanjs 2.0.0-rc.7 → 2.0.0

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 (87) hide show
  1. package/base/primitiveRegistry.ts +28 -2
  2. package/cli/application/application.command.ts +11 -3
  3. package/cli/application/application.runner.ts +17 -1
  4. package/cli/guidelines/databaseModule/databaseModule.instruction.md +1 -1
  5. package/cli/guidelines/modelConstant/modelConstant.instruction.md +5 -5
  6. package/cli/guidelines/modelDocument/modelDocument.instruction.md +34 -61
  7. package/cli/guidelines/modelService/modelService.instruction.md +1 -1
  8. package/cli/index.js +9321 -19222
  9. package/cli/library/library.runner.ts +14 -13
  10. package/cli/package/package.runner.ts +31 -6
  11. package/cli/package/package.script.ts +2 -2
  12. package/cli/templates/app/page/_index.tsx +200 -79
  13. package/cli/templates/app/page/_layout.tsx +0 -1
  14. package/cli/templates/app/public/favicon.ico.template +0 -0
  15. package/cli/templates/app/public/logo.png.template +0 -0
  16. package/cli/templates/module/__Model__.Zone.tsx +1 -1
  17. package/cli/templates/module/__model__.document.ts +1 -1
  18. package/cli/templates/workspaceRoot/.gitignore.template +1 -11
  19. package/cli/templates/workspaceRoot/biome.json.template +16 -0
  20. package/cli/templates/workspaceRoot/package.json.template +1 -5
  21. package/cli/workspace/workspace.command.ts +7 -9
  22. package/cli/workspace/workspace.runner.ts +3 -13
  23. package/cli/workspace/workspace.script.ts +24 -9
  24. package/client/csrTypes.ts +1 -1
  25. package/constant/fieldInfo.ts +1 -1
  26. package/constant/serialize.ts +7 -1
  27. package/devkit/capacitor.base.config.ts +1 -1
  28. package/devkit/capacitorApp.ts +5 -1
  29. package/devkit/commandDecorators/argMeta.ts +28 -14
  30. package/devkit/commandDecorators/command.ts +41 -15
  31. package/devkit/commandDecorators/commandBuilder.ts +78 -42
  32. package/devkit/commandDecorators/helpFormatter.ts +7 -4
  33. package/devkit/dependencyScanner.ts +121 -15
  34. package/devkit/executors.ts +35 -23
  35. package/devkit/frontendBuild/cssCompiler.ts +9 -3
  36. package/devkit/incrementalBuilder/incrementalBuilder.proc.ts +2 -1
  37. package/devkit/lint/no-deep-internal-import.grit +25 -0
  38. package/devkit/lint/no-import-external-library.grit +1 -0
  39. package/devkit/mobile/mobileTarget.ts +48 -8
  40. package/devkit/scanInfo.ts +4 -1
  41. package/devkit/src/capacitorApp.ts +277 -0
  42. package/devkit/transforms/barrelImportsPlugin.ts +6 -0
  43. package/fetch/client/fetchClient.ts +1 -0
  44. package/fetch/client/httpClient.ts +13 -1
  45. package/package.json +37 -31
  46. package/server/akanServer.ts +21 -7
  47. package/server/hmr/clientScript.ts +8 -5
  48. package/server/resolver/resolver.contract.fixture.ts +1 -1
  49. package/test/index.ts +14 -0
  50. package/test/signalTest.preload.ts +10 -0
  51. package/test/signalTestRuntime.ts +126 -0
  52. package/test/testServer.ts +130 -25
  53. package/ui/Constant/Doc.tsx +696 -0
  54. package/ui/Constant/Mermaid.tsx +149 -0
  55. package/ui/Constant/index.ts +6 -0
  56. package/ui/Constant/schemaDoc.ts +324 -0
  57. package/ui/Field.tsx +0 -1
  58. package/ui/Portal.tsx +2 -0
  59. package/ui/System/CSR.tsx +6 -5
  60. package/ui/System/SSR.tsx +1 -1
  61. package/ui/System/SelectLanguage.tsx +1 -1
  62. package/ui/index.ts +1 -0
  63. package/ui/styles.css +0 -1
  64. package/webkit/bootCsr.tsx +8 -5
  65. package/base/test-globals.d.ts +0 -4
  66. package/cli/templates/app/common/commonLogic.ts +0 -12
  67. package/cli/templates/app/common/index.ts +0 -10
  68. package/cli/templates/app/public/favicon.ico +0 -0
  69. package/cli/templates/app/public/icons/icon-128x128.png +0 -0
  70. package/cli/templates/app/public/icons/icon-144x144.png +0 -0
  71. package/cli/templates/app/public/icons/icon-152x152.png +0 -0
  72. package/cli/templates/app/public/icons/icon-192x192.png +0 -0
  73. package/cli/templates/app/public/icons/icon-256x256.png +0 -0
  74. package/cli/templates/app/public/icons/icon-384x384.png +0 -0
  75. package/cli/templates/app/public/icons/icon-48x48.png +0 -0
  76. package/cli/templates/app/public/icons/icon-512x512.png +0 -0
  77. package/cli/templates/app/public/icons/icon-72x72.png +0 -0
  78. package/cli/templates/app/public/icons/icon-96x96.png +0 -0
  79. package/cli/templates/app/public/logo.svg +0 -70
  80. package/cli/templates/app/public/manifest.json.template +0 -67
  81. package/cli/templates/app/srvkit/backendLogic.ts +0 -12
  82. package/cli/templates/app/srvkit/index.ts +0 -10
  83. package/cli/templates/app/ui/UiComponent.ts +0 -16
  84. package/cli/templates/app/ui/index.ts +0 -10
  85. package/cli/templates/app/webkit/frontendLogic.ts +0 -12
  86. package/cli/templates/app/webkit/index.ts +0 -10
  87. package/cli/templates/module/index.tsx +0 -44
@@ -1,70 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 24.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 1882 268" style="enable-background:new 0 0 1882 268;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#FFFFFF00;}
7
- .st1{fill:#ED9027;}
8
- .st2{fill:#67B5E6;}
9
- .st3{fill:#2A85AD;}
10
- .st4{fill:#EAB128;}
11
- .st5{fill:#377395;}
12
- .st6{fill:#3A6274;}
13
- .st7{fill:#4D4C4C;}
14
- .st8{fill:#010100;}
15
- </style>
16
- <title>Asset 1</title>
17
- <g>
18
- <rect class="st0" width="1882" height="268"/>
19
- <g>
20
- <g>
21
- <path class="st1" d="M313.2,116.6h-94.7l42.7-43.9l-42.7-43.9l0,0c23.9-0.1,47.1,8.4,65.2,24.1
22
- C302.3,68.9,313.1,92.1,313.2,116.6z"/>
23
- <path class="st2" d="M313.2,233.1h-39.1c-1.1-16.4-3.7-56.5-55.6-68.4C282.6,164.7,313.2,188.3,313.2,233.1z"/>
24
- <path class="st3" d="M274.1,233.1h-55.6c-10,0-20.1-1.5-29.7-4.4c19,5.2,38.7-5.9,44-25c4-14.7-1.7-30.4-14.3-39
25
- C270.4,176.5,273,216.7,274.1,233.1z"/>
26
- <polygon class="st4" points="218.5,28.7 261.2,72.7 218.5,116.6 "/>
27
- <path class="st5" d="M218.5,164.7c16.3,11.2,20.5,33.4,9.3,49.7c-8.6,12.6-24.3,18.3-39,14.3l-2.1-0.7c-0.2-0.1-0.4-0.1-0.7-0.2
28
- c-23.9-8-44.1-24.6-56.5-46.5c13.6,14.6,33.3,21.6,53,19l0.9-0.1c9.5-1.4,18.3-6.2,24.7-13.4
29
- C213.6,180.6,217.3,172.9,218.5,164.7z"/>
30
- <path class="st6" d="M218.5,164.7c-1.3,8.2-4.9,15.9-10.3,22.1c-6.4,7.2-15.2,11.9-24.7,13.4l-0.9,0.1c-19.7,2.6-39.5-4.5-53-19
31
- c-15.3-27-17.5-59.5-5.9-88.4c-7.9,35.2,14.2,70.2,49.4,78.1C188.5,174.5,204.7,172.3,218.5,164.7z"/>
32
- <path class="st7" d="M199.7,59.4c4.3,3.3,5.1,9.5,1.7,13.9c-3.3,4.3-9.5,5.1-13.9,1.7c-4.3-3.3-5.1-9.5-1.7-13.9c0,0,0,0,0-0.1
33
- C189.3,56.8,195.5,56.1,199.7,59.4z"/>
34
- <path class="st7" d="M218.5,164.7c-31.7,17.2-71.3,5.5-88.6-26.2c-7.6-13.9-9.8-30.1-6.3-45.5c15.2-38,51.5-63.3,92.5-64.2
35
- c-37.6,0.7-67.5,31.7-66.8,69.3c0.7,37.6,31.6,67.5,69.2,66.8V164.7z"/>
36
- </g>
37
- <path class="st8" d="M451,202.9h-16.9V64h38.6c5.3,0,10.6,0.2,15.9,1c4.6,0.7,9.2,1.7,13.5,3.1c7.5,2.4,14,7,18.8,13.3
38
- c4.3,6.5,6.8,14,6.5,21.9c0.2,6.5-1.2,12.8-4.1,18.6c-2.9,5.5-7,10.1-12.3,13.5c-6,3.9-12.5,6.5-19.5,8
39
- c-8.4,1.9-17.1,2.9-25.8,2.7c-4.6,0-9.4,0-14.5-0.5L451,202.9z M451,130.3c2.2,0,4.6,0.5,7.2,0.7h7c6.8,0,13.7-0.5,20.5-1.9
40
- c4.8-0.7,9.4-2.7,13.7-5.3c3.4-2.2,6.3-5.1,8-8.7c1.7-3.6,2.4-7.7,2.4-11.6c0.2-4.8-1.2-9.4-3.9-13.3c-2.9-3.6-6.8-6.5-11.1-8
41
- c-3.4-1.2-6.8-1.9-10.1-2.4c-4.6-0.5-8.9-0.7-13.5-0.7H451V130.3z"/>
42
- <path class="st8" d="M609,190.6c4.6,0,9.2-0.5,13.5-1.7c3.6-1,7.2-2.9,10.1-5.1s5.3-4.8,7.2-8s3.4-6.5,4.6-10.1
43
- c0.7-2.4,1.2-5.1,1.4-7.7c0-2.9,0.5-5.5,0.5-8V64h16.9v85.9c0,3.4,0,6.8-0.5,10.1c-0.2,3.4-1,6.5-1.7,9.9c-1.2,5.1-3.1,9.9-6,14.2
44
- c-2.7,4.3-6,8.2-10.1,11.3c-4.6,3.4-9.6,5.8-15.2,7.5c-6.8,1.9-13.7,2.9-21,2.7c-6.8,0-13.5-0.7-20-2.4c-5.3-1.4-10.4-3.9-14.7-7
45
- c-4.1-2.9-7.5-6.3-10.1-10.4c-2.7-4.1-4.6-8.4-6-13.3c-1-3.6-1.9-7.2-2.2-11.1c-0.5-3.9-0.7-7.7-0.7-11.6V64h16.9v86.1
46
- c0,3.1,0.2,6.5,0.7,9.6c0.5,3.1,1.2,6,2.2,8.9c2.2,6.5,6.5,12.1,12.1,15.9C593.3,188.9,601.3,190.9,609,190.6z"/>
47
- <path class="st8" d="M715.1,202.9h-16.9V64h82.7v15.2h-65.8v44.6h58.4V139h-58.4V202.9z"/>
48
- <path class="st8" d="M822.2,202.9h-16.9V64h83v15.2h-65.8v44.6h58.4V139h-58.4v63.9H822.2z"/>
49
- <path class="st8" d="M912.6,202.9V64h16.9v138.9H912.6z"/>
50
- <path class="st8" d="M1036.1,141.4c8.4,12.3,16.9,24.8,25.3,37.9h0.7c-1-13.5-1.4-27.3-1.4-41.2V64.2h17.1v138.7h-16.9l-54.5-77.4
51
- c-9.4-13.5-17.8-26-25.3-37.9h-0.7c1,12.5,1.4,27.5,1.4,44.4v70.9H965V64h16.9L1036.1,141.4z"/>
52
- <path class="st8" d="M1214.8,202.9h-16.9V64h38.6c5.3,0,10.6,0.2,15.9,1c4.6,0.7,9.2,1.7,13.5,3.1c7.5,2.4,14,7,18.8,13.3
53
- c4.3,6.5,6.8,14,6.5,21.9c0.2,6.5-1.2,12.8-4.1,18.6c-2.9,5.5-7,10.1-12.3,13.5c-6,3.9-12.5,6.5-19.5,8
54
- c-8.4,1.9-17.1,2.9-25.8,2.7c-4.6,0-9.4,0-14.5-0.5L1214.8,202.9z M1214.8,130.3c2.4,0,4.8,0.5,7.2,0.7h7c6.8,0,13.7-0.5,20.5-1.9
55
- c4.8-1,9.4-2.7,13.7-5.5c3.4-2.2,6.3-5.1,8-8.7s2.4-7.7,2.4-11.6c0.2-4.8-1.2-9.4-3.9-13.3c-2.9-3.6-6.8-6.5-11.1-8
56
- c-3.4-1.2-6.8-1.9-10.1-2.4c-4.6-0.5-8.9-0.7-13.5-0.7h-20v51.4H1214.8z"/>
57
- <path class="st8" d="M1336.1,64v123.7h67.8v15.2h-84.7V63.8h16.9V64z"/>
58
- <path class="st8" d="M1415.9,202.9L1472.6,64h14.7l56.4,138.9h-18.3l-16.6-42h-58.1l-16.6,42H1415.9z M1479.9,85.7
59
- c-6,17.4-12.1,33-17.8,47l-5.3,13h46.1l-5.3-13c-5.5-14.5-11.6-30.1-17.4-47H1479.9z"/>
60
- <path class="st8" d="M1630.1,76.5c-7.5,0-14.7,1.2-21.7,3.6c-6.5,2.4-12.5,6-17.6,10.9c-5.3,5.1-9.2,11.3-11.8,18.1
61
- c-3.1,8.2-4.6,16.6-4.3,25.3c-0.2,8.4,1.2,16.9,4.1,24.8c2.4,6.5,6.3,12.5,11.3,17.4s11.1,8.2,17.8,10.1
62
- c7.5,2.4,15.2,3.4,23.2,3.4c2.4,0,4.8,0,7.5-0.5c2.7-0.5,5.3-0.5,8-1c2.9-0.5,5.3-1,8-1.4c2.9-0.5,4.8-1.2,6.8-1.9v15
63
- c-4.6,1.7-9.4,2.9-14.2,3.6c-5.5,1-11.1,1.2-16.6,1.2c-10.4,0.2-20.7-1.4-30.6-4.8c-8.4-2.9-16.2-7.7-22.4-14
64
- c-6.3-6.3-10.9-13.7-13.7-21.9c-6.5-19.3-6.5-40,0-59.3c3.1-8.7,8-16.6,14.2-23.4c6.3-6.8,14-11.8,22.4-15.2
65
- c9.4-3.9,19.5-5.5,29.7-5.5c2.9,0,5.8,0,8.7,0s5.5,0.5,8,1c2.4,0.5,5.1,1,7.2,1.7c1.9,0.5,3.9,1.2,5.8,1.9v15
66
- c-4.6-1.4-9.2-2.7-13.7-3.6C1640.2,76.8,1635.2,76.3,1630.1,76.5z"/>
67
- <path class="st8" d="M1705.1,188h71.4v15.2h-88V64h84.4v15.2h-67.5v44.6h59.8V139h-59.8L1705.1,188z"/>
68
- </g>
69
- </g>
70
- </svg>
@@ -1,67 +0,0 @@
1
- {
2
- "name": "<%= AppName %>",
3
- "short_name": "<%= AppName %>",
4
- "orientation": "portrait",
5
- "theme_color": "#1976d2",
6
- "background_color": "#fafafa",
7
- "display": "standalone",
8
- "scope": "/",
9
- "description": "<%= appName %>",
10
- "start_url": "/",
11
- "icons": [
12
- {
13
- "src": "icons/icon-72x72.png",
14
- "sizes": "72x72",
15
- "type": "image/png",
16
- "purpose": "any"
17
- },
18
- {
19
- "src": "icons/icon-96x96.png",
20
- "sizes": "96x96",
21
- "type": "image/png",
22
- "purpose": "any"
23
- },
24
- {
25
- "src": "icons/icon-128x128.png",
26
- "sizes": "128x128",
27
- "type": "image/png",
28
- "purpose": "any"
29
- },
30
- {
31
- "src": "icons/icon-144x144.png",
32
- "sizes": "144x144",
33
- "type": "image/png",
34
- "purpose": "any"
35
- },
36
- {
37
- "src": "icons/icon-152x152.png",
38
- "sizes": "152x152",
39
- "type": "image/png",
40
- "purpose": "any"
41
- },
42
- {
43
- "src": "icons/icon-192x192.png",
44
- "sizes": "192x192",
45
- "type": "image/png",
46
- "purpose": "any"
47
- },
48
- {
49
- "src": "icons/icon-256x256.png",
50
- "sizes": "256x256",
51
- "type": "image/png",
52
- "purpose": "any"
53
- },
54
- {
55
- "src": "icons/icon-384x384.png",
56
- "sizes": "384x384",
57
- "type": "image/png",
58
- "purpose": "any"
59
- },
60
- {
61
- "src": "icons/icon-512x512.png",
62
- "sizes": "512x512",
63
- "type": "image/png",
64
- "purpose": "any"
65
- }
66
- ]
67
- }
@@ -1,12 +0,0 @@
1
- import type { AppInfo, LibInfo } from "akanjs/devkit";
2
-
3
- interface Dict {
4
- appName: string;
5
- }
6
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
7
- return `
8
-
9
- export const someBackendLogic = () => {
10
- };
11
- `;
12
- }
@@ -1,10 +0,0 @@
1
- import type { AppInfo, LibInfo } from "akanjs/devkit";
2
-
3
- interface Dict {
4
- [key: string]: string;
5
- }
6
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
7
- return `
8
- export * from "./backendLogic";
9
- `;
10
- }
@@ -1,16 +0,0 @@
1
- import type { AppInfo, LibInfo } from "akanjs/devkit";
2
-
3
- interface Dict {
4
- appName: string;
5
- }
6
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
7
- return {
8
- filename: "UiComponent.tsx",
9
- content: `
10
-
11
- export const UiComponent = () => {
12
- return <div>UiComponent</div>;
13
- };
14
- `,
15
- };
16
- }
@@ -1,10 +0,0 @@
1
- import type { AppInfo, LibInfo } from "akanjs/devkit";
2
-
3
- interface Dict {
4
- [key: string]: string;
5
- }
6
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
7
- return `
8
- export { UiComponent } from "./UiComponent";
9
- `;
10
- }
@@ -1,12 +0,0 @@
1
- import type { AppInfo, LibInfo } from "akanjs/devkit";
2
-
3
- interface Dict {
4
- appName: string;
5
- }
6
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
7
- return `
8
-
9
- export const someFrontendLogic = () => {
10
- };
11
- `;
12
- }
@@ -1,10 +0,0 @@
1
- import type { AppInfo, LibInfo } from "akanjs/devkit";
2
-
3
- interface Dict {
4
- [key: string]: string;
5
- }
6
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
7
- return `
8
- export * from "./frontendLogic";
9
- `;
10
- }
@@ -1,44 +0,0 @@
1
- import type { AppInfo, LibInfo } from "akanjs/devkit";
2
-
3
- interface Dict {
4
- Model: string;
5
- model: string;
6
- appName: string;
7
- }
8
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
- return {
10
- filename: "index.tsx",
11
- content: `
12
- import { Signal } from "akanjs/ui";
13
- import { AiOutlineDatabase } from "react-icons/ai";
14
-
15
- import * as Template from "./${dict.Model}.Template";
16
- import * as Unit from "./${dict.Model}.Unit";
17
- import * as Util from "./${dict.Model}.Util";
18
- import * as View from "./${dict.Model}.View";
19
- import * as Zone from "./${dict.Model}.Zone";
20
-
21
- export const ${dict.Model} = {
22
- Menu: {
23
- Admin: {
24
- key: "${dict.model}",
25
- label: "${dict.Model}",
26
- icon: <AiOutlineDatabase />,
27
- render: () => <Zone.Admin />,
28
- },
29
- Doc: {
30
- key: "${dict.model}",
31
- label: "${dict.Model}",
32
- icon: <AiOutlineDatabase />,
33
- render: () => <Signal.Doc.Zone refName="${dict.model}" />,
34
- },
35
- },
36
- Template,
37
- Unit,
38
- Util,
39
- View,
40
- Zone,
41
- };
42
- `,
43
- };
44
- }