@akanjs/cli 0.9.43 → 0.9.45
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 +46 -46
- 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.instruction.md +1 -1
- 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__.service.js +2 -5
- package/cjs/src/templates/app/lib/___appName__/__appName__.signal.js +2 -2
- 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__.constant.js +0 -6
- package/cjs/src/templates/module/__model__.dictionary.js +1 -14
- package/cjs/src/templates/module/__model__.document.js +1 -1
- package/cjs/src/templates/module/__model__.service.js +1 -1
- 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/esm/index.js +47 -47
- 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.instruction.md +1 -1
- 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__.service.js +2 -5
- package/esm/src/templates/app/lib/___appName__/__appName__.signal.js +2 -2
- 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__.constant.js +0 -6
- package/esm/src/templates/module/__model__.dictionary.js +1 -14
- package/esm/src/templates/module/__model__.document.js +1 -1
- package/esm/src/templates/module/__model__.service.js +1 -1
- 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/package.json +1 -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 -1
- 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/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 -40
- 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 -48
- package/cjs/src/templates/app/lib/user/User.View.js +0 -64
- package/cjs/src/templates/app/lib/user/User.Zone.js +0 -49
- 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 -48
- package/cjs/src/templates/app/lib/user/user.service.js +0 -36
- package/cjs/src/templates/app/lib/user/user.signal.js +0 -34
- 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 -54
- package/cjs/src/templates/lib/fetch.js +0 -48
- package/cjs/src/templates/lib/store.js +0 -49
- 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 -40
- 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 -48
- package/cjs/src/templates/libRoot/lib/user/User.View.js +0 -64
- package/cjs/src/templates/libRoot/lib/user/User.Zone.js +0 -50
- 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 -48
- package/cjs/src/templates/libRoot/lib/user/user.service.js +0 -36
- 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/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 -20
- 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 -28
- package/esm/src/templates/app/lib/user/User.View.js +0 -44
- package/esm/src/templates/app/lib/user/User.Zone.js +0 -29
- 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 -28
- package/esm/src/templates/app/lib/user/user.service.js +0 -16
- 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 -34
- package/esm/src/templates/lib/fetch.js +0 -28
- package/esm/src/templates/lib/store.js +0 -29
- 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 -20
- 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 -28
- package/esm/src/templates/libRoot/lib/user/User.View.js +0 -44
- package/esm/src/templates/libRoot/lib/user/User.Zone.js +0 -30
- 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 -28
- package/esm/src/templates/libRoot/lib/user/user.service.js +0 -16
- 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/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.constant.d.ts +0 -7
- 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
|
@@ -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,34 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/lib/cnst_.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 scalarModules = scanInfo.getScalarModules();
|
|
8
|
-
const rootLib = scanInfo.akanConfig.rootLib;
|
|
9
|
-
return `
|
|
10
|
-
import { cnstOf, scalarCnstOf } from "@akanjs/constant";
|
|
11
|
-
|
|
12
|
-
${rootLib ? `import { root } from "./__lib/lib.constant";` : ""}
|
|
13
|
-
${databaseModules.map((module) => `import * as ${module} from "./${module}/${module}.constant";`).join("\n")}
|
|
14
|
-
${scalarModules.map((module) => `import { ${capitalize(module)} } from "./__scalar/${module}/${module}.constant";`).join("\n")}
|
|
15
|
-
|
|
16
|
-
export * from "./__lib/lib.constant";
|
|
17
|
-
${databaseModules.map((module) => `export * from "./${module}/${module}.constant";`).join("\n")}
|
|
18
|
-
${scalarModules.map((module) => `export * from "./__scalar/${module}/${module}.constant";`).join("\n")}
|
|
19
|
-
|
|
20
|
-
${databaseModules.map((module) => {
|
|
21
|
-
const names = {
|
|
22
|
-
Module: capitalize(module)
|
|
23
|
-
};
|
|
24
|
-
if (module === "setting" || module === "summary")
|
|
25
|
-
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);`;
|
|
26
|
-
else
|
|
27
|
-
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);`;
|
|
28
|
-
}).join("\n")}
|
|
29
|
-
${scalarModules.map((module) => `export const ${module}Cnst = scalarCnstOf("${module}" as const, ${capitalize(module)});`).join("\n")}
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
getContent as default
|
|
34
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/lib/fetch.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.database.entries()].filter(([_, files]) => files.has("signal")).map(([module]) => module);
|
|
7
|
-
const scalarConstantModules = [...scanInfo.scalar.entries()].filter(([_, files]) => files.has("constant")).map(([module]) => module);
|
|
8
|
-
const serviceModules = [...scanInfo.service.entries()].filter(([_, files]) => files.has("signal")).map(([module]) => module);
|
|
9
|
-
return `
|
|
10
|
-
import { fetchOf, gqlOf, makeFetch, scalarUtilOf } from "@akanjs/signal";
|
|
11
|
-
|
|
12
|
-
import { root, libFetches } from "./__lib/lib.signal";
|
|
13
|
-
import { cnst } from "./cnst";
|
|
14
|
-
import * as sig from "./sig";
|
|
15
|
-
|
|
16
|
-
${databaseModules.map((module) => `${["user", "setting", "summary"].includes(module) ? "export " : ""}const ${module}Gql = gqlOf(cnst.${module}Cnst, sig.${capitalize(module)}Signal${scanInfo.name !== "shared" && ["user", "setting", "summary"].includes(module) ? `, { overwrite: root.${module}Gql }` : ""});`).join("\n")}
|
|
17
|
-
|
|
18
|
-
export const fetch = makeFetch(...libFetches, {
|
|
19
|
-
${databaseModules.map((module) => `...${module}Gql,`).join("\n")}
|
|
20
|
-
${scalarConstantModules.map((module) => `...scalarUtilOf(cnst.${module}Cnst),`).join("\n")}
|
|
21
|
-
${serviceModules.map((module) => `...fetchOf(sig.${capitalize(module)}Signal),`).join("\n")}
|
|
22
|
-
${databaseModules.map((module) => `${module}Gql,`).join("\n")}
|
|
23
|
-
});
|
|
24
|
-
`;
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
getContent as default
|
|
28
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/lib/store.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 names = {
|
|
7
|
-
name: scanInfo.name,
|
|
8
|
-
Name: capitalize(scanInfo.name)
|
|
9
|
-
};
|
|
10
|
-
const databaseModules = [...scanInfo.database.entries()].filter(([_, fileTypes]) => fileTypes.has("store")).map(([key]) => key);
|
|
11
|
-
const serviceModules = [...scanInfo.service.entries()].filter(([_, fileTypes]) => fileTypes.has("store")).map(([key]) => key);
|
|
12
|
-
return `
|
|
13
|
-
"use client";
|
|
14
|
-
import { MixStore, rootStoreOf } from "@akanjs/store";
|
|
15
|
-
|
|
16
|
-
import { libStores } from "./__lib/lib.store";
|
|
17
|
-
${databaseModules.map((module) => `import { ${capitalize(module)}Store } from "./${module}/${module}.store";`).join("\n")}
|
|
18
|
-
${serviceModules.map((module) => `import { ${capitalize(module)}Store } from "./_${module}/${module}.store";`).join("\n")}
|
|
19
|
-
export class RootStore extends MixStore(
|
|
20
|
-
...libStores,
|
|
21
|
-
${[...databaseModules, ...serviceModules].map((module) => `${capitalize(module)}Store`).join(",\n ")}
|
|
22
|
-
) {}
|
|
23
|
-
|
|
24
|
-
export const store = rootStoreOf(RootStore);
|
|
25
|
-
`;
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
getContent as default
|
|
29
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Template.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Setting.Template.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { clsx } from "@akanjs/client";
|
|
8
|
-
import { st, usePage } from "@${dict.libName}/client";
|
|
9
|
-
|
|
10
|
-
interface GeneralProps {
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const General = ({ className }: GeneralProps) => {
|
|
15
|
-
const settingForm = st.use.settingForm();
|
|
16
|
-
const { l } = usePage();
|
|
17
|
-
return <div className={clsx("", className)}></div>; // update your UI here
|
|
18
|
-
};
|
|
19
|
-
`
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
getContent as default
|
|
24
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Unit.tsx
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Setting.Unit.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
import { clsx, ModelProps } from "@akanjs/client";
|
|
7
|
-
|
|
8
|
-
import { cnst } from "../cnst";
|
|
9
|
-
|
|
10
|
-
export const Card = ({ className, setting }: ModelProps<"setting", cnst.LightSetting>) => {
|
|
11
|
-
return <div className={clsx("", className)}>{setting.id}</div>; // update your UI here
|
|
12
|
-
};
|
|
13
|
-
`
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
getContent as default
|
|
18
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Util.tsx
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Setting.Util.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { clsx } from "@akanjs/client";
|
|
8
|
-
|
|
9
|
-
interface CustomUtilProps {
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
export const CustomUtil = ({ className }: CustomUtilProps) => {
|
|
13
|
-
return <div className={clsx("", className)}></div>; // update your UI here
|
|
14
|
-
};
|
|
15
|
-
`
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
getContent as default
|
|
20
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.View.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Setting.View.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
import { clsx } from "@akanjs/client";
|
|
7
|
-
import { usePage } from "@${dict.libName}/client";
|
|
8
|
-
|
|
9
|
-
import { cnst } from "../cnst";
|
|
10
|
-
|
|
11
|
-
interface SettingViewProps {
|
|
12
|
-
className?: string;
|
|
13
|
-
setting: cnst.Setting;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const General = ({ className, setting }: SettingViewProps) => {
|
|
17
|
-
const { l } = usePage();
|
|
18
|
-
return (
|
|
19
|
-
<div className={clsx("", className)}>
|
|
20
|
-
{setting.id}
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
};`
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
getContent as default
|
|
28
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Zone.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Setting.Zone.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { ModelsProps } from "@akanjs/client";
|
|
8
|
-
import { cnst, Setting, st, usePage } from "@${dict.libName}/client";
|
|
9
|
-
import { Model } from "@akanjs/ui";
|
|
10
|
-
import { Loading } from "@akanjs/ui";
|
|
11
|
-
import { useEffect } from "react";
|
|
12
|
-
import { AiOutlineEdit } from "react-icons/ai";
|
|
13
|
-
|
|
14
|
-
export const Admin = ({ sliceName = "setting" }: ModelsProps<cnst.Setting>) => {
|
|
15
|
-
const { l } = usePage();
|
|
16
|
-
const setting = st.use.setting();
|
|
17
|
-
const settingModal = st.use.settingModal();
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
void st.do.getActiveSetting();
|
|
20
|
-
}, []);
|
|
21
|
-
if (!setting) return <Loading.Skeleton active />;
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div>
|
|
25
|
-
<div className="my-2 flex items-center gap-4 text-3xl">
|
|
26
|
-
{l("setting.modelName")}
|
|
27
|
-
{settingModal ? null : (
|
|
28
|
-
<button className="btn btn-sm" onClick={() => st.do.editSetting(setting.id)}>
|
|
29
|
-
<AiOutlineEdit /> {l("shared.edit")}
|
|
30
|
-
</button>
|
|
31
|
-
)}
|
|
32
|
-
</div>
|
|
33
|
-
{settingModal === "edit" ? (
|
|
34
|
-
<Model.EditModal
|
|
35
|
-
sliceName="setting"
|
|
36
|
-
type="form"
|
|
37
|
-
onCancel={() => {
|
|
38
|
-
st.do.resetSetting(setting);
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
<Setting.Template.General />
|
|
42
|
-
</Model.EditModal>
|
|
43
|
-
) : (
|
|
44
|
-
<Setting.View.General setting={setting} />
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
`
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
getContent as default
|
|
54
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/setting.constant.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { from, Model, via } from "@akanjs/constant";
|
|
5
|
-
|
|
6
|
-
import { libSettingInputs, libSettings, root } from "../__lib/lib.constant";
|
|
7
|
-
|
|
8
|
-
@Model.Input("${dict.LibName}SettingInput")
|
|
9
|
-
export class ${dict.LibName}SettingInput {}
|
|
10
|
-
|
|
11
|
-
@Model.Input("SettingInput")
|
|
12
|
-
export class SettingInput extends from(...libSettingInputs, ${dict.LibName}SettingInput) {}
|
|
13
|
-
|
|
14
|
-
@Model.Object("SettingObject")
|
|
15
|
-
export class SettingObject extends from(...libSettings, SettingInput) {}
|
|
16
|
-
|
|
17
|
-
@Model.Light("LightSetting")
|
|
18
|
-
export class LightSetting extends via(SettingObject, ["status"] as const) {}
|
|
19
|
-
|
|
20
|
-
@Model.Full("Setting")
|
|
21
|
-
export class Setting extends via(SettingObject, LightSetting, root.Setting, root.LightSetting) {}
|
|
22
|
-
`;
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
getContent as default
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/setting.dictionary.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { ExtendModelDictionary, SignalDictionary } from "@akanjs/dictionary";
|
|
5
|
-
|
|
6
|
-
import type { ${dict.LibName}SettingInput } from "./setting.constant";
|
|
7
|
-
import type { SettingSignal } from "./setting.signal";
|
|
8
|
-
|
|
9
|
-
const modelDictionary = {
|
|
10
|
-
// * ==================== Model ==================== * //
|
|
11
|
-
// * ==================== Model ==================== * //
|
|
12
|
-
// * ==================== Etc ==================== * //
|
|
13
|
-
// * ==================== Etc ==================== * //
|
|
14
|
-
} satisfies ExtendModelDictionary<${dict.LibName}SettingInput>;
|
|
15
|
-
|
|
16
|
-
const signalDictionary = {
|
|
17
|
-
// * ==================== Endpoint ==================== * //
|
|
18
|
-
// * ==================== Endpoint ==================== * //
|
|
19
|
-
} satisfies SignalDictionary<SettingSignal, ${dict.LibName}SettingInput>;
|
|
20
|
-
|
|
21
|
-
export const settingDictionary = { ...modelDictionary, ...signalDictionary };
|
|
22
|
-
`;
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
getContent as default
|
|
26
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/setting.document.ts
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return `
|
|
4
|
-
import { beyond, by, Database, into, type SchemaOf } from "@akanjs/document";
|
|
5
|
-
|
|
6
|
-
import { rootSetting } from "../__lib/lib.document";
|
|
7
|
-
import { cnst } from "../cnst";
|
|
8
|
-
|
|
9
|
-
@Database.Input(() => cnst.SettingInput)
|
|
10
|
-
export class SettingInput extends by(rootSetting.Input, cnst.SettingInput) {}
|
|
11
|
-
|
|
12
|
-
@Database.Document(() => cnst.Setting)
|
|
13
|
-
export class Setting extends by(rootSetting.Doc, cnst.Setting) {}
|
|
14
|
-
|
|
15
|
-
@Database.Model(() => cnst.Setting)
|
|
16
|
-
export class SettingModel extends into(Setting, cnst.settingCnst) {}
|
|
17
|
-
|
|
18
|
-
@Database.Middleware(() => cnst.Setting)
|
|
19
|
-
export class SettingMiddleware extends beyond(SettingModel, Setting) {
|
|
20
|
-
onSchema(schema: SchemaOf<SettingModel, Setting>) {
|
|
21
|
-
//
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
getContent as default
|
|
28
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/setting.service.ts
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return `
|
|
4
|
-
import { ExtendedSettingService, Service } from "@akanjs/service";
|
|
5
|
-
|
|
6
|
-
import { LibSettingService } from "../__lib/lib.service";
|
|
7
|
-
import * as db from "../db";
|
|
8
|
-
|
|
9
|
-
@Service("SettingService")
|
|
10
|
-
export class SettingService extends ExtendedSettingService(db.settingDb, LibSettingService) {
|
|
11
|
-
//
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
getContent as default
|
|
17
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/setting.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.Setting)
|
|
9
|
-
export class SettingSignal extends LogSignal(Srvs) {}
|
|
10
|
-
`;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
getContent as default
|
|
14
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/setting.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, settingGql } from "../fetch";
|
|
8
|
-
|
|
9
|
-
@Store(() => cnst.Setting)
|
|
10
|
-
export class SettingStore extends stateOf(settingGql, {
|
|
11
|
-
// state
|
|
12
|
-
}) {
|
|
13
|
-
async getActiveSetting() {
|
|
14
|
-
this.set({ setting: (await fetch.getActiveSetting()) as cnst.Setting, settingLoading: false });
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
getContent as default
|
|
21
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Template.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Summary.Template.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { clsx } from "@akanjs/client";
|
|
8
|
-
import { st, usePage } from "@${dict.libName}/client";
|
|
9
|
-
|
|
10
|
-
interface SummaryEditProps {
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const General = ({ className }: SummaryEditProps) => {
|
|
15
|
-
const summaryForm = st.use.summaryForm();
|
|
16
|
-
const { l } = usePage();
|
|
17
|
-
return <div className={clsx("", className)}></div>; // update your UI here
|
|
18
|
-
};
|
|
19
|
-
`
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
getContent as default
|
|
24
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Unit.tsx
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Summary.Unit.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
import { clsx, ModelProps } from "@akanjs/client";
|
|
7
|
-
import { cnst } from "@${dict.libName}/client";
|
|
8
|
-
|
|
9
|
-
export const Card = ({ className, summary }: ModelProps<"summary", cnst.LightSummary>) => {
|
|
10
|
-
return <div className={clsx("", className)}>{summary.id}</div>; // update your UI here
|
|
11
|
-
};
|
|
12
|
-
`
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
getContent as default
|
|
17
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Util.tsx
|
|
2
|
-
function getContent(scanInfo, dict = {}) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Summary.Util.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { clsx } from "@akanjs/client";
|
|
8
|
-
|
|
9
|
-
interface CustomUtilProps {
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
export const CustomUtil = ({ className }: CustomUtilProps) => {
|
|
13
|
-
return <div className={clsx("", className)}></div>; // update your UI here
|
|
14
|
-
};
|
|
15
|
-
`
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
getContent as default
|
|
20
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.View.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Summary.View.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
import { cnst, usePage } from "@${dict.libName}/client";
|
|
7
|
-
import { clsx } from "@akanjs/client";
|
|
8
|
-
|
|
9
|
-
interface SummaryViewProps {
|
|
10
|
-
className?: string;
|
|
11
|
-
summary: cnst.Summary;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const General = ({ className, summary }: SummaryViewProps) => {
|
|
15
|
-
const { l } = usePage();
|
|
16
|
-
return (
|
|
17
|
-
<div className={clsx("", className)}>
|
|
18
|
-
{summary.id}
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
`
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
getContent as default
|
|
27
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/lib/summary/Summary.Zone.tsx
|
|
2
|
-
function getContent(scanInfo, dict) {
|
|
3
|
-
return {
|
|
4
|
-
filename: "Summary.Zone.tsx",
|
|
5
|
-
content: `
|
|
6
|
-
"use client";
|
|
7
|
-
import { st, Summary } from "@${dict.libName}/client";
|
|
8
|
-
import { Loading } from "@akanjs/ui";
|
|
9
|
-
|
|
10
|
-
export const Dashboard = () => {
|
|
11
|
-
const summary = st.use.summary();
|
|
12
|
-
if (!summary) return <Loading.Skeleton active />;
|
|
13
|
-
return <Summary.View.General summary={summary} />;
|
|
14
|
-
};
|
|
15
|
-
`
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
getContent as default
|
|
20
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// pkgs/@akanjs/cli/src/templates/libRoot/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.LibName}Summary")
|
|
10
|
-
export class ${dict.LibName}Summary extends over(...modelSummaries) {}
|
|
11
|
-
|
|
12
|
-
export class SummaryObject extends from(...libSummaries, ${dict.LibName}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/libRoot/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.LibName}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.LibName}Summary>;
|
|
18
|
-
|
|
19
|
-
const signalDictionary = {
|
|
20
|
-
// * ==================== Endpoint ==================== * //
|
|
21
|
-
// * ==================== Endpoint ==================== * //
|
|
22
|
-
} satisfies SignalDictionary<SummarySignal, ${dict.LibName}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/libRoot/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/libRoot/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
|
-
};
|