@akanjs/cli 0.9.42 → 0.9.44
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 +50 -40
- package/cjs/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -1
- package/cjs/src/guidelines/componentRule/componentRule.instruction.md +0 -18
- package/cjs/src/guidelines/cssRule/cssRule.instruction.md +2 -2
- package/cjs/src/guidelines/databaseModule/databaseModule.instruction.md +13 -7
- package/cjs/src/guidelines/modelConstant/modelConstant.instruction.md +0 -30
- package/cjs/src/guidelines/modelDictionary/modelDictionary.generate.json +0 -7
- package/cjs/src/guidelines/modelDictionary/modelDictionary.instruction.md +2 -38
- package/cjs/src/guidelines/modelDocument/modelDocument.instruction.md +1 -1
- package/cjs/src/guidelines/modelService/modelService.generate.json +0 -30
- package/cjs/src/guidelines/modelService/modelService.instruction.md +1 -165
- package/cjs/src/guidelines/modelSignal/modelSignal.instruction.md +4 -4
- package/cjs/src/guidelines/modelStore/modelStore.instruction.md +4 -4
- package/cjs/src/templates/app/lib/___appName__/__appName__.dictionary.js +6 -1
- package/cjs/src/templates/app/lib/___appName__/__appName__.service.js +3 -13
- package/cjs/src/templates/app/lib/{user/user.signal.js → ___appName__/__appName__.signal.js} +8 -8
- package/cjs/src/templates/client.js +4 -5
- package/cjs/src/templates/index.js +2 -3
- package/cjs/src/templates/lib/__lib/lib.constant.js +22 -12
- package/cjs/src/templates/lib/__lib/lib.dictionary.js +15 -8
- package/cjs/src/templates/lib/__lib/lib.document.js +17 -7
- package/cjs/src/templates/lib/__lib/lib.service.js +14 -33
- package/cjs/src/templates/lib/cnst.js +19 -1
- package/cjs/src/templates/lib/db.js +3 -10
- package/cjs/src/templates/lib/dict.js +2 -2
- package/cjs/src/templates/lib/sig.js +20 -0
- package/cjs/src/templates/lib/st.js +13 -1
- package/cjs/src/templates/lib/usePage.js +2 -2
- package/cjs/src/templates/module/__Model__.Util.js +6 -36
- package/cjs/src/templates/module/__Model__.Zone.js +2 -26
- package/cjs/src/templates/module/__model__.constant.js +0 -6
- package/cjs/src/templates/module/__model__.dictionary.js +1 -14
- 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 +2 -2
- package/cjs/src/templates/module/__model__.signal.spec.js +2 -2
- package/cjs/src/templates/module/__model__.signal.test.js +2 -2
- package/cjs/src/templates/module/__model__.store.js +2 -2
- package/cjs/src/templates/server.js +4 -3
- package/cjs/src/templates/workspaceRoot/.gitignore.template +0 -6
- package/cjs/src/templates/workspaceRoot/.vscode/settings.json.template +0 -1
- package/esm/index.js +51 -41
- package/esm/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -1
- package/esm/src/guidelines/componentRule/componentRule.instruction.md +0 -18
- package/esm/src/guidelines/cssRule/cssRule.instruction.md +2 -2
- package/esm/src/guidelines/databaseModule/databaseModule.instruction.md +13 -7
- package/esm/src/guidelines/modelConstant/modelConstant.instruction.md +0 -30
- package/esm/src/guidelines/modelDictionary/modelDictionary.generate.json +0 -7
- package/esm/src/guidelines/modelDictionary/modelDictionary.instruction.md +2 -38
- package/esm/src/guidelines/modelDocument/modelDocument.instruction.md +1 -1
- package/esm/src/guidelines/modelService/modelService.generate.json +0 -30
- package/esm/src/guidelines/modelService/modelService.instruction.md +1 -165
- package/esm/src/guidelines/modelSignal/modelSignal.instruction.md +4 -4
- package/esm/src/guidelines/modelStore/modelStore.instruction.md +4 -4
- package/esm/src/templates/app/lib/___appName__/__appName__.dictionary.js +6 -1
- package/esm/src/templates/app/lib/___appName__/__appName__.service.js +3 -13
- package/esm/src/templates/app/lib/___appName__/__appName__.signal.js +14 -0
- package/esm/src/templates/client.js +4 -5
- package/esm/src/templates/index.js +2 -3
- package/esm/src/templates/lib/__lib/lib.constant.js +22 -12
- package/esm/src/templates/lib/__lib/lib.dictionary.js +15 -8
- package/esm/src/templates/lib/__lib/lib.document.js +17 -7
- package/esm/src/templates/lib/__lib/lib.service.js +14 -33
- package/esm/src/templates/lib/cnst.js +19 -1
- package/esm/src/templates/lib/db.js +3 -10
- package/esm/src/templates/lib/dict.js +2 -2
- package/esm/src/templates/lib/sig.js +20 -0
- package/esm/src/templates/lib/st.js +13 -1
- package/esm/src/templates/lib/usePage.js +2 -2
- package/esm/src/templates/module/__Model__.Util.js +6 -36
- package/esm/src/templates/module/__Model__.Zone.js +2 -26
- package/esm/src/templates/module/__model__.constant.js +0 -6
- package/esm/src/templates/module/__model__.dictionary.js +1 -14
- 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 +2 -2
- package/esm/src/templates/module/__model__.signal.spec.js +2 -2
- package/esm/src/templates/module/__model__.signal.test.js +2 -2
- package/esm/src/templates/module/__model__.store.js +2 -2
- package/esm/src/templates/server.js +4 -3
- package/esm/src/templates/workspaceRoot/.gitignore.template +0 -6
- package/esm/src/templates/workspaceRoot/.vscode/settings.json.template +0 -1
- package/package.json +1 -1
- package/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -1
- package/src/guidelines/componentRule/componentRule.instruction.md +0 -18
- package/src/guidelines/cssRule/cssRule.instruction.md +2 -2
- package/src/guidelines/databaseModule/databaseModule.instruction.md +13 -7
- package/src/guidelines/modelConstant/modelConstant.instruction.md +0 -30
- package/src/guidelines/modelDictionary/modelDictionary.instruction.md +2 -38
- package/src/guidelines/modelDocument/modelDocument.instruction.md +1 -1
- package/src/guidelines/modelService/modelService.instruction.md +1 -165
- package/src/guidelines/modelSignal/modelSignal.instruction.md +4 -4
- package/src/guidelines/modelStore/modelStore.instruction.md +4 -4
- package/src/templates/lib/cnst.d.ts +1 -1
- package/ui/MultiScrollList.d.ts +4 -1
- package/cjs/src/templates/app/app/[lang]/admin/page.js +0 -63
- package/cjs/src/templates/app/lib/setting/Setting.Template.js +0 -44
- package/cjs/src/templates/app/lib/setting/Setting.Unit.js +0 -38
- package/cjs/src/templates/app/lib/setting/Setting.Util.js +0 -40
- package/cjs/src/templates/app/lib/setting/Setting.View.js +0 -48
- package/cjs/src/templates/app/lib/setting/Setting.Zone.js +0 -74
- package/cjs/src/templates/app/lib/setting/setting.constant.js +0 -46
- package/cjs/src/templates/app/lib/setting/setting.dictionary.js +0 -46
- package/cjs/src/templates/app/lib/setting/setting.document.js +0 -48
- package/cjs/src/templates/app/lib/setting/setting.service.js +0 -37
- package/cjs/src/templates/app/lib/setting/setting.signal.js +0 -34
- package/cjs/src/templates/app/lib/setting/setting.store.js +0 -41
- package/cjs/src/templates/app/lib/summary/Summary.Template.js +0 -44
- package/cjs/src/templates/app/lib/summary/Summary.Unit.js +0 -37
- package/cjs/src/templates/app/lib/summary/Summary.Util.js +0 -40
- package/cjs/src/templates/app/lib/summary/Summary.View.js +0 -47
- package/cjs/src/templates/app/lib/summary/Summary.Zone.js +0 -60
- package/cjs/src/templates/app/lib/summary/summary.constant.js +0 -44
- package/cjs/src/templates/app/lib/summary/summary.dictionary.js +0 -49
- package/cjs/src/templates/app/lib/summary/summary.document.js +0 -48
- package/cjs/src/templates/app/lib/summary/summary.service.js +0 -34
- package/cjs/src/templates/app/lib/summary/summary.signal.js +0 -34
- package/cjs/src/templates/app/lib/summary/summary.store.js +0 -41
- package/cjs/src/templates/app/lib/user/User.Template.js +0 -64
- package/cjs/src/templates/app/lib/user/User.Unit.js +0 -37
- package/cjs/src/templates/app/lib/user/User.Util.js +0 -73
- package/cjs/src/templates/app/lib/user/User.View.js +0 -64
- package/cjs/src/templates/app/lib/user/User.Zone.js +0 -77
- package/cjs/src/templates/app/lib/user/user.constant.js +0 -67
- package/cjs/src/templates/app/lib/user/user.dictionary.js +0 -52
- package/cjs/src/templates/app/lib/user/user.document.js +0 -54
- package/cjs/src/templates/app/lib/user/user.service.js +0 -42
- package/cjs/src/templates/app/lib/user/user.signal.spec.js +0 -37
- package/cjs/src/templates/app/lib/user/user.signal.test.js +0 -39
- package/cjs/src/templates/app/lib/user/user.store.js +0 -39
- package/cjs/src/templates/lib/__lib/extends/summary.constant.js +0 -45
- package/cjs/src/templates/lib/cnst_.js +0 -51
- package/cjs/src/templates/lib/fetch.js +0 -48
- package/cjs/src/templates/lib/store.js +0 -50
- package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +0 -44
- package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +0 -38
- package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +0 -40
- package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +0 -48
- package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +0 -74
- package/cjs/src/templates/libRoot/lib/setting/setting.constant.js +0 -46
- package/cjs/src/templates/libRoot/lib/setting/setting.dictionary.js +0 -46
- package/cjs/src/templates/libRoot/lib/setting/setting.document.js +0 -48
- package/cjs/src/templates/libRoot/lib/setting/setting.service.js +0 -37
- package/cjs/src/templates/libRoot/lib/setting/setting.signal.js +0 -34
- package/cjs/src/templates/libRoot/lib/setting/setting.store.js +0 -41
- package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +0 -44
- package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +0 -37
- package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +0 -40
- package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +0 -47
- package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +0 -60
- package/cjs/src/templates/libRoot/lib/summary/summary.constant.js +0 -44
- package/cjs/src/templates/libRoot/lib/summary/summary.dictionary.js +0 -49
- package/cjs/src/templates/libRoot/lib/summary/summary.document.js +0 -48
- package/cjs/src/templates/libRoot/lib/summary/summary.service.js +0 -34
- package/cjs/src/templates/libRoot/lib/summary/summary.signal.js +0 -34
- package/cjs/src/templates/libRoot/lib/summary/summary.store.js +0 -41
- package/cjs/src/templates/libRoot/lib/user/User.Template.js +0 -64
- package/cjs/src/templates/libRoot/lib/user/User.Unit.js +0 -37
- package/cjs/src/templates/libRoot/lib/user/User.Util.js +0 -73
- package/cjs/src/templates/libRoot/lib/user/User.View.js +0 -64
- package/cjs/src/templates/libRoot/lib/user/User.Zone.js +0 -77
- package/cjs/src/templates/libRoot/lib/user/user.constant.js +0 -67
- package/cjs/src/templates/libRoot/lib/user/user.dictionary.js +0 -52
- package/cjs/src/templates/libRoot/lib/user/user.document.js +0 -54
- package/cjs/src/templates/libRoot/lib/user/user.service.js +0 -42
- package/cjs/src/templates/libRoot/lib/user/user.signal.js +0 -34
- package/cjs/src/templates/libRoot/lib/user/user.signal.spec.js +0 -37
- package/cjs/src/templates/libRoot/lib/user/user.signal.test.js +0 -39
- package/cjs/src/templates/libRoot/lib/user/user.store.js +0 -39
- package/esm/src/templates/app/app/[lang]/admin/page.js +0 -43
- package/esm/src/templates/app/lib/setting/Setting.Template.js +0 -24
- package/esm/src/templates/app/lib/setting/Setting.Unit.js +0 -18
- package/esm/src/templates/app/lib/setting/Setting.Util.js +0 -20
- package/esm/src/templates/app/lib/setting/Setting.View.js +0 -28
- package/esm/src/templates/app/lib/setting/Setting.Zone.js +0 -54
- package/esm/src/templates/app/lib/setting/setting.constant.js +0 -26
- package/esm/src/templates/app/lib/setting/setting.dictionary.js +0 -26
- package/esm/src/templates/app/lib/setting/setting.document.js +0 -28
- package/esm/src/templates/app/lib/setting/setting.service.js +0 -17
- package/esm/src/templates/app/lib/setting/setting.signal.js +0 -14
- package/esm/src/templates/app/lib/setting/setting.store.js +0 -21
- package/esm/src/templates/app/lib/summary/Summary.Template.js +0 -24
- package/esm/src/templates/app/lib/summary/Summary.Unit.js +0 -17
- package/esm/src/templates/app/lib/summary/Summary.Util.js +0 -20
- package/esm/src/templates/app/lib/summary/Summary.View.js +0 -27
- package/esm/src/templates/app/lib/summary/Summary.Zone.js +0 -40
- package/esm/src/templates/app/lib/summary/summary.constant.js +0 -24
- package/esm/src/templates/app/lib/summary/summary.dictionary.js +0 -29
- package/esm/src/templates/app/lib/summary/summary.document.js +0 -28
- package/esm/src/templates/app/lib/summary/summary.service.js +0 -14
- package/esm/src/templates/app/lib/summary/summary.signal.js +0 -14
- package/esm/src/templates/app/lib/summary/summary.store.js +0 -21
- package/esm/src/templates/app/lib/user/User.Template.js +0 -44
- package/esm/src/templates/app/lib/user/User.Unit.js +0 -17
- package/esm/src/templates/app/lib/user/User.Util.js +0 -53
- package/esm/src/templates/app/lib/user/User.View.js +0 -44
- package/esm/src/templates/app/lib/user/User.Zone.js +0 -57
- package/esm/src/templates/app/lib/user/user.constant.js +0 -47
- package/esm/src/templates/app/lib/user/user.dictionary.js +0 -32
- package/esm/src/templates/app/lib/user/user.document.js +0 -34
- package/esm/src/templates/app/lib/user/user.service.js +0 -22
- package/esm/src/templates/app/lib/user/user.signal.js +0 -14
- package/esm/src/templates/app/lib/user/user.signal.spec.js +0 -17
- package/esm/src/templates/app/lib/user/user.signal.test.js +0 -19
- package/esm/src/templates/app/lib/user/user.store.js +0 -19
- package/esm/src/templates/lib/__lib/extends/summary.constant.js +0 -25
- package/esm/src/templates/lib/cnst_.js +0 -31
- package/esm/src/templates/lib/fetch.js +0 -28
- package/esm/src/templates/lib/store.js +0 -30
- package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +0 -24
- package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +0 -18
- package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +0 -20
- package/esm/src/templates/libRoot/lib/setting/Setting.View.js +0 -28
- package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +0 -54
- package/esm/src/templates/libRoot/lib/setting/setting.constant.js +0 -26
- package/esm/src/templates/libRoot/lib/setting/setting.dictionary.js +0 -26
- package/esm/src/templates/libRoot/lib/setting/setting.document.js +0 -28
- package/esm/src/templates/libRoot/lib/setting/setting.service.js +0 -17
- package/esm/src/templates/libRoot/lib/setting/setting.signal.js +0 -14
- package/esm/src/templates/libRoot/lib/setting/setting.store.js +0 -21
- package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +0 -24
- package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +0 -17
- package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +0 -20
- package/esm/src/templates/libRoot/lib/summary/Summary.View.js +0 -27
- package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +0 -40
- package/esm/src/templates/libRoot/lib/summary/summary.constant.js +0 -24
- package/esm/src/templates/libRoot/lib/summary/summary.dictionary.js +0 -29
- package/esm/src/templates/libRoot/lib/summary/summary.document.js +0 -28
- package/esm/src/templates/libRoot/lib/summary/summary.service.js +0 -14
- package/esm/src/templates/libRoot/lib/summary/summary.signal.js +0 -14
- package/esm/src/templates/libRoot/lib/summary/summary.store.js +0 -21
- package/esm/src/templates/libRoot/lib/user/User.Template.js +0 -44
- package/esm/src/templates/libRoot/lib/user/User.Unit.js +0 -17
- package/esm/src/templates/libRoot/lib/user/User.Util.js +0 -53
- package/esm/src/templates/libRoot/lib/user/User.View.js +0 -44
- package/esm/src/templates/libRoot/lib/user/User.Zone.js +0 -57
- package/esm/src/templates/libRoot/lib/user/user.constant.js +0 -47
- package/esm/src/templates/libRoot/lib/user/user.dictionary.js +0 -32
- package/esm/src/templates/libRoot/lib/user/user.document.js +0 -34
- package/esm/src/templates/libRoot/lib/user/user.service.js +0 -22
- package/esm/src/templates/libRoot/lib/user/user.signal.js +0 -14
- package/esm/src/templates/libRoot/lib/user/user.signal.spec.js +0 -17
- package/esm/src/templates/libRoot/lib/user/user.signal.test.js +0 -19
- package/esm/src/templates/libRoot/lib/user/user.store.js +0 -19
- package/src/templates/app/app/[lang]/admin/page.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Template.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Unit.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Util.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.View.d.ts +0 -9
- package/src/templates/app/lib/setting/Setting.Zone.d.ts +0 -9
- package/src/templates/app/lib/setting/setting.dictionary.d.ts +0 -7
- package/src/templates/app/lib/setting/setting.document.d.ts +0 -6
- package/src/templates/app/lib/setting/setting.service.d.ts +0 -7
- package/src/templates/app/lib/setting/setting.signal.d.ts +0 -6
- package/src/templates/app/lib/setting/setting.store.d.ts +0 -6
- package/src/templates/app/lib/summary/Summary.Template.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.Unit.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.Util.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.View.d.ts +0 -9
- package/src/templates/app/lib/summary/Summary.Zone.d.ts +0 -9
- package/src/templates/app/lib/summary/summary.constant.d.ts +0 -7
- package/src/templates/app/lib/summary/summary.dictionary.d.ts +0 -7
- package/src/templates/app/lib/summary/summary.document.d.ts +0 -6
- package/src/templates/app/lib/summary/summary.service.d.ts +0 -7
- package/src/templates/app/lib/summary/summary.signal.d.ts +0 -6
- package/src/templates/app/lib/summary/summary.store.d.ts +0 -6
- package/src/templates/app/lib/user/User.Template.d.ts +0 -9
- package/src/templates/app/lib/user/User.Unit.d.ts +0 -9
- package/src/templates/app/lib/user/User.Util.d.ts +0 -9
- package/src/templates/app/lib/user/User.View.d.ts +0 -9
- package/src/templates/app/lib/user/User.Zone.d.ts +0 -9
- package/src/templates/app/lib/user/user.constant.d.ts +0 -7
- package/src/templates/app/lib/user/user.dictionary.d.ts +0 -7
- package/src/templates/app/lib/user/user.document.d.ts +0 -7
- package/src/templates/app/lib/user/user.service.d.ts +0 -7
- package/src/templates/app/lib/user/user.signal.d.ts +0 -6
- package/src/templates/app/lib/user/user.signal.spec.d.ts +0 -6
- package/src/templates/app/lib/user/user.signal.test.d.ts +0 -6
- package/src/templates/app/lib/user/user.store.d.ts +0 -6
- package/src/templates/lib/__lib/extends/summary.constant.d.ts +0 -4
- package/src/templates/lib/cnst_.d.ts +0 -4
- package/src/templates/lib/fetch.d.ts +0 -4
- package/src/templates/lib/store.d.ts +0 -4
- package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.View.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +0 -9
- package/src/templates/libRoot/lib/setting/setting.constant.d.ts +0 -7
- package/src/templates/libRoot/lib/setting/setting.dictionary.d.ts +0 -7
- package/src/templates/libRoot/lib/setting/setting.document.d.ts +0 -6
- package/src/templates/libRoot/lib/setting/setting.service.d.ts +0 -7
- package/src/templates/libRoot/lib/setting/setting.signal.d.ts +0 -6
- package/src/templates/libRoot/lib/setting/setting.store.d.ts +0 -6
- package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.View.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +0 -9
- package/src/templates/libRoot/lib/summary/summary.constant.d.ts +0 -7
- package/src/templates/libRoot/lib/summary/summary.dictionary.d.ts +0 -7
- package/src/templates/libRoot/lib/summary/summary.document.d.ts +0 -6
- package/src/templates/libRoot/lib/summary/summary.service.d.ts +0 -7
- package/src/templates/libRoot/lib/summary/summary.signal.d.ts +0 -6
- package/src/templates/libRoot/lib/summary/summary.store.d.ts +0 -6
- package/src/templates/libRoot/lib/user/User.Template.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.Unit.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.Util.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.View.d.ts +0 -9
- package/src/templates/libRoot/lib/user/User.Zone.d.ts +0 -9
- package/src/templates/libRoot/lib/user/user.constant.d.ts +0 -7
- package/src/templates/libRoot/lib/user/user.dictionary.d.ts +0 -7
- package/src/templates/libRoot/lib/user/user.document.d.ts +0 -7
- package/src/templates/libRoot/lib/user/user.service.d.ts +0 -7
- package/src/templates/libRoot/lib/user/user.signal.d.ts +0 -6
- package/src/templates/libRoot/lib/user/user.signal.spec.d.ts +0 -6
- package/src/templates/libRoot/lib/user/user.signal.test.d.ts +0 -6
- package/src/templates/libRoot/lib/user/user.store.d.ts +0 -6
- /package/src/templates/app/lib/{setting/setting.constant.d.ts → ___appName__/__appName__.signal.d.ts} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/summary/Summary.Zone.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Summary.Zone.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { ModelsProps } from "@akanjs/client";
|
|
8
|
-
import { DefaultOf } from "@akanjs/signal";
|
|
9
|
-
import { cnst, st, Summary } from "@${dict.appName}/client";
|
|
10
|
-
import { Data } from "@akanjs/ui";
|
|
11
|
-
import { Loading } from "@akanjs/ui";
|
|
12
|
-
|
|
13
|
-
export const Admin = ({ sliceName = "summary", init, query }: ModelsProps<cnst.Summary>) => {
|
|
14
|
-
return (
|
|
15
|
-
<Data.ListContainer
|
|
16
|
-
init={init}
|
|
17
|
-
query={query}
|
|
18
|
-
sliceName={sliceName}
|
|
19
|
-
renderItem={Summary.Unit.Card}
|
|
20
|
-
renderTemplate={Summary.Template.General}
|
|
21
|
-
renderTitle={(summary: DefaultOf<cnst.Summary>) => \`\${summary.at}\`}
|
|
22
|
-
renderView={(summary: cnst.Summary) => <Summary.View.General summary={summary} />}
|
|
23
|
-
type="list"
|
|
24
|
-
columns={["type", "status", "createdAt"]}
|
|
25
|
-
actions={(summary: cnst.LightSummary, idx) => ["remove", "edit"]}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Dashboard = () => {
|
|
31
|
-
const summary = st.use.summary();
|
|
32
|
-
if (!summary) return <Loading.Skeleton active />;
|
|
33
|
-
return <Summary.View.General summary={summary} />;
|
|
34
|
-
};
|
|
35
|
-
`
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
getContent as default
|
|
40
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/summary/summary.constant.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { from, Model, over, via } from "@akanjs/constant";
|
|
5
|
-
|
|
6
|
-
import { modelSummaries } from "../__lib/extends/summary.constant";
|
|
7
|
-
import { libSummaries, root } from "../__lib/lib.constant";
|
|
8
|
-
|
|
9
|
-
@Model.Summary("${dict.AppName}Summary")
|
|
10
|
-
export class ${dict.AppName}Summary extends over(...modelSummaries) {}
|
|
11
|
-
|
|
12
|
-
export class SummaryObject extends from(...libSummaries, ${dict.AppName}Summary) {}
|
|
13
|
-
export class SummaryInput extends root.SummaryInput {}
|
|
14
|
-
|
|
15
|
-
@Model.Light("LightSummary")
|
|
16
|
-
export class LightSummary extends via(SummaryObject, ["at"] as const) {}
|
|
17
|
-
|
|
18
|
-
@Model.Full("Summary")
|
|
19
|
-
export class Summary extends via(SummaryObject, LightSummary, root.Summary, root.LightSummary) {}
|
|
20
|
-
`;
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
getContent as default
|
|
24
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/summary/summary.dictionary.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { ExtendModelDictionary, SignalDictionary } from "@akanjs/dictionary";
|
|
5
|
-
|
|
6
|
-
import { libSummaryDictionary } from "../__lib/lib.dictionary";
|
|
7
|
-
import type { ${dict.AppName}Summary } from "./summary.constant";
|
|
8
|
-
import type { SummarySignal } from "./summary.signal";
|
|
9
|
-
|
|
10
|
-
const modelDictionary = {
|
|
11
|
-
// * ==================== Model ==================== * //
|
|
12
|
-
...libSummaryDictionary,
|
|
13
|
-
// * ==================== Model ==================== * //
|
|
14
|
-
|
|
15
|
-
// * ==================== Etc ==================== * //
|
|
16
|
-
// * ==================== Etc ==================== * //
|
|
17
|
-
} satisfies ExtendModelDictionary<${dict.AppName}Summary>;
|
|
18
|
-
|
|
19
|
-
const signalDictionary = {
|
|
20
|
-
// * ==================== Endpoint ==================== * //
|
|
21
|
-
// * ==================== Endpoint ==================== * //
|
|
22
|
-
} satisfies SignalDictionary<SummarySignal, ${dict.AppName}Summary>;
|
|
23
|
-
|
|
24
|
-
export const summaryDictionary = { ...modelDictionary, ...signalDictionary };
|
|
25
|
-
`;
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
getContent as default
|
|
29
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/summary/summary.document.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return `
|
|
4
|
-
import { beyond, by, Database, inside, type SchemaOf } from "@akanjs/document";
|
|
5
|
-
|
|
6
|
-
import { rootSummary } from "../__lib/lib.document";
|
|
7
|
-
import { cnst } from "../cnst";
|
|
8
|
-
|
|
9
|
-
@Database.Input(() => cnst.SummaryInput)
|
|
10
|
-
export class SummaryInput extends by(rootSummary.Input, cnst.SummaryInput) {}
|
|
11
|
-
|
|
12
|
-
@Database.Document(() => cnst.Summary)
|
|
13
|
-
export class Summary extends by(rootSummary.Doc, cnst.Summary) {}
|
|
14
|
-
|
|
15
|
-
@Database.Model(() => cnst.Summary)
|
|
16
|
-
export class SummaryModel extends inside(rootSummary.Model, cnst.summaryCnst) {}
|
|
17
|
-
|
|
18
|
-
@Database.Middleware(() => cnst.Summary)
|
|
19
|
-
export class SummaryMiddleware extends beyond(SummaryModel, Summary) {
|
|
20
|
-
onSchema(schema: SchemaOf<SummaryModel, Summary>) {
|
|
21
|
-
//
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
getContent as default
|
|
28
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/summary/summary.service.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { Service } from "@akanjs/service";
|
|
5
|
-
|
|
6
|
-
import { ProtoSummaryService } from "../__lib/lib.service";
|
|
7
|
-
|
|
8
|
-
@Service("SummaryService")
|
|
9
|
-
export class SummaryService extends ProtoSummaryService {}
|
|
10
|
-
`;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
getContent as default
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/summary/summary.signal.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return `
|
|
4
|
-
import { LogSignal, Signal } from "@akanjs/signal";
|
|
5
|
-
|
|
6
|
-
import { cnst, Srvs } from "../cnst";
|
|
7
|
-
|
|
8
|
-
@Signal(() => cnst.Summary)
|
|
9
|
-
export class SummarySignal extends LogSignal(Srvs) {}
|
|
10
|
-
`;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
getContent as default
|
|
14
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/summary/summary.store.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return `
|
|
4
|
-
import { stateOf, Store } from "@akanjs/store";
|
|
5
|
-
|
|
6
|
-
import { cnst } from "../cnst";
|
|
7
|
-
import { fetch, summaryGql } from "../fetch";
|
|
8
|
-
|
|
9
|
-
@Store(() => cnst.Summary)
|
|
10
|
-
export class SummaryStore extends stateOf(summaryGql, {
|
|
11
|
-
// state
|
|
12
|
-
}) {
|
|
13
|
-
async getActiveSummary() {
|
|
14
|
-
this.set({ summary: (await fetch.getActiveSummary()) as cnst.Summary, summaryLoading: false });
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
getContent as default
|
|
21
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/User.Template.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "User.Template.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { clsx } from "@akanjs/client";
|
|
8
|
-
import { Field } from "@shared/ui";
|
|
9
|
-
import { Layout } from "@akanjs/ui";
|
|
10
|
-
import { st, usePage } from "@${dict.appName}/client";
|
|
11
|
-
|
|
12
|
-
interface UserEditProps {
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const General = ({ className }: UserEditProps) => {
|
|
17
|
-
const userForm = st.use.userForm();
|
|
18
|
-
const { l } = usePage();
|
|
19
|
-
return (
|
|
20
|
-
<Layout.Template className={clsx("flex flex-col gap-4", className)}>
|
|
21
|
-
<div className="w-[150px] flex mt-10 md:mt-0">
|
|
22
|
-
<Field.Img
|
|
23
|
-
label={l.field("user", "image")}
|
|
24
|
-
desc={l.desc("user", "image")}
|
|
25
|
-
sliceName="user"
|
|
26
|
-
value={userForm.image}
|
|
27
|
-
onChange={st.do.setImageOnUser}
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
<Field.Text
|
|
31
|
-
label={l.field("user", "nickname")}
|
|
32
|
-
desc={l.desc("user", "nickname")}
|
|
33
|
-
value={userForm.nickname}
|
|
34
|
-
onChange={st.do.setNicknameOnUser}
|
|
35
|
-
/>
|
|
36
|
-
</Layout.Template>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
`
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
getContent as default
|
|
44
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/User.Unit.tsx
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "User.Unit.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
import { clsx, ModelProps } from "@akanjs/client";
|
|
7
|
-
import { cnst } from "@${dict.appName}/client";
|
|
8
|
-
|
|
9
|
-
export const Card = ({ className, user }: ModelProps<"user", cnst.LightUser>) => {
|
|
10
|
-
return <div className={clsx("", className)}>{user.id}</div>; // update your UI here
|
|
11
|
-
};
|
|
12
|
-
`
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
getContent as default
|
|
17
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/User.Util.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "User.Util.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { clsx, ModelDashboardProps, ModelInsightProps } from "@akanjs/client";
|
|
8
|
-
import { getQueryMap } from "@akanjs/constant";
|
|
9
|
-
import { cnst, st } from "@${dict.appName}/client";
|
|
10
|
-
import { Data } from "@akanjs/ui";
|
|
11
|
-
import { AiOutlineEdit, AiOutlineLock, AiOutlineUnlock } from "react-icons/ai";
|
|
12
|
-
|
|
13
|
-
export const Stat = ({
|
|
14
|
-
className,
|
|
15
|
-
summary,
|
|
16
|
-
sliceName = "user",
|
|
17
|
-
queryMap = getQueryMap(cnst.UserSummary),
|
|
18
|
-
hidePresents,
|
|
19
|
-
}: ModelDashboardProps<cnst.Summary>) => {
|
|
20
|
-
return (
|
|
21
|
-
<Data.Dashboard
|
|
22
|
-
className={clsx("", className)}
|
|
23
|
-
summary={summary}
|
|
24
|
-
sliceName={sliceName}
|
|
25
|
-
queryMap={queryMap}
|
|
26
|
-
columns={["totalUser", "dau"]}
|
|
27
|
-
hidePresents={hidePresents}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
export const Insight = ({ className, insight, sliceName = "user" }: ModelInsightProps<cnst.UserInsight>) => {
|
|
32
|
-
return <Data.Insight className={clsx("", className)} insight={insight} sliceName={sliceName} columns={["count"]} />;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
interface EditSelfProps {
|
|
36
|
-
className?: string;
|
|
37
|
-
}
|
|
38
|
-
export const EditSelf = ({ className }: EditSelfProps) => {
|
|
39
|
-
const self = st.use.self();
|
|
40
|
-
const userModal = st.use.userModal();
|
|
41
|
-
return userModal !== "edit" ? (
|
|
42
|
-
<button className={clsx("gap-2 btn", className)} onClick={() => st.do.editUser(self)}>
|
|
43
|
-
<AiOutlineEdit />
|
|
44
|
-
Edit
|
|
45
|
-
</button>
|
|
46
|
-
) : null;
|
|
47
|
-
};
|
|
48
|
-
`
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
getContent as default
|
|
53
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/User.View.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "User.View.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
import { clsx } from "@akanjs/client";
|
|
7
|
-
import { cnst, usePage } from "@${dict.appName}/client";
|
|
8
|
-
import { Avatar } from "@util/ui";
|
|
9
|
-
import { AiOutlineUser } from "react-icons/ai";
|
|
10
|
-
|
|
11
|
-
interface UserViewProps {
|
|
12
|
-
className?: string;
|
|
13
|
-
user: cnst.User;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const General = ({ className, user }: UserViewProps) => {
|
|
17
|
-
const { l } = usePage();
|
|
18
|
-
return (
|
|
19
|
-
<div className={clsx("flex flex-col gap-4", className)}>
|
|
20
|
-
<div>
|
|
21
|
-
<div className="font-bold">Profile</div>
|
|
22
|
-
<div className="text-base">
|
|
23
|
-
<Avatar
|
|
24
|
-
className="flex items-center justify-center w-24 h-24"
|
|
25
|
-
icon={<AiOutlineUser className="text-4xl" />}
|
|
26
|
-
src={user.image?.url}
|
|
27
|
-
/>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
<div>
|
|
31
|
-
<div className="flex gap-2 items-center">
|
|
32
|
-
<div className="font-bold">Nickname</div>
|
|
33
|
-
</div>
|
|
34
|
-
<p className="text-base">{user.nickname}</p>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
`
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
getContent as default
|
|
44
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/User.Zone.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "User.Zone.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { ModelsProps } from "@akanjs/client";
|
|
8
|
-
import { DefaultOf } from "@akanjs/signal";
|
|
9
|
-
import { cnst, st, User } from "@${dict.appName}/client";
|
|
10
|
-
import { Data, Model } from "@akanjs/ui";
|
|
11
|
-
|
|
12
|
-
export const Admin = ({ sliceName = "user", init, query }: ModelsProps<cnst.User>) => {
|
|
13
|
-
return (
|
|
14
|
-
<Data.ListContainer
|
|
15
|
-
init={init}
|
|
16
|
-
query={query}
|
|
17
|
-
sliceName={sliceName}
|
|
18
|
-
renderItem={User.Unit.Card}
|
|
19
|
-
renderDashboard={User.Util.Stat}
|
|
20
|
-
renderInsight={User.Util.Insight}
|
|
21
|
-
renderTemplate={User.Template.General}
|
|
22
|
-
renderTitle={(user: DefaultOf<cnst.User>) => \`\${user.nickname}\`}
|
|
23
|
-
renderView={(user: cnst.User) => <User.View.General user={user} />}
|
|
24
|
-
type="list"
|
|
25
|
-
columns={["nickname", "status", "lastLoginAt", "createdAt"]}
|
|
26
|
-
actions={(user: cnst.LightUser, idx) => [
|
|
27
|
-
"remove",
|
|
28
|
-
"edit",
|
|
29
|
-
"view",
|
|
30
|
-
user.status === "active"
|
|
31
|
-
? { type: "restrict", render: () => <User.Util.Restrict id={user.id} /> }
|
|
32
|
-
: { type: "release", render: () => <User.Util.Release id={user.id} /> },
|
|
33
|
-
]}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
interface SelfProps {
|
|
39
|
-
className?: string;
|
|
40
|
-
}
|
|
41
|
-
export const Self = ({ className }: SelfProps) => {
|
|
42
|
-
const self = st.use.self();
|
|
43
|
-
const userModal = st.use.userModal();
|
|
44
|
-
return userModal === "edit" ? (
|
|
45
|
-
<Model.EditModal type="form" sliceName="user" submitOption={{ path: "self" }}>
|
|
46
|
-
<User.Template.General />
|
|
47
|
-
</Model.EditModal>
|
|
48
|
-
) : (
|
|
49
|
-
<User.View.General className={className} user={self} />
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
`
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
getContent as default
|
|
57
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.constant.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { as, from, Model, sortOf, via } from "@akanjs/constant";
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
libUserFilters,
|
|
8
|
-
libUserInputs,
|
|
9
|
-
libUserInsights,
|
|
10
|
-
libUsers,
|
|
11
|
-
libUserSummaries,
|
|
12
|
-
root,
|
|
13
|
-
} from "../__lib/lib.constant";
|
|
14
|
-
|
|
15
|
-
@Model.Input("${dict.AppName}UserInput")
|
|
16
|
-
export class ${dict.AppName}UserInput {}
|
|
17
|
-
|
|
18
|
-
@Model.Object("${dict.AppName}User")
|
|
19
|
-
export class ${dict.AppName}User extends as(${dict.AppName}UserInput) {}
|
|
20
|
-
|
|
21
|
-
@Model.Insight("${dict.AppName}UserInsight")
|
|
22
|
-
export class ${dict.AppName}UserInsight {}
|
|
23
|
-
|
|
24
|
-
@Model.Summary("${dict.AppName}UserSummary")
|
|
25
|
-
export class ${dict.AppName}UserSummary {}
|
|
26
|
-
|
|
27
|
-
@Model.Filter("${dict.AppName}UserFilter")
|
|
28
|
-
export class ${dict.AppName}UserFilter extends sortOf(root.User, {}) {}
|
|
29
|
-
|
|
30
|
-
export class UserInput extends from(...libUserInputs, ${dict.AppName}UserInput) {}
|
|
31
|
-
export class UserObject extends from(...libUsers, ${dict.AppName}User) {}
|
|
32
|
-
|
|
33
|
-
@Model.Light("LightUser")
|
|
34
|
-
export class LightUser extends via(UserObject, ["nickname", "image", "roles", "status"] as const) {}
|
|
35
|
-
|
|
36
|
-
@Model.Full("User")
|
|
37
|
-
export class User extends via(UserObject, LightUser, root.User, root.LightUser) {}
|
|
38
|
-
|
|
39
|
-
export class UserSummary extends from(...libUserSummaries, ${dict.AppName}UserSummary) {}
|
|
40
|
-
export class UserInsight extends from(...libUserInsights, ${dict.AppName}UserInsight) {}
|
|
41
|
-
|
|
42
|
-
export class UserFilter extends from(...libUserFilters, ${dict.AppName}UserFilter) {}
|
|
43
|
-
`;
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
getContent as default
|
|
47
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.dictionary.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { ExtendModelDictionary, SignalDictionary, SummaryDictionary } from "@akanjs/dictionary";
|
|
5
|
-
|
|
6
|
-
import type { ${dict.AppName}User, ${dict.AppName}UserFilter, ${dict.AppName}UserInsight, ${dict.AppName}UserSummary } from "./user.constant";
|
|
7
|
-
import type { UserSignal } from "./user.signal";
|
|
8
|
-
|
|
9
|
-
const modelDictionary = {
|
|
10
|
-
// * ==================== Model ==================== * //
|
|
11
|
-
// * ==================== Model ==================== * //
|
|
12
|
-
// * ==================== Insight ==================== * //
|
|
13
|
-
// * ==================== Insight ==================== * //
|
|
14
|
-
// * ==================== Filter ==================== * //
|
|
15
|
-
// * ==================== Filter ==================== * //
|
|
16
|
-
// * ==================== Etc ==================== * //
|
|
17
|
-
// * ==================== Etc ==================== * //
|
|
18
|
-
} satisfies ExtendModelDictionary<${dict.AppName}User, ${dict.AppName}UserInsight, ${dict.AppName}UserFilter>;
|
|
19
|
-
|
|
20
|
-
export const userSummaryDictionary = {} satisfies SummaryDictionary<${dict.AppName}UserSummary>;
|
|
21
|
-
|
|
22
|
-
const signalDictionary = {
|
|
23
|
-
// * ==================== Endpoint ==================== * //
|
|
24
|
-
// * ==================== Endpoint ==================== * //
|
|
25
|
-
} satisfies SignalDictionary<UserSignal, ${dict.AppName}User>;
|
|
26
|
-
|
|
27
|
-
export const userDictionary = { ...modelDictionary, ...signalDictionary };
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
getContent as default
|
|
32
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.document.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { beyond, by, Database, into, type SchemaOf } from "@akanjs/document";
|
|
5
|
-
|
|
6
|
-
import { rootUser } from "../__lib/lib.document";
|
|
7
|
-
import { cnst } from "../cnst";
|
|
8
|
-
|
|
9
|
-
@Database.Input(() => cnst.UserInput)
|
|
10
|
-
export class UserInput extends by(rootUser.Input, cnst.UserInput) {}
|
|
11
|
-
|
|
12
|
-
@Database.Document(() => cnst.User)
|
|
13
|
-
export class User extends by(rootUser.Doc, cnst.User) {}
|
|
14
|
-
|
|
15
|
-
@Database.Model(() => cnst.User)
|
|
16
|
-
export class UserModel extends into(User, cnst.userCnst) {
|
|
17
|
-
async getSummary(): Promise<cnst.UserSummary> {
|
|
18
|
-
return {
|
|
19
|
-
...(await this.getDefaultSummary()),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@Database.Middleware(() => cnst.User)
|
|
25
|
-
export class UserMiddleware extends beyond(UserModel, User) {
|
|
26
|
-
onSchema(schema: SchemaOf<UserModel, User>) {
|
|
27
|
-
//
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
getContent as default
|
|
34
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.service.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { ExtendedUserService, Service } from "@akanjs/service";
|
|
5
|
-
|
|
6
|
-
import { LibUserService } from "../__lib/lib.service";
|
|
7
|
-
import { cnst } from "../cnst";
|
|
8
|
-
import * as db from "../db";
|
|
9
|
-
|
|
10
|
-
@Service("UserService")
|
|
11
|
-
export class UserService extends ExtendedUserService(db.userDb, LibUserService) {
|
|
12
|
-
async summarize${dict.AppName}(): Promise<cnst.${dict.AppName}UserSummary> {
|
|
13
|
-
return {
|
|
14
|
-
...(await this.userModel.getSummary()),
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
getContent as default
|
|
22
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.signal.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return `
|
|
4
|
-
import { LogSignal, Signal } from "@akanjs/signal";
|
|
5
|
-
|
|
6
|
-
import { cnst, Srvs } from "../cnst";
|
|
7
|
-
|
|
8
|
-
@Signal(() => cnst.User)
|
|
9
|
-
export class UserSignal extends LogSignal(Srvs) {}
|
|
10
|
-
`;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
getContent as default
|
|
14
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.signal.spec.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return `
|
|
4
|
-
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
5
|
-
import * as userSpec from "@shared/lib/user/user.signal.spec";
|
|
6
|
-
|
|
7
|
-
import { cnst } from "../cnst";
|
|
8
|
-
import { fetch } from "../fetch";
|
|
9
|
-
|
|
10
|
-
export * from "@shared/lib/user/user.signal.spec";
|
|
11
|
-
export type UserAgent = userSpec.UserAgent<typeof fetch, cnst.User, cnst.UserInput>;
|
|
12
|
-
export type AdminAgent = adminSpec.AdminAgent<typeof fetch>;
|
|
13
|
-
`;
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
getContent as default
|
|
17
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.signal.test.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import * as userSpec from "@${dict.appName}/lib/user/user.signal.spec";
|
|
5
|
-
|
|
6
|
-
describe("User Signal", () => {
|
|
7
|
-
describe("Sign", () => {
|
|
8
|
-
let adminAgent: userSpec.AdminAgent;
|
|
9
|
-
let userAgent: userSpec.UserAgent;
|
|
10
|
-
it("can signup", async () => {
|
|
11
|
-
//
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
`;
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
getContent as default
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/app/lib/user/user.store.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return `
|
|
4
|
-
import { stateOf, Store } from "@akanjs/store";
|
|
5
|
-
|
|
6
|
-
import { cnst } from "../cnst";
|
|
7
|
-
import { fetch, userGql } from "../fetch";
|
|
8
|
-
|
|
9
|
-
@Store(() => cnst.User)
|
|
10
|
-
export class UserStore extends stateOf(userGql, {
|
|
11
|
-
self: fetch.defaultUser as cnst.User,
|
|
12
|
-
}) {
|
|
13
|
-
//
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
getContent as default
|
|
19
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/lib/__lib/extends/summary.constant.ts
|
|
2
|
-
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
3
|
-
function getContent(scanInfo, dict = {}) {
|
|
4
|
-
if (!scanInfo)
|
|
5
|
-
return null;
|
|
6
|
-
const databaseModules = scanInfo.getDatabaseModules();
|
|
7
|
-
const databaseModulesExceptExtends = databaseModules.filter(
|
|
8
|
-
(module) => !["summary", "user", "setting"].includes(module)
|
|
9
|
-
);
|
|
10
|
-
const scanResult = scanInfo.getScanResult();
|
|
11
|
-
const hasUser = databaseModules.includes("user");
|
|
12
|
-
const hasSummary = databaseModules.includes("summary");
|
|
13
|
-
const isRootUserLib = !scanResult.akanConfig.rootLib;
|
|
14
|
-
if (!hasSummary)
|
|
15
|
-
return null;
|
|
16
|
-
return `
|
|
17
|
-
${databaseModulesExceptExtends.map((module) => `import { ${capitalize(module)}Summary } from "../../${module}/${module}.constant";`).join("\n")}
|
|
18
|
-
${hasUser ? `import { ${isRootUserLib ? "" : capitalize(scanResult.name)}UserSummary } from "../../user/user.constant";` : ""}
|
|
19
|
-
|
|
20
|
-
export const modelSummaries = [${[...databaseModulesExceptExtends, ...hasUser ? [`${isRootUserLib ? "" : scanResult.name}User`] : []].map((module) => `${capitalize(module)}Summary`).join(", ")}] as const;
|
|
21
|
-
`;
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
getContent as default
|
|
25
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/lib/cnst_.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
if (!scanInfo)
|
|
4
|
-
return null;
|
|
5
|
-
const databaseModules = scanInfo.getDatabaseModules();
|
|
6
|
-
const scalarModules = scanInfo.getScalarModules();
|
|
7
|
-
const rootLib = scanInfo.akanConfig.rootLib;
|
|
8
|
-
return `
|
|
9
|
-
import { cnstOf } from "@akanjs/constant";
|
|
10
|
-
|
|
11
|
-
${rootLib ? `import { root } from "./__lib/lib.constant";` : ""}
|
|
12
|
-
${databaseModules.map((module) => `import * as ${module} from "./${module}/${module}.constant";`).join("\n")}
|
|
13
|
-
|
|
14
|
-
export * from "./__lib/lib.constant";
|
|
15
|
-
${databaseModules.map((module) => `export * from "./${module}/${module}.constant";`).join("\n")}
|
|
16
|
-
${scalarModules.map((module) => `export * from "./__scalar/${module}/${module}.constant";`).join("\n")}
|
|
17
|
-
|
|
18
|
-
${databaseModules.map((module) => {
|
|
19
|
-
const names = {
|
|
20
|
-
Module: module.charAt(0).toUpperCase() + module.slice(1)
|
|
21
|
-
};
|
|
22
|
-
if (module === "setting" || module === "summary")
|
|
23
|
-
return `export const ${module}Cnst = cnstOf("${module}" as const, ${module}.${names.Module}Input, ${module}.${names.Module}, ${module}.Light${names.Module}, ${rootLib ? "root" : module}.${names.Module}Insight, ${rootLib ? "root" : module}.${names.Module}Filter);`;
|
|
24
|
-
else
|
|
25
|
-
return `export const ${module}Cnst = cnstOf("${module}" as const, ${module}.${names.Module}Input, ${module}.${names.Module}, ${module}.Light${names.Module}, ${module}.${names.Module}Insight, ${module}.${names.Module}Filter, ${module}.${names.Module}Summary);`;
|
|
26
|
-
}).join("\n")}
|
|
27
|
-
`;
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
getContent as default
|
|
31
|
-
};
|