@akanjs/cli 0.9.41 → 0.9.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +941 -538
- package/cjs/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -1
- package/cjs/src/guidelines/databaseModule/databaseModule.instruction.md +3 -50
- package/cjs/src/guidelines/modelService/modelService.generate.json +3 -40
- package/cjs/src/guidelines/modelService/modelService.instruction.md +0 -164
- package/cjs/src/guidelines/scalarModule/scalarModule.instruction.md +0 -3
- package/cjs/src/templates/__scalar/__model__/__model__.constant.js +1 -1
- package/cjs/src/templates/__scalar/__model__/__model__.dictionary.js +1 -1
- package/cjs/src/templates/__scalar/__model__/__model__.document.js +1 -1
- package/cjs/src/templates/app/akan.config.js +1 -1
- package/cjs/src/templates/app/app/[lang]/layout.js +1 -1
- package/cjs/src/templates/app/app/[lang]/page.js +1 -1
- package/cjs/src/templates/app/app/csr.js +1 -1
- package/cjs/src/templates/app/app/layout.js +1 -1
- package/cjs/src/templates/app/app/robots.js +1 -1
- package/cjs/src/templates/app/app/sitemap.js +1 -1
- package/cjs/src/templates/app/base/baseLogic.js +1 -1
- package/cjs/src/templates/app/base/index.js +1 -1
- package/cjs/src/templates/app/common/commonLogic.js +1 -1
- package/cjs/src/templates/app/common/index.js +1 -1
- package/cjs/src/templates/app/env/env.client.js +1 -1
- package/cjs/src/templates/app/env/env.client.type.js +1 -1
- package/cjs/src/templates/app/env/env.server.js +1 -1
- package/cjs/src/templates/app/jest.config.js +1 -1
- package/cjs/src/templates/app/lib/___appName__/__appName__.dictionary.js +7 -2
- package/cjs/src/templates/app/lib/___appName__/__appName__.service.js +2 -9
- package/cjs/src/templates/app/lib/___appName__/{_server.js → __appName__.signal.js} +9 -9
- package/cjs/src/templates/app/lib/___appName__/__appName__.store.js +1 -1
- package/cjs/src/templates/app/lib/option.js +1 -1
- package/cjs/src/templates/app/lib/setting/Setting.Template.js +6 -19
- package/cjs/src/templates/app/lib/setting/Setting.Unit.js +3 -3
- package/cjs/src/templates/app/lib/setting/Setting.Util.js +8 -2
- package/cjs/src/templates/app/lib/setting/Setting.View.js +4 -7
- package/cjs/src/templates/app/lib/setting/Setting.Zone.js +2 -8
- package/cjs/src/templates/app/lib/setting/setting.constant.js +1 -1
- package/cjs/src/templates/app/lib/setting/setting.dictionary.js +1 -1
- package/cjs/src/templates/app/lib/setting/setting.document.js +1 -1
- package/cjs/src/templates/app/lib/setting/setting.service.js +1 -1
- package/cjs/src/templates/app/lib/setting/setting.signal.js +1 -1
- package/cjs/src/templates/app/lib/setting/setting.store.js +1 -1
- package/cjs/src/templates/app/lib/summary/Summary.Template.js +5 -4
- package/cjs/src/templates/app/lib/summary/Summary.Unit.js +4 -5
- package/cjs/src/templates/app/lib/summary/Summary.Util.js +10 -3
- package/cjs/src/templates/app/lib/summary/Summary.View.js +5 -9
- package/cjs/src/templates/app/lib/summary/Summary.Zone.js +1 -23
- package/cjs/src/templates/app/lib/summary/summary.constant.js +1 -1
- package/cjs/src/templates/app/lib/summary/summary.dictionary.js +1 -1
- package/cjs/src/templates/app/lib/summary/summary.document.js +1 -1
- package/cjs/src/templates/app/lib/summary/summary.service.js +1 -1
- package/cjs/src/templates/app/lib/summary/summary.signal.js +1 -1
- package/cjs/src/templates/app/lib/summary/summary.store.js +1 -1
- package/cjs/src/templates/app/lib/user/User.Template.js +2 -3
- package/cjs/src/templates/app/lib/user/User.Unit.js +4 -5
- package/cjs/src/templates/app/lib/user/User.Util.js +6 -52
- package/cjs/src/templates/app/lib/user/User.View.js +2 -4
- package/cjs/src/templates/app/lib/user/User.Zone.js +8 -33
- package/cjs/src/templates/app/lib/user/user.constant.js +1 -1
- package/cjs/src/templates/app/lib/user/user.dictionary.js +1 -1
- package/cjs/src/templates/app/lib/user/user.document.js +2 -8
- package/cjs/src/templates/app/lib/user/user.service.js +3 -9
- package/cjs/src/templates/app/lib/user/user.signal.js +1 -1
- package/cjs/src/templates/app/lib/user/user.signal.spec.js +1 -1
- package/cjs/src/templates/app/lib/user/user.signal.test.js +1 -1
- package/cjs/src/templates/app/lib/user/user.store.js +1 -1
- package/cjs/src/templates/app/main.js +1 -1
- package/cjs/src/templates/app/middleware.js +1 -1
- package/cjs/src/templates/app/nest/backendLogic.js +1 -1
- package/cjs/src/templates/app/nest/index.js +1 -1
- package/cjs/src/templates/app/next/frontendLogic.js +1 -1
- package/cjs/src/templates/app/next/index.js +1 -1
- package/cjs/src/templates/app/ui/UiComponent.js +1 -1
- package/cjs/src/templates/app/ui/index.js +1 -1
- package/cjs/src/templates/client.js +11 -5
- package/cjs/src/templates/crudPages/[__model__Id]/edit/page.js +1 -1
- package/cjs/src/templates/crudPages/[__model__Id]/page.js +1 -1
- package/cjs/src/templates/crudPages/new/page.js +1 -1
- package/cjs/src/templates/crudPages/page.js +1 -1
- package/cjs/src/templates/crudSinglePage/page.js +1 -1
- package/cjs/src/templates/index.js +1 -1
- package/cjs/src/templates/lib/__lib/extends/summary.constant.js +7 -5
- package/cjs/src/templates/lib/__lib/lib.constant.js +7 -11
- package/cjs/src/templates/lib/__lib/lib.dictionary.js +4 -4
- package/cjs/src/templates/lib/__lib/lib.document.js +4 -4
- package/cjs/src/templates/lib/__lib/lib.service.js +19 -24
- package/cjs/src/templates/lib/__lib/lib.signal.js +5 -4
- package/cjs/src/templates/lib/__lib/lib.store.js +3 -3
- package/cjs/src/templates/lib/cnst.js +1 -1
- package/cjs/src/templates/lib/cnst_.js +10 -7
- package/cjs/src/templates/lib/db.js +5 -5
- package/cjs/src/templates/lib/dict.js +5 -5
- package/cjs/src/templates/lib/fetch.js +7 -7
- package/cjs/src/templates/lib/sig.js +4 -8
- package/cjs/src/templates/lib/srv.js +5 -8
- package/cjs/src/templates/lib/st.js +3 -3
- package/cjs/src/templates/lib/store.js +7 -10
- package/cjs/src/templates/lib/usePage.js +1 -1
- package/cjs/src/templates/libRoot/akan.config.js +1 -1
- package/cjs/src/templates/libRoot/base/baseLogic.js +1 -1
- package/cjs/src/templates/libRoot/base/index.js +1 -1
- package/cjs/src/templates/libRoot/common/commonLogic.js +1 -1
- package/cjs/src/templates/libRoot/common/index.js +1 -1
- package/cjs/src/templates/libRoot/jest.config.js +1 -1
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +1 -1
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.service.js +1 -1
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.store.js +1 -1
- package/cjs/src/templates/libRoot/lib/option.js +1 -1
- package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +6 -19
- package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +3 -3
- package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +8 -2
- package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +4 -7
- package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +2 -8
- package/cjs/src/templates/libRoot/lib/setting/setting.constant.js +1 -1
- package/cjs/src/templates/libRoot/lib/setting/setting.dictionary.js +1 -1
- package/cjs/src/templates/libRoot/lib/setting/setting.document.js +1 -1
- package/cjs/src/templates/libRoot/lib/setting/setting.service.js +1 -1
- package/cjs/src/templates/libRoot/lib/setting/setting.signal.js +1 -1
- package/cjs/src/templates/libRoot/lib/setting/setting.store.js +1 -1
- package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +5 -4
- package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +4 -5
- package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +10 -3
- package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +5 -9
- package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +1 -23
- package/cjs/src/templates/libRoot/lib/summary/summary.constant.js +1 -1
- package/cjs/src/templates/libRoot/lib/summary/summary.dictionary.js +1 -1
- package/cjs/src/templates/libRoot/lib/summary/summary.document.js +1 -1
- package/cjs/src/templates/libRoot/lib/summary/summary.service.js +1 -1
- package/cjs/src/templates/libRoot/lib/summary/summary.signal.js +1 -1
- package/cjs/src/templates/libRoot/lib/summary/summary.store.js +1 -1
- package/cjs/src/templates/libRoot/lib/user/User.Template.js +2 -3
- package/cjs/src/templates/libRoot/lib/user/User.Unit.js +4 -5
- package/cjs/src/templates/libRoot/lib/user/User.Util.js +6 -52
- package/cjs/src/templates/libRoot/lib/user/User.View.js +2 -4
- package/cjs/src/templates/libRoot/lib/user/User.Zone.js +8 -32
- package/cjs/src/templates/libRoot/lib/user/user.constant.js +1 -1
- package/cjs/src/templates/libRoot/lib/user/user.dictionary.js +1 -1
- package/cjs/src/templates/libRoot/lib/user/user.document.js +2 -8
- package/cjs/src/templates/libRoot/lib/user/user.service.js +3 -9
- package/cjs/src/templates/libRoot/lib/user/user.signal.js +1 -1
- package/cjs/src/templates/libRoot/lib/user/user.signal.spec.js +1 -1
- package/cjs/src/templates/libRoot/lib/user/user.signal.test.js +1 -1
- package/cjs/src/templates/libRoot/lib/user/user.store.js +1 -1
- package/cjs/src/templates/libRoot/nest/backendLogic.js +1 -1
- package/cjs/src/templates/libRoot/nest/index.js +1 -1
- package/cjs/src/templates/libRoot/next/frontendLogic.js +1 -1
- package/cjs/src/templates/libRoot/next/index.js +1 -1
- package/cjs/src/templates/libRoot/ui/index.js +1 -1
- package/cjs/src/templates/module/__Model__.Template.js +1 -1
- package/cjs/src/templates/module/__Model__.Unit.js +1 -1
- package/cjs/src/templates/module/__Model__.Util.js +7 -37
- package/cjs/src/templates/module/__Model__.View.js +1 -1
- package/cjs/src/templates/module/__Model__.Zone.js +3 -27
- package/cjs/src/templates/module/__model__.constant.js +1 -1
- package/cjs/src/templates/module/__model__.dictionary.js +1 -1
- package/cjs/src/templates/module/__model__.document.js +2 -8
- package/cjs/src/templates/module/__model__.service.js +2 -8
- package/cjs/src/templates/module/__model__.signal.js +1 -1
- package/cjs/src/templates/module/__model__.signal.spec.js +1 -1
- package/cjs/src/templates/module/__model__.signal.test.js +1 -1
- package/cjs/src/templates/module/__model__.store.js +1 -1
- package/cjs/src/templates/module/index.js +1 -1
- package/cjs/src/templates/{libRoot/lib/user → moduleRoot}/index.js +23 -35
- package/cjs/src/templates/server.js +31 -13
- package/cjs/src/templates/workspaceRoot/.gitignore.template +2 -2
- package/cjs/src/templates/workspaceRoot/.vscode/settings.json.template +0 -1
- package/esm/index.js +942 -539
- package/esm/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -1
- package/esm/src/guidelines/databaseModule/databaseModule.instruction.md +3 -50
- package/esm/src/guidelines/modelService/modelService.generate.json +3 -40
- package/esm/src/guidelines/modelService/modelService.instruction.md +0 -164
- package/esm/src/guidelines/scalarModule/scalarModule.instruction.md +0 -3
- package/esm/src/templates/__scalar/__model__/__model__.constant.js +1 -1
- package/esm/src/templates/__scalar/__model__/__model__.dictionary.js +1 -1
- package/esm/src/templates/__scalar/__model__/__model__.document.js +1 -1
- package/esm/src/templates/app/akan.config.js +1 -1
- package/esm/src/templates/app/app/[lang]/layout.js +1 -1
- package/esm/src/templates/app/app/[lang]/page.js +1 -1
- package/esm/src/templates/app/app/csr.js +1 -1
- package/esm/src/templates/app/app/layout.js +1 -1
- package/esm/src/templates/app/app/robots.js +1 -1
- package/esm/src/templates/app/app/sitemap.js +1 -1
- package/esm/src/templates/app/base/baseLogic.js +1 -1
- package/esm/src/templates/app/base/index.js +1 -1
- package/esm/src/templates/app/common/commonLogic.js +1 -1
- package/esm/src/templates/app/common/index.js +1 -1
- package/esm/src/templates/app/env/env.client.js +1 -1
- package/esm/src/templates/app/env/env.client.type.js +1 -1
- package/esm/src/templates/app/env/env.server.js +1 -1
- package/esm/src/templates/app/jest.config.js +1 -1
- package/esm/src/templates/app/lib/___appName__/__appName__.dictionary.js +7 -2
- package/esm/src/templates/app/lib/___appName__/__appName__.service.js +2 -9
- package/esm/src/templates/app/lib/___appName__/__appName__.signal.js +14 -0
- package/esm/src/templates/app/lib/___appName__/__appName__.store.js +1 -1
- package/esm/src/templates/app/lib/option.js +1 -1
- package/esm/src/templates/app/lib/setting/Setting.Template.js +6 -19
- package/esm/src/templates/app/lib/setting/Setting.Unit.js +3 -3
- package/esm/src/templates/app/lib/setting/Setting.Util.js +8 -2
- package/esm/src/templates/app/lib/setting/Setting.View.js +4 -7
- package/esm/src/templates/app/lib/setting/Setting.Zone.js +2 -8
- package/esm/src/templates/app/lib/setting/setting.constant.js +1 -1
- package/esm/src/templates/app/lib/setting/setting.dictionary.js +1 -1
- package/esm/src/templates/app/lib/setting/setting.document.js +1 -1
- package/esm/src/templates/app/lib/setting/setting.service.js +1 -1
- package/esm/src/templates/app/lib/setting/setting.signal.js +1 -1
- package/esm/src/templates/app/lib/setting/setting.store.js +1 -1
- package/esm/src/templates/app/lib/summary/Summary.Template.js +5 -4
- package/esm/src/templates/app/lib/summary/Summary.Unit.js +4 -5
- package/esm/src/templates/app/lib/summary/Summary.Util.js +10 -3
- package/esm/src/templates/app/lib/summary/Summary.View.js +5 -9
- package/esm/src/templates/app/lib/summary/Summary.Zone.js +1 -23
- package/esm/src/templates/app/lib/summary/summary.constant.js +1 -1
- package/esm/src/templates/app/lib/summary/summary.dictionary.js +1 -1
- package/esm/src/templates/app/lib/summary/summary.document.js +1 -1
- package/esm/src/templates/app/lib/summary/summary.service.js +1 -1
- package/esm/src/templates/app/lib/summary/summary.signal.js +1 -1
- package/esm/src/templates/app/lib/summary/summary.store.js +1 -1
- package/esm/src/templates/app/lib/user/User.Template.js +2 -3
- package/esm/src/templates/app/lib/user/User.Unit.js +4 -5
- package/esm/src/templates/app/lib/user/User.Util.js +6 -52
- package/esm/src/templates/app/lib/user/User.View.js +2 -4
- package/esm/src/templates/app/lib/user/User.Zone.js +8 -33
- package/esm/src/templates/app/lib/user/user.constant.js +1 -1
- package/esm/src/templates/app/lib/user/user.dictionary.js +1 -1
- package/esm/src/templates/app/lib/user/user.document.js +2 -8
- package/esm/src/templates/app/lib/user/user.service.js +3 -9
- package/esm/src/templates/app/lib/user/user.signal.js +1 -1
- package/esm/src/templates/app/lib/user/user.signal.spec.js +1 -1
- package/esm/src/templates/app/lib/user/user.signal.test.js +1 -1
- package/esm/src/templates/app/lib/user/user.store.js +1 -1
- package/esm/src/templates/app/main.js +1 -1
- package/esm/src/templates/app/middleware.js +1 -1
- package/esm/src/templates/app/nest/backendLogic.js +1 -1
- package/esm/src/templates/app/nest/index.js +1 -1
- package/esm/src/templates/app/next/frontendLogic.js +1 -1
- package/esm/src/templates/app/next/index.js +1 -1
- package/esm/src/templates/app/ui/UiComponent.js +1 -1
- package/esm/src/templates/app/ui/index.js +1 -1
- package/esm/src/templates/client.js +11 -5
- package/esm/src/templates/crudPages/[__model__Id]/edit/page.js +1 -1
- package/esm/src/templates/crudPages/[__model__Id]/page.js +1 -1
- package/esm/src/templates/crudPages/new/page.js +1 -1
- package/esm/src/templates/crudPages/page.js +1 -1
- package/esm/src/templates/crudSinglePage/page.js +1 -1
- package/esm/src/templates/index.js +1 -1
- package/esm/src/templates/lib/__lib/extends/summary.constant.js +7 -5
- package/esm/src/templates/lib/__lib/lib.constant.js +7 -11
- package/esm/src/templates/lib/__lib/lib.dictionary.js +4 -4
- package/esm/src/templates/lib/__lib/lib.document.js +4 -4
- package/esm/src/templates/lib/__lib/lib.service.js +19 -24
- package/esm/src/templates/lib/__lib/lib.signal.js +5 -4
- package/esm/src/templates/lib/__lib/lib.store.js +3 -3
- package/esm/src/templates/lib/cnst.js +1 -1
- package/esm/src/templates/lib/cnst_.js +10 -7
- package/esm/src/templates/lib/db.js +5 -5
- package/esm/src/templates/lib/dict.js +5 -5
- package/esm/src/templates/lib/fetch.js +7 -7
- package/esm/src/templates/lib/sig.js +4 -8
- package/esm/src/templates/lib/srv.js +5 -8
- package/esm/src/templates/lib/st.js +3 -3
- package/esm/src/templates/lib/store.js +7 -10
- package/esm/src/templates/lib/usePage.js +1 -1
- package/esm/src/templates/libRoot/akan.config.js +1 -1
- package/esm/src/templates/libRoot/base/baseLogic.js +1 -1
- package/esm/src/templates/libRoot/base/index.js +1 -1
- package/esm/src/templates/libRoot/common/commonLogic.js +1 -1
- package/esm/src/templates/libRoot/common/index.js +1 -1
- package/esm/src/templates/libRoot/jest.config.js +1 -1
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +1 -1
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.service.js +1 -1
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.store.js +1 -1
- package/esm/src/templates/libRoot/lib/option.js +1 -1
- package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +6 -19
- package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +3 -3
- package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +8 -2
- package/esm/src/templates/libRoot/lib/setting/Setting.View.js +4 -7
- package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +2 -8
- package/esm/src/templates/libRoot/lib/setting/setting.constant.js +1 -1
- package/esm/src/templates/libRoot/lib/setting/setting.dictionary.js +1 -1
- package/esm/src/templates/libRoot/lib/setting/setting.document.js +1 -1
- package/esm/src/templates/libRoot/lib/setting/setting.service.js +1 -1
- package/esm/src/templates/libRoot/lib/setting/setting.signal.js +1 -1
- package/esm/src/templates/libRoot/lib/setting/setting.store.js +1 -1
- package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +5 -4
- package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +4 -5
- package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +10 -3
- package/esm/src/templates/libRoot/lib/summary/Summary.View.js +5 -9
- package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +1 -23
- package/esm/src/templates/libRoot/lib/summary/summary.constant.js +1 -1
- package/esm/src/templates/libRoot/lib/summary/summary.dictionary.js +1 -1
- package/esm/src/templates/libRoot/lib/summary/summary.document.js +1 -1
- package/esm/src/templates/libRoot/lib/summary/summary.service.js +1 -1
- package/esm/src/templates/libRoot/lib/summary/summary.signal.js +1 -1
- package/esm/src/templates/libRoot/lib/summary/summary.store.js +1 -1
- package/esm/src/templates/libRoot/lib/user/User.Template.js +2 -3
- package/esm/src/templates/libRoot/lib/user/User.Unit.js +4 -5
- package/esm/src/templates/libRoot/lib/user/User.Util.js +6 -52
- package/esm/src/templates/libRoot/lib/user/User.View.js +2 -4
- package/esm/src/templates/libRoot/lib/user/User.Zone.js +8 -32
- package/esm/src/templates/libRoot/lib/user/user.constant.js +1 -1
- package/esm/src/templates/libRoot/lib/user/user.dictionary.js +1 -1
- package/esm/src/templates/libRoot/lib/user/user.document.js +2 -8
- package/esm/src/templates/libRoot/lib/user/user.service.js +3 -9
- package/esm/src/templates/libRoot/lib/user/user.signal.js +1 -1
- package/esm/src/templates/libRoot/lib/user/user.signal.spec.js +1 -1
- package/esm/src/templates/libRoot/lib/user/user.signal.test.js +1 -1
- package/esm/src/templates/libRoot/lib/user/user.store.js +1 -1
- package/esm/src/templates/libRoot/nest/backendLogic.js +1 -1
- package/esm/src/templates/libRoot/nest/index.js +1 -1
- package/esm/src/templates/libRoot/next/frontendLogic.js +1 -1
- package/esm/src/templates/libRoot/next/index.js +1 -1
- package/esm/src/templates/libRoot/ui/index.js +1 -1
- package/esm/src/templates/module/__Model__.Template.js +1 -1
- package/esm/src/templates/module/__Model__.Unit.js +1 -1
- package/esm/src/templates/module/__Model__.Util.js +7 -37
- package/esm/src/templates/module/__Model__.View.js +1 -1
- package/esm/src/templates/module/__Model__.Zone.js +3 -27
- package/esm/src/templates/module/__model__.constant.js +1 -1
- package/esm/src/templates/module/__model__.dictionary.js +1 -1
- package/esm/src/templates/module/__model__.document.js +2 -8
- package/esm/src/templates/module/__model__.service.js +2 -8
- package/esm/src/templates/module/__model__.signal.js +1 -1
- package/esm/src/templates/module/__model__.signal.spec.js +1 -1
- package/esm/src/templates/module/__model__.signal.test.js +1 -1
- package/esm/src/templates/module/__model__.store.js +1 -1
- package/esm/src/templates/module/index.js +1 -1
- package/esm/src/templates/moduleRoot/index.js +29 -0
- package/esm/src/templates/server.js +31 -13
- package/esm/src/templates/workspaceRoot/.gitignore.template +2 -2
- package/esm/src/templates/workspaceRoot/.vscode/settings.json.template +0 -1
- package/package.json +1 -1
- package/src/application/application.runner.d.ts +2 -3
- package/src/application/application.script.d.ts +1 -1
- package/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -1
- package/src/guidelines/databaseModule/databaseModule.instruction.md +3 -50
- package/src/guidelines/modelService/modelService.instruction.md +0 -164
- package/src/guidelines/scalarModule/scalarModule.instruction.md +0 -3
- package/src/library/library.script.d.ts +1 -1
- package/src/package/package.runner.d.ts +1 -1
- package/src/package/package.script.d.ts +1 -1
- package/src/templates/__scalar/__model__/__model__.constant.d.ts +2 -2
- package/src/templates/__scalar/__model__/__model__.dictionary.d.ts +2 -2
- package/src/templates/__scalar/__model__/__model__.document.d.ts +2 -2
- package/src/templates/app/akan.config.d.ts +2 -2
- package/src/templates/app/app/[lang]/layout.d.ts +2 -2
- package/src/templates/app/app/[lang]/page.d.ts +2 -2
- package/src/templates/app/app/csr.d.ts +2 -2
- package/src/templates/app/app/layout.d.ts +2 -2
- package/src/templates/app/app/robots.d.ts +2 -2
- package/src/templates/app/app/sitemap.d.ts +2 -2
- package/src/templates/app/base/baseLogic.d.ts +2 -2
- package/src/templates/app/base/index.d.ts +2 -2
- package/src/templates/app/common/commonLogic.d.ts +2 -2
- package/src/templates/app/common/index.d.ts +2 -2
- package/src/templates/app/env/env.client.d.ts +2 -2
- package/src/templates/app/env/env.client.type.d.ts +2 -2
- package/src/templates/app/env/env.server.d.ts +2 -2
- package/src/templates/app/jest.config.d.ts +2 -2
- package/src/templates/app/lib/___appName__/__appName__.dictionary.d.ts +2 -2
- package/src/templates/app/lib/___appName__/__appName__.service.d.ts +2 -2
- package/src/templates/app/lib/___appName__/__appName__.signal.d.ts +7 -0
- package/src/templates/app/lib/___appName__/__appName__.store.d.ts +2 -2
- package/src/templates/app/lib/option.d.ts +2 -2
- package/src/templates/app/lib/setting/Setting.Template.d.ts +2 -2
- package/src/templates/app/lib/setting/Setting.Unit.d.ts +2 -2
- package/src/templates/app/lib/setting/Setting.Util.d.ts +2 -2
- package/src/templates/app/lib/setting/Setting.View.d.ts +2 -2
- package/src/templates/app/lib/setting/Setting.Zone.d.ts +2 -2
- package/src/templates/app/lib/setting/setting.constant.d.ts +2 -2
- package/src/templates/app/lib/setting/setting.dictionary.d.ts +2 -2
- package/src/templates/app/lib/setting/setting.document.d.ts +2 -2
- package/src/templates/app/lib/setting/setting.service.d.ts +2 -2
- package/src/templates/app/lib/setting/setting.signal.d.ts +2 -2
- package/src/templates/app/lib/setting/setting.store.d.ts +2 -2
- package/src/templates/app/lib/summary/Summary.Template.d.ts +2 -2
- package/src/templates/app/lib/summary/Summary.Unit.d.ts +2 -2
- package/src/templates/app/lib/summary/Summary.Util.d.ts +2 -2
- package/src/templates/app/lib/summary/Summary.View.d.ts +2 -2
- package/src/templates/app/lib/summary/Summary.Zone.d.ts +2 -2
- package/src/templates/app/lib/summary/summary.constant.d.ts +2 -2
- package/src/templates/app/lib/summary/summary.dictionary.d.ts +2 -2
- package/src/templates/app/lib/summary/summary.document.d.ts +2 -2
- package/src/templates/app/lib/summary/summary.service.d.ts +2 -2
- package/src/templates/app/lib/summary/summary.signal.d.ts +2 -2
- package/src/templates/app/lib/summary/summary.store.d.ts +2 -2
- package/src/templates/app/lib/user/User.Template.d.ts +2 -2
- package/src/templates/app/lib/user/User.Unit.d.ts +2 -2
- package/src/templates/app/lib/user/User.Util.d.ts +2 -2
- package/src/templates/app/lib/user/User.View.d.ts +2 -2
- package/src/templates/app/lib/user/User.Zone.d.ts +2 -2
- package/src/templates/app/lib/user/user.constant.d.ts +2 -2
- package/src/templates/app/lib/user/user.dictionary.d.ts +2 -2
- package/src/templates/app/lib/user/user.document.d.ts +2 -2
- package/src/templates/app/lib/user/user.service.d.ts +2 -2
- package/src/templates/app/lib/user/user.signal.d.ts +2 -2
- package/src/templates/app/lib/user/user.signal.spec.d.ts +2 -2
- package/src/templates/app/lib/user/user.signal.test.d.ts +2 -2
- package/src/templates/app/lib/user/user.store.d.ts +2 -2
- package/src/templates/app/main.d.ts +2 -2
- package/src/templates/app/middleware.d.ts +2 -2
- package/src/templates/app/nest/backendLogic.d.ts +2 -2
- package/src/templates/app/nest/index.d.ts +2 -2
- package/src/templates/app/next/frontendLogic.d.ts +2 -2
- package/src/templates/app/next/index.d.ts +2 -2
- package/src/templates/app/ui/UiComponent.d.ts +2 -2
- package/src/templates/app/ui/index.d.ts +2 -2
- package/src/templates/client.d.ts +2 -2
- package/src/templates/crudPages/[__model__Id]/edit/page.d.ts +2 -2
- package/src/templates/crudPages/[__model__Id]/page.d.ts +2 -2
- package/src/templates/crudPages/new/page.d.ts +2 -2
- package/src/templates/crudPages/page.d.ts +2 -2
- package/src/templates/crudSinglePage/page.d.ts +2 -2
- package/src/templates/index.d.ts +2 -2
- package/src/templates/lib/__lib/extends/summary.constant.d.ts +2 -2
- package/src/templates/lib/__lib/lib.constant.d.ts +2 -2
- package/src/templates/lib/__lib/lib.dictionary.d.ts +2 -2
- package/src/templates/lib/__lib/lib.document.d.ts +2 -2
- package/src/templates/lib/__lib/lib.service.d.ts +2 -2
- package/src/templates/lib/__lib/lib.signal.d.ts +2 -2
- package/src/templates/lib/__lib/lib.store.d.ts +2 -2
- package/src/templates/lib/cnst.d.ts +2 -2
- package/src/templates/lib/cnst_.d.ts +2 -2
- package/src/templates/lib/db.d.ts +2 -2
- package/src/templates/lib/dict.d.ts +2 -2
- package/src/templates/lib/fetch.d.ts +2 -2
- package/src/templates/lib/sig.d.ts +2 -2
- package/src/templates/lib/srv.d.ts +2 -2
- package/src/templates/lib/st.d.ts +2 -2
- package/src/templates/lib/store.d.ts +2 -2
- package/src/templates/lib/usePage.d.ts +2 -2
- package/src/templates/libRoot/akan.config.d.ts +1 -1
- package/src/templates/libRoot/base/baseLogic.d.ts +1 -1
- package/src/templates/libRoot/base/index.d.ts +1 -1
- package/src/templates/libRoot/common/commonLogic.d.ts +1 -1
- package/src/templates/libRoot/common/index.d.ts +1 -1
- package/src/templates/libRoot/jest.config.d.ts +2 -2
- package/src/templates/libRoot/lib/___libName__/__libName__.dictionary.d.ts +1 -1
- package/src/templates/libRoot/lib/___libName__/__libName__.service.d.ts +1 -1
- package/src/templates/libRoot/lib/___libName__/__libName__.store.d.ts +1 -1
- package/src/templates/libRoot/lib/option.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/Setting.View.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/setting.constant.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/setting.dictionary.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/setting.document.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/setting.service.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/setting.signal.d.ts +2 -2
- package/src/templates/libRoot/lib/setting/setting.store.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/Summary.View.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/summary.constant.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/summary.dictionary.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/summary.document.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/summary.service.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/summary.signal.d.ts +2 -2
- package/src/templates/libRoot/lib/summary/summary.store.d.ts +2 -2
- package/src/templates/libRoot/lib/user/User.Template.d.ts +2 -2
- package/src/templates/libRoot/lib/user/User.Unit.d.ts +2 -2
- package/src/templates/libRoot/lib/user/User.Util.d.ts +2 -2
- package/src/templates/libRoot/lib/user/User.View.d.ts +2 -2
- package/src/templates/libRoot/lib/user/User.Zone.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.constant.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.dictionary.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.document.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.service.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.signal.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.signal.spec.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.signal.test.d.ts +2 -2
- package/src/templates/libRoot/lib/user/user.store.d.ts +2 -2
- package/src/templates/libRoot/nest/backendLogic.d.ts +1 -1
- package/src/templates/libRoot/nest/index.d.ts +1 -1
- package/src/templates/libRoot/next/frontendLogic.d.ts +1 -1
- package/src/templates/libRoot/next/index.d.ts +1 -1
- package/src/templates/libRoot/ui/index.d.ts +1 -1
- package/src/templates/module/__Model__.Template.d.ts +2 -2
- package/src/templates/module/__Model__.Unit.d.ts +2 -2
- package/src/templates/module/__Model__.Util.d.ts +2 -2
- package/src/templates/module/__Model__.View.d.ts +2 -2
- package/src/templates/module/__Model__.Zone.d.ts +2 -2
- package/src/templates/module/__model__.constant.d.ts +2 -2
- package/src/templates/module/__model__.dictionary.d.ts +2 -2
- package/src/templates/module/__model__.document.d.ts +2 -2
- package/src/templates/module/__model__.service.d.ts +2 -2
- package/src/templates/module/__model__.signal.d.ts +2 -2
- package/src/templates/module/__model__.signal.spec.d.ts +2 -2
- package/src/templates/module/__model__.signal.test.d.ts +2 -2
- package/src/templates/module/__model__.store.d.ts +2 -2
- package/src/templates/module/index.d.ts +2 -2
- package/src/templates/moduleRoot/index.d.ts +11 -0
- package/src/templates/server.d.ts +2 -2
- package/ui/MultiScrollList.d.ts +4 -1
- package/cjs/src/templates/app/app/[lang]/admin/page.js +0 -63
- package/cjs/src/templates/app/app/[lang]/unknown/page.js +0 -51
- package/cjs/src/templates/app/lib/setting/_server.js +0 -48
- package/cjs/src/templates/app/lib/setting/index.js +0 -61
- package/cjs/src/templates/app/lib/summary/_server.js +0 -48
- package/cjs/src/templates/app/lib/summary/index.js +0 -67
- package/cjs/src/templates/app/lib/user/_server.js +0 -48
- package/cjs/src/templates/app/lib/user/index.js +0 -61
- package/cjs/src/templates/lib/__scalar/_server.js +0 -39
- package/cjs/src/templates/libRoot/lib/___libName__/_server.js +0 -34
- package/cjs/src/templates/libRoot/lib/setting/_server.js +0 -48
- package/cjs/src/templates/libRoot/lib/setting/index.js +0 -61
- package/cjs/src/templates/libRoot/lib/summary/_server.js +0 -48
- package/cjs/src/templates/libRoot/lib/summary/index.js +0 -67
- package/cjs/src/templates/libRoot/lib/user/_server.js +0 -48
- package/cjs/src/templates/module/_server.js +0 -47
- package/esm/src/templates/app/app/[lang]/admin/page.js +0 -43
- package/esm/src/templates/app/app/[lang]/unknown/page.js +0 -31
- package/esm/src/templates/app/lib/___appName__/_server.js +0 -14
- package/esm/src/templates/app/lib/setting/_server.js +0 -28
- package/esm/src/templates/app/lib/setting/index.js +0 -41
- package/esm/src/templates/app/lib/summary/_server.js +0 -28
- package/esm/src/templates/app/lib/summary/index.js +0 -47
- package/esm/src/templates/app/lib/user/_server.js +0 -28
- package/esm/src/templates/app/lib/user/index.js +0 -41
- package/esm/src/templates/lib/__scalar/_server.js +0 -19
- package/esm/src/templates/libRoot/lib/___libName__/_server.js +0 -14
- package/esm/src/templates/libRoot/lib/setting/_server.js +0 -28
- package/esm/src/templates/libRoot/lib/setting/index.js +0 -41
- package/esm/src/templates/libRoot/lib/summary/_server.js +0 -28
- package/esm/src/templates/libRoot/lib/summary/index.js +0 -47
- package/esm/src/templates/libRoot/lib/user/_server.js +0 -28
- package/esm/src/templates/libRoot/lib/user/index.js +0 -41
- package/esm/src/templates/module/_server.js +0 -27
- package/src/templates/app/app/[lang]/admin/page.d.ts +0 -9
- package/src/templates/app/app/[lang]/unknown/page.d.ts +0 -9
- package/src/templates/app/lib/___appName__/_server.d.ts +0 -7
- package/src/templates/app/lib/setting/_server.d.ts +0 -6
- package/src/templates/app/lib/setting/index.d.ts +0 -9
- package/src/templates/app/lib/summary/_server.d.ts +0 -6
- package/src/templates/app/lib/summary/index.d.ts +0 -9
- package/src/templates/app/lib/user/_server.d.ts +0 -6
- package/src/templates/app/lib/user/index.d.ts +0 -9
- package/src/templates/lib/__scalar/_server.d.ts +0 -4
- package/src/templates/libRoot/lib/___libName__/_server.d.ts +0 -7
- package/src/templates/libRoot/lib/setting/_server.d.ts +0 -6
- package/src/templates/libRoot/lib/setting/index.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/_server.d.ts +0 -6
- package/src/templates/libRoot/lib/summary/index.d.ts +0 -9
- package/src/templates/libRoot/lib/user/_server.d.ts +0 -6
- package/src/templates/libRoot/lib/user/index.d.ts +0 -9
- package/src/templates/module/_server.d.ts +0 -8
|
@@ -136,97 +136,6 @@ Injects a websocket server instance for real-time communication:
|
|
|
136
136
|
protected readonly websocket: Websocket<ChatSignal>;
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
## Lifecycle Methods
|
|
140
|
-
|
|
141
|
-
Akan.js services can implement lifecycle hooks that are called by the NestJS framework.
|
|
142
|
-
|
|
143
|
-
### onModuleInit()
|
|
144
|
-
|
|
145
|
-
Called once the module has been initialized by NestJS. Use this for setup operations:
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
async onModuleInit() {
|
|
149
|
-
// Initialize service resources
|
|
150
|
-
await this.loadInitialData();
|
|
151
|
-
this.setupEventListeners();
|
|
152
|
-
this.logger.log('Service initialized successfully');
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Common use cases:
|
|
157
|
-
|
|
158
|
-
- Initializing in-memory cache
|
|
159
|
-
- Setting up event listeners
|
|
160
|
-
- Loading configuration data
|
|
161
|
-
- Establishing connections to external services
|
|
162
|
-
|
|
163
|
-
### onModuleDestroy()
|
|
164
|
-
|
|
165
|
-
Called just before the application shuts down. Use this for cleanup operations:
|
|
166
|
-
|
|
167
|
-
```typescript
|
|
168
|
-
async onModuleDestroy() {
|
|
169
|
-
// Clean up resources
|
|
170
|
-
await Promise.all(this.connections.map(conn => conn.close()));
|
|
171
|
-
this.clearTimers();
|
|
172
|
-
this.logger.log('Service resources released');
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Common use cases:
|
|
177
|
-
|
|
178
|
-
- Closing database connections
|
|
179
|
-
- Releasing external resources
|
|
180
|
-
- Clearing timers and intervals
|
|
181
|
-
- Unregistering event listeners
|
|
182
|
-
|
|
183
|
-
## Scheduled Tasks
|
|
184
|
-
|
|
185
|
-
Akan.js provides decorators for scheduling recurring tasks.
|
|
186
|
-
|
|
187
|
-
### @Cron Decorator
|
|
188
|
-
|
|
189
|
-
Executes methods on a cron schedule:
|
|
190
|
-
|
|
191
|
-
```typescript
|
|
192
|
-
@Cron("0 0 * * *") // Run at midnight every day
|
|
193
|
-
async dailyCleanup() {
|
|
194
|
-
await this.cleanupExpiredRecords();
|
|
195
|
-
this.logger.log('Daily cleanup completed');
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@Cron("*/5 * * * *", { serverMode: "batch" }) // Run every 5 minutes, only in batch mode
|
|
199
|
-
async periodicSync() {
|
|
200
|
-
await this.syncExternalData();
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
The first parameter uses standard cron syntax:
|
|
205
|
-
|
|
206
|
-
- `* * * * *` = minute hour day-of-month month day-of-week
|
|
207
|
-
- Special patterns like `@daily`, `@hourly` are also supported
|
|
208
|
-
|
|
209
|
-
Options include:
|
|
210
|
-
|
|
211
|
-
- `serverMode`: Restrict to a specific server mode (e.g., "batch")
|
|
212
|
-
- `name`: Assign a name to the scheduled job
|
|
213
|
-
- `timeZone`: Specify the timezone for the schedule
|
|
214
|
-
|
|
215
|
-
### @Interval Decorator
|
|
216
|
-
|
|
217
|
-
Executes methods at fixed time intervals in milliseconds:
|
|
218
|
-
|
|
219
|
-
```typescript
|
|
220
|
-
@Interval(60000) // Run every minute (60,000 ms)
|
|
221
|
-
async checkStatus() {
|
|
222
|
-
await this.monitorSystemHealth();
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Options:
|
|
227
|
-
|
|
228
|
-
- `name`: Assign a name to the interval
|
|
229
|
-
|
|
230
139
|
## Database Operations
|
|
231
140
|
|
|
232
141
|
When extending `DbService`, your service automatically inherits numerous methods for working with the database model.
|
|
@@ -606,34 +515,6 @@ class PaymentService extends DbService(db.paymentDb) {
|
|
|
606
515
|
}
|
|
607
516
|
```
|
|
608
517
|
|
|
609
|
-
### 3. Proper Resource Management
|
|
610
|
-
|
|
611
|
-
Clean up resources in lifecycle hooks:
|
|
612
|
-
|
|
613
|
-
```typescript
|
|
614
|
-
@Service("ExternalApiService")
|
|
615
|
-
class ExternalApiService extends LogService("ExternalApiService") {
|
|
616
|
-
private client: ApiClient;
|
|
617
|
-
private timers: NodeJS.Timeout[] = [];
|
|
618
|
-
|
|
619
|
-
async onModuleInit() {
|
|
620
|
-
this.client = new ApiClient();
|
|
621
|
-
await this.client.connect();
|
|
622
|
-
|
|
623
|
-
this.timers.push(setInterval(() => this.refreshToken(), 3600000));
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
async onModuleDestroy() {
|
|
627
|
-
// Clean up resources
|
|
628
|
-
await this.client.disconnect();
|
|
629
|
-
|
|
630
|
-
for (const timer of this.timers) {
|
|
631
|
-
clearInterval(timer);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
```
|
|
636
|
-
|
|
637
518
|
### 4. Transaction Safety
|
|
638
519
|
|
|
639
520
|
Use hooks for validating operations:
|
|
@@ -818,25 +699,6 @@ export class OrderService extends DbService(db.orderDb) {
|
|
|
818
699
|
|
|
819
700
|
return data;
|
|
820
701
|
}
|
|
821
|
-
|
|
822
|
-
// Scheduled task
|
|
823
|
-
@Cron("0 0 * * *", { serverMode: "batch" })
|
|
824
|
-
async cleanupAbandonedOrders() {
|
|
825
|
-
const cutoffDate = dayjs().subtract(7, "days");
|
|
826
|
-
const orders = await this.listPendingOrders(cutoffDate);
|
|
827
|
-
|
|
828
|
-
for (const order of orders) {
|
|
829
|
-
await this.cancelOrder(order.id);
|
|
830
|
-
this.logger.log(`Cancelled abandoned order: ${order.id}`);
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
// Summary method
|
|
835
|
-
async summarize(): Promise<cnst.OrderSummary> {
|
|
836
|
-
return {
|
|
837
|
-
...(await this.orderModel.getSummary()),
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
702
|
}
|
|
841
703
|
```
|
|
842
704
|
|
|
@@ -894,32 +756,6 @@ If a service isn't being injected correctly:
|
|
|
894
756
|
}
|
|
895
757
|
```
|
|
896
758
|
|
|
897
|
-
### Scheduled Tasks Not Running
|
|
898
|
-
|
|
899
|
-
1. Verify cron syntax:
|
|
900
|
-
|
|
901
|
-
```typescript
|
|
902
|
-
// Correct syntax
|
|
903
|
-
@Cron("0 * * * *") // Every hour at minute 0
|
|
904
|
-
|
|
905
|
-
// Incorrect syntax
|
|
906
|
-
@Cron("0 * * *") // Missing day-of-week field
|
|
907
|
-
```
|
|
908
|
-
|
|
909
|
-
2. Check server mode restrictions:
|
|
910
|
-
|
|
911
|
-
```typescript
|
|
912
|
-
// Only runs in batch mode
|
|
913
|
-
@Cron("0 * * * *", { serverMode: "batch" })
|
|
914
|
-
```
|
|
915
|
-
|
|
916
|
-
3. Ensure the service is properly initialized:
|
|
917
|
-
```typescript
|
|
918
|
-
onModuleInit() {
|
|
919
|
-
this.logger.log('Service initialized'); // Is this being logged?
|
|
920
|
-
}
|
|
921
|
-
```
|
|
922
|
-
|
|
923
759
|
## Summary
|
|
924
760
|
|
|
925
761
|
Model services in Akan.js are powerful components that encapsulate business logic and data operations. By following the patterns and best practices outlined in this guide, you can create maintainable, scalable services that effectively implement your application's domain logic while maintaining clean separation of concerns.
|
|
@@ -22,7 +22,6 @@ Scalar modules provide reusable value objects for:
|
|
|
22
22
|
```
|
|
23
23
|
{domain}/lib/
|
|
24
24
|
└── __scalar/ // Special scalar directory
|
|
25
|
-
├── _server.ts // Module registration
|
|
26
25
|
└── [scalarName]/ // camelCase scalar name
|
|
27
26
|
├── [name].constant.ts // Schema definition
|
|
28
27
|
├── [name].dictionary.ts // I18n translations
|
|
@@ -54,7 +53,6 @@ Scalar modules provide reusable value objects for:
|
|
|
54
53
|
1. **Constant File**: Schema definition with typed fields and validation
|
|
55
54
|
2. **Dictionary File**: I18n translations for model metadata, fields and enums
|
|
56
55
|
3. **Document File**: Optional method extensions for data transformations
|
|
57
|
-
4. **Server Registration**: Aggregate and expose scalars through `_server.ts`
|
|
58
56
|
|
|
59
57
|
## Key Rules
|
|
60
58
|
|
|
@@ -62,7 +60,6 @@ Scalar modules provide reusable value objects for:
|
|
|
62
60
|
2. All fields require decorators (`@Field.Prop`, `@Field.Hidden`, etc.)
|
|
63
61
|
3. Dictionary must include all fields/enums with `modelName`/`modelDesc`
|
|
64
62
|
4. Use `satisfies ModelDictionary<Type>` for dictionary type safety
|
|
65
|
-
5. Register all scalars in `_server.ts` with `scalarModulesOf()`
|
|
66
63
|
|
|
67
64
|
## Best Practices
|
|
68
65
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Lib, Workspace } from "@akanjs/devkit";
|
|
2
2
|
export declare class LibraryScript {
|
|
3
3
|
#private;
|
|
4
|
-
syncLibrary(lib: Lib): Promise<import("@akanjs/
|
|
4
|
+
syncLibrary(lib: Lib): Promise<import("@akanjs/devkit").AppInfo | import("@akanjs/devkit").LibInfo>;
|
|
5
5
|
createLibrary(libName: string, workspace: Workspace): Promise<void>;
|
|
6
6
|
removeLibrary(lib: Lib): Promise<void>;
|
|
7
7
|
installLibrary(workspace: Workspace, libName: string): Promise<void>;
|
|
@@ -3,6 +3,6 @@ export declare class PackageRunner {
|
|
|
3
3
|
version(workspace: Workspace): Promise<void>;
|
|
4
4
|
createPackage(workspace: Workspace, pkgName: string): Promise<void>;
|
|
5
5
|
removePackage(pkg: Pkg): Promise<void>;
|
|
6
|
-
scanSync(pkg: Pkg): Promise<import("@akanjs/
|
|
6
|
+
scanSync(pkg: Pkg): Promise<import("@akanjs/devkit").PkgInfo>;
|
|
7
7
|
buildPackage(pkg: Pkg): Promise<void>;
|
|
8
8
|
}
|
|
@@ -4,6 +4,6 @@ export declare class PackageScript {
|
|
|
4
4
|
version(workspace: Workspace): Promise<void>;
|
|
5
5
|
createPackage(workspace: Workspace, pkgName: string): Promise<void>;
|
|
6
6
|
removePackage(pkg: Pkg): Promise<void>;
|
|
7
|
-
syncPackage(pkg: Pkg): Promise<import("@akanjs/
|
|
7
|
+
syncPackage(pkg: Pkg): Promise<import("@akanjs/devkit").PkgInfo>;
|
|
8
8
|
buildPackage(pkg: Pkg): Promise<void>;
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
model: string;
|
|
4
4
|
Model: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
model: string;
|
|
4
4
|
Model: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
model: string;
|
|
4
4
|
Model: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
AppName: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
AppName: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
AppName: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
AppName: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
AppName: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
AppName: string;
|
|
5
5
|
}
|
|
6
|
-
export default function getContent(
|
|
6
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): string;
|
|
6
6
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
2
2
|
interface Dict {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict?: Dict): {
|
|
6
6
|
filename: string;
|
|
7
7
|
content: string;
|
|
8
8
|
};
|