@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
|
@@ -22,28 +22,38 @@ __export(lib_constant_exports, {
|
|
|
22
22
|
default: () => getContent
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(lib_constant_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
25
26
|
function getContent(scanInfo, dict = {}) {
|
|
26
27
|
if (!scanInfo)
|
|
27
28
|
return null;
|
|
28
29
|
const scanResult = scanInfo.getScanResult();
|
|
29
30
|
const libs = scanResult.akanConfig.libs;
|
|
30
31
|
const libInfos = scanInfo.getLibInfos();
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const extendedModels = Object.fromEntries(
|
|
33
|
+
[...scanInfo.file.constant.databases].map(
|
|
34
|
+
(modelName) => [
|
|
35
|
+
modelName,
|
|
36
|
+
[...libInfos.values()].filter((libInfo) => libInfo.file.constant.databases.has(modelName)).map((libInfo) => libInfo.name)
|
|
37
|
+
]
|
|
38
|
+
).filter(([_, libNames]) => libNames.length > 0)
|
|
39
|
+
);
|
|
34
40
|
return `
|
|
35
41
|
${libs.map((lib) => `import { cnst as ${lib} } from "@${lib}";`).join("\n")}
|
|
36
42
|
|
|
37
43
|
${libs.map((lib) => `export { cnst as ${lib} } from "@${lib}";`).join("\n")}
|
|
38
44
|
|
|
39
|
-
${
|
|
40
|
-
|
|
41
|
-
export const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
${Object.entries(extendedModels).map(([modelName, extendedModels2]) => {
|
|
46
|
+
const ModelName = capitalize(modelName);
|
|
47
|
+
return `export const ${modelName} = {
|
|
48
|
+
inputs: [${extendedModels2.map((libName) => `${libName}.${ModelName}Input`).join(", ")}] as const,
|
|
49
|
+
objects: [${extendedModels2.map((libName) => `${libName}.${ModelName}Object`).join(", ")}] as const,
|
|
50
|
+
lights: [${extendedModels2.map((libName) => `${libName}.Light${ModelName}`).join(", ")}] as const,
|
|
51
|
+
models: [${extendedModels2.map((libName) => `${libName}.${ModelName}`).join(", ")}] as const,
|
|
52
|
+
insights: [${extendedModels2.map((libName) => `${libName}.${ModelName}Insight`).join(", ")}] as const,
|
|
53
|
+
filters: [${extendedModels2.map((libName) => `${libName}.${ModelName}Filter`).join(", ")}] as const,
|
|
54
|
+
}`;
|
|
55
|
+
}).join("\n")}
|
|
56
|
+
|
|
57
|
+
export const allLibs = [${libs.join(", ")}] as const;
|
|
48
58
|
`;
|
|
49
59
|
}
|
|
@@ -25,18 +25,25 @@ module.exports = __toCommonJS(lib_dictionary_exports);
|
|
|
25
25
|
function getContent(scanInfo, dict = {}) {
|
|
26
26
|
if (!scanInfo)
|
|
27
27
|
return null;
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
28
|
+
const scanResult = scanInfo.getScanResult();
|
|
29
|
+
const libs = scanInfo.akanConfig.libs;
|
|
30
|
+
const libInfos = scanInfo.getLibInfos();
|
|
31
|
+
const extendedModels = Object.fromEntries(
|
|
32
|
+
[...scanInfo.file.dictionary.databases].map(
|
|
33
|
+
(modelName) => [
|
|
34
|
+
modelName,
|
|
35
|
+
[...libInfos.values()].filter((libInfo) => libInfo.file.dictionary.databases.has(modelName)).map((libInfo) => libInfo.name)
|
|
36
|
+
]
|
|
37
|
+
).filter(([_, libNames]) => libNames.length > 0)
|
|
31
38
|
);
|
|
32
39
|
return `
|
|
33
40
|
${libs.length === 0 ? `import { dictionary as base } from "@akanjs/dictionary";` : ""}
|
|
34
|
-
${libs.map((lib) => `import { dictionary as ${lib} } from "@${lib}";`).join("\n")}
|
|
41
|
+
${libs.map((lib) => `import { dictionary as ${lib} } from "@${lib}/server";`).join("\n")}
|
|
35
42
|
|
|
36
|
-
${
|
|
43
|
+
${Object.entries(extendedModels).map(([modelName, extendedModels2]) => {
|
|
44
|
+
return `export const ${modelName} = Object.assign({}, ${extendedModels2.map((libName) => `${libName}.${modelName}`).join(", ")});`;
|
|
45
|
+
}).join("\n")}
|
|
37
46
|
|
|
38
|
-
export const
|
|
39
|
-
|
|
40
|
-
export const libSummaryDictionary = { ${moduleDictionaries.map((module2) => `...${module2}SummaryDictionary`).join(", ")} };
|
|
47
|
+
export const allLibs = [${libs.length === 0 ? "base" : libs.join(", ")}] as const;
|
|
41
48
|
`;
|
|
42
49
|
}
|
|
@@ -26,16 +26,26 @@ function getContent(scanInfo, dict = {}) {
|
|
|
26
26
|
if (!scanInfo)
|
|
27
27
|
return null;
|
|
28
28
|
const libs = scanInfo.getLibs();
|
|
29
|
-
const
|
|
29
|
+
const libInfos = [...scanInfo.getLibInfos().values()];
|
|
30
|
+
const extendedModels = Object.fromEntries(
|
|
31
|
+
[...scanInfo.file.document.databases].map(
|
|
32
|
+
(modelName) => [
|
|
33
|
+
modelName,
|
|
34
|
+
libInfos.filter((libInfo) => libInfo.file.document.databases.has(modelName)).map((libInfo) => libInfo.name)
|
|
35
|
+
]
|
|
36
|
+
).filter(([_, libNames]) => libNames.length > 0)
|
|
37
|
+
);
|
|
30
38
|
return `
|
|
31
39
|
${libs.map((lib) => `import { db as ${lib} } from "@${lib}/server";`).join("\n")}
|
|
32
|
-
|
|
33
40
|
${libs.map((lib) => `export { db as ${lib} } from "@${lib}/server";`).join("\n")}
|
|
34
41
|
|
|
35
|
-
${
|
|
36
|
-
|
|
37
|
-
${
|
|
38
|
-
${
|
|
39
|
-
|
|
42
|
+
${Object.entries(extendedModels).map(
|
|
43
|
+
([modelName, extendedModels2]) => `export const ${modelName} = {
|
|
44
|
+
inputs: [${extendedModels2.map((libName) => `${libName}.${modelName}Db.Input`).join(", ")}] as const,
|
|
45
|
+
docs: [${extendedModels2.map((libName) => `${libName}.${modelName}Db.Doc`).join(", ")}] as const,
|
|
46
|
+
models: [${extendedModels2.map((libName) => `${libName}.${modelName}Db.Model`).join(", ")}] as const,
|
|
47
|
+
}`
|
|
48
|
+
).join("\n")}
|
|
49
|
+
export const allLibs = [${libs.join(", ")}] as const;
|
|
40
50
|
`;
|
|
41
51
|
}
|
|
@@ -28,16 +28,16 @@ function getContent(scanInfo, dict = {}) {
|
|
|
28
28
|
return null;
|
|
29
29
|
const libs = scanInfo.getLibs();
|
|
30
30
|
const libInfos = [...scanInfo.getLibInfos().values()];
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
const extendedModels = Object.fromEntries(
|
|
32
|
+
[...scanInfo.file.service.databases].map(
|
|
33
|
+
(modelName) => [
|
|
34
|
+
modelName,
|
|
35
|
+
libInfos.filter((libInfo) => libInfo.file.service.databases.has(modelName)).map((libInfo) => libInfo.name)
|
|
36
|
+
]
|
|
37
|
+
).filter(([_, libNames]) => libNames.length > 0)
|
|
35
38
|
);
|
|
36
|
-
const userLibInfos = libInfos.filter((libInfo) => libInfo.database.has("user"));
|
|
37
|
-
const settingLibInfos = libInfos.filter((libInfo) => libInfo.database.has("setting"));
|
|
38
|
-
const summaryLibInfos = libInfos.filter((libInfo) => libInfo.database.has("summary"));
|
|
39
39
|
return `
|
|
40
|
-
${libs.length ?
|
|
40
|
+
${libs.length ? `import { DbService, Srv } from "@akanjs/service";` : `import type { BackendEnv } from "@akanjs/base";`}
|
|
41
41
|
${libs.map((lib) => `import { option as ${lib}Option, srv as ${lib} } from "@${lib}/server";`).join("\n")}
|
|
42
42
|
|
|
43
43
|
import * as db from "../db";
|
|
@@ -45,34 +45,15 @@ import type * as srv from "../srv";
|
|
|
45
45
|
|
|
46
46
|
${libs.map((lib) => `export { srv as ${lib} } from "@${lib}/server";`).join("\n")}
|
|
47
47
|
|
|
48
|
-
${
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
${Object.entries(extendedModels).map(([modelName, extendedModels2]) => {
|
|
49
|
+
const ModelName = capitalize(modelName);
|
|
50
|
+
return `export const ${modelName} = {
|
|
51
|
+
services: [${extendedModels2.map((libName) => `${libName}.${ModelName}Service`).join(", ")}] as const,
|
|
52
|
+
}`;
|
|
53
|
+
}).join("\n")}
|
|
51
54
|
|
|
52
55
|
export const libAllSrvs = { ${libs.map((lib) => `...${lib}.allSrvs`).join(", ")} };
|
|
53
56
|
|
|
54
57
|
export type LibOptions = ${libs.length ? libs.map((lib) => `${lib}Option.ModulesOptions`).join(" & ") : "BackendEnv"};
|
|
55
|
-
${libs.length ? `
|
|
56
|
-
export class ProtoSummaryService extends ${libInfosHasSummary.length ? "ExtendedSummaryService(db.summaryDb, LibSummaryService)" : "DbService(db.summaryDb)"} {
|
|
57
|
-
@Srv() protected readonly userService: srv.UserService;
|
|
58
|
-
${databaseModulesWithoutExtendModels.map((module2) => ` @Srv() protected readonly ${module2}Service: srv.${capitalize(module2)}Service;`).join("\n")}
|
|
59
|
-
|
|
60
|
-
async get${capitalize(scanInfo.name)}Summary() {
|
|
61
|
-
return {
|
|
62
|
-
${databaseModulesWithoutExtendModels.map((module2) => ` ...(await this.${module2}Service.summarize()),`).join("\n")}
|
|
63
|
-
...(await this.userService.summarize()),
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
${scanInfo.exec.type === "app" ? `
|
|
67
|
-
async makeSummary(archiveType: "periodic" | "non-periodic" = "non-periodic"): Promise<db.Summary> {
|
|
68
|
-
const summary = {
|
|
69
|
-
${libInfosHasSummary.map((libInfo) => ` ...(await this.get${capitalize(libInfo.name)}Summary()),`).join("\n")}
|
|
70
|
-
...(await this.get${capitalize(scanInfo.name)}Summary()),
|
|
71
|
-
};
|
|
72
|
-
return (await this.summaryModel.archive(archiveType, summary)) as unknown as db.Summary;
|
|
73
|
-
}
|
|
74
|
-
` : ""}
|
|
75
|
-
}
|
|
76
|
-
` : ""}
|
|
77
58
|
`;
|
|
78
59
|
}
|
|
@@ -22,11 +22,29 @@ __export(cnst_exports, {
|
|
|
22
22
|
default: () => getContent
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(cnst_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
25
26
|
function getContent(scanInfo, dict = {}) {
|
|
27
|
+
if (!scanInfo)
|
|
28
|
+
return null;
|
|
29
|
+
const databaseModules = scanInfo.getDatabaseModules();
|
|
30
|
+
const scalarModules = scanInfo.getScalarModules();
|
|
26
31
|
return `
|
|
27
32
|
import type { AllSrvs } from "./srv";
|
|
33
|
+
import { cnstOf, scalarCnstOf } from "@akanjs/constant";
|
|
34
|
+
|
|
35
|
+
${databaseModules.map((module2) => `import * as ${module2} from "./${module2}/${module2}.constant";`).join("\n")}
|
|
36
|
+
${scalarModules.map((module2) => `import { ${capitalize(module2)} } from "./__scalar/${module2}/${module2}.constant";`).join("\n")}
|
|
37
|
+
|
|
38
|
+
export * from "./__lib/lib.constant";
|
|
39
|
+
${databaseModules.map((module2) => `export * from "./${module2}/${module2}.constant";`).join("\n")}
|
|
40
|
+
${scalarModules.map((module2) => `export * from "./__scalar/${module2}/${module2}.constant";`).join("\n")}
|
|
41
|
+
|
|
42
|
+
${databaseModules.map((module2) => {
|
|
43
|
+
const names = { Module: capitalize(module2) };
|
|
44
|
+
return `export const ${module2}Cnst = cnstOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.Light${names.Module}, ${module2}.${names.Module}Insight, ${module2}.${names.Module}Filter);`;
|
|
45
|
+
}).join("\n")}
|
|
46
|
+
${scalarModules.map((module2) => `export const ${module2}Cnst = scalarCnstOf("${module2}" as const, ${capitalize(module2)});`).join("\n")}
|
|
28
47
|
|
|
29
|
-
export * as cnst from "./cnst_";
|
|
30
48
|
export const Srvs = {} as AllSrvs;
|
|
31
49
|
`;
|
|
32
50
|
}
|
|
@@ -27,12 +27,10 @@ function getContent(scanInfo, dict = {}) {
|
|
|
27
27
|
return null;
|
|
28
28
|
const databaseModules = scanInfo.getDatabaseModules();
|
|
29
29
|
const scalarModules = scanInfo.getScalarModules();
|
|
30
|
-
const rootLib = scanInfo.akanConfig.rootLib;
|
|
31
30
|
return `
|
|
32
31
|
import { dbOf } from "@akanjs/document";
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
import { cnst } from "./cnst";
|
|
33
|
+
import * as cnst from "./cnst";
|
|
36
34
|
|
|
37
35
|
${databaseModules.map((module2) => `import * as ${module2} from "./${module2}/${module2}.document";`).join("\n")}
|
|
38
36
|
|
|
@@ -41,13 +39,8 @@ ${databaseModules.map((module2) => `export type * from "./${module2}/${module2}.
|
|
|
41
39
|
${scalarModules.map((module2) => `export type * from "./__scalar/${module2}/${module2}.document";`).join("\n")}
|
|
42
40
|
|
|
43
41
|
${databaseModules.map((module2) => {
|
|
44
|
-
const names = {
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
if (module2 === "setting" || module2 === "summary")
|
|
48
|
-
return `export const ${module2}Db = dbOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.${names.Module}Model, ${module2}.${names.Module}Middleware, cnst.${names.Module}, cnst.${rootLib ? "root." : ""}${names.Module}Insight, cnst.${rootLib ? "root." : ""}${names.Module}Filter);`;
|
|
49
|
-
else
|
|
50
|
-
return `export const ${module2}Db = dbOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.${names.Module}Model, ${module2}.${names.Module}Middleware, cnst.${names.Module}, cnst.${names.Module}Insight, cnst.${names.Module}Filter, cnst.${names.Module}Summary);`;
|
|
42
|
+
const names = { Module: module2.charAt(0).toUpperCase() + module2.slice(1) };
|
|
43
|
+
return `export const ${module2}Db = dbOf("${module2}" as const, ${module2}.${names.Module}Input, ${module2}.${names.Module}, ${module2}.${names.Module}Model, ${module2}.${names.Module}Middleware, cnst.${names.Module}, cnst.${names.Module}Insight, cnst.${names.Module}Filter);`;
|
|
51
44
|
}).join("\n")}
|
|
52
45
|
`;
|
|
53
46
|
}
|
|
@@ -31,12 +31,12 @@ function getContent(scanInfo, dict = {}) {
|
|
|
31
31
|
return `
|
|
32
32
|
import { makeDictionary, makeTrans } from "@akanjs/dictionary";
|
|
33
33
|
|
|
34
|
-
import {
|
|
34
|
+
import { allLibs } from "./__lib/lib.dictionary";
|
|
35
35
|
${databaseModules.map((module2) => `import { ${module2}Dictionary } from "./${module2}/${module2}.dictionary";`).join("\n")}
|
|
36
36
|
${serviceModules.map((module2) => `import { ${module2}Dictionary } from "./_${module2}/${module2}.dictionary";`).join("\n")}
|
|
37
37
|
${scalarModules.map((module2) => `import { ${module2}Dictionary } from "./__scalar/${module2}/${module2}.dictionary";`).join("\n")}
|
|
38
38
|
|
|
39
|
-
export const dictionary = makeDictionary(...
|
|
39
|
+
export const dictionary = makeDictionary(...allLibs, {
|
|
40
40
|
${[...databaseModules, ...scalarModules, ...serviceModules].map((module2) => `${module2}: ${module2}Dictionary`).join(",\n ")}
|
|
41
41
|
} as const);
|
|
42
42
|
|
|
@@ -26,8 +26,28 @@ var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
|
26
26
|
function getContent(scanInfo, dict = {}) {
|
|
27
27
|
if (!scanInfo)
|
|
28
28
|
return null;
|
|
29
|
+
const databaseModules = [...scanInfo.database.entries()].filter(([_, files]) => files.has("signal")).map(([module2]) => module2);
|
|
30
|
+
const scalarConstantModules = [...scanInfo.scalar.entries()].filter(([_, files]) => files.has("constant")).map(([module2]) => module2);
|
|
31
|
+
const serviceModules = [...scanInfo.service.entries()].filter(([_, files]) => files.has("signal")).map(([module2]) => module2);
|
|
29
32
|
return `
|
|
33
|
+
import { fetchOf, gqlOf, makeFetch, scalarUtilOf } from "@akanjs/signal";
|
|
34
|
+
|
|
35
|
+
import { root, libFetches } from "./__lib/lib.signal";
|
|
36
|
+
import * as cnst from "./cnst";
|
|
37
|
+
|
|
38
|
+
${[...scanInfo.database.entries()].filter(([_, files]) => files.has("signal")).map(([module2]) => `import { ${capitalize(module2)}Signal } from "./${module2}/${module2}.signal";`).join("\n")}
|
|
39
|
+
${[...scanInfo.service.entries()].filter(([_, files]) => files.has("signal")).map(([module2]) => `import { ${capitalize(module2)}Signal } from "./_${module2}/${module2}.signal";`).join("\n")}
|
|
40
|
+
|
|
30
41
|
${[...scanInfo.database.entries()].filter(([_, files]) => files.has("signal")).map(([module2]) => `export { ${capitalize(module2)}Signal } from "./${module2}/${module2}.signal";`).join("\n")}
|
|
31
42
|
${[...scanInfo.service.entries()].filter(([_, files]) => files.has("signal")).map(([module2]) => `export { ${capitalize(module2)}Signal } from "./_${module2}/${module2}.signal";`).join("\n")}
|
|
43
|
+
|
|
44
|
+
${databaseModules.map((module2) => `${["user", "setting", "summary"].includes(module2) ? "export " : ""}const ${module2}Gql = gqlOf(cnst.${module2}Cnst, ${capitalize(module2)}Signal${scanInfo.name !== "shared" && ["user", "setting", "summary"].includes(module2) ? `, { overwrite: root.${module2}Gql }` : ""});`).join("\n")}
|
|
45
|
+
|
|
46
|
+
export const fetch = makeFetch(...libFetches, {
|
|
47
|
+
${databaseModules.map((module2) => `...${module2}Gql,`).join("\n")}
|
|
48
|
+
${scalarConstantModules.map((module2) => `...scalarUtilOf(cnst.${module2}Cnst),`).join("\n")}
|
|
49
|
+
${serviceModules.map((module2) => `...fetchOf(${capitalize(module2)}Signal),`).join("\n")}
|
|
50
|
+
${databaseModules.map((module2) => `${module2}Gql,`).join("\n")}
|
|
51
|
+
});
|
|
32
52
|
`;
|
|
33
53
|
}
|
|
@@ -22,15 +22,27 @@ __export(st_exports, {
|
|
|
22
22
|
default: () => getContent
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(st_exports);
|
|
25
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
25
26
|
function getContent(scanInfo, dict = {}) {
|
|
26
27
|
if (!scanInfo)
|
|
27
28
|
return null;
|
|
29
|
+
const databaseModules = [...scanInfo.database.entries()].filter(([_, fileTypes]) => fileTypes.has("store")).map(([key]) => key);
|
|
30
|
+
const serviceModules = [...scanInfo.service.entries()].filter(([_, fileTypes]) => fileTypes.has("store")).map(([key]) => key);
|
|
28
31
|
return `
|
|
29
32
|
"use client";
|
|
30
33
|
import { makeStore, st as baseSt } from "@akanjs/store";
|
|
34
|
+
import { MixStore, rootStoreOf } from "@akanjs/store";
|
|
31
35
|
|
|
32
|
-
import {
|
|
36
|
+
import { libStores } from "./__lib/lib.store";
|
|
37
|
+
${databaseModules.map((module2) => `import { ${capitalize(module2)}Store } from "./${module2}/${module2}.store";`).join("\n")}
|
|
38
|
+
${serviceModules.map((module2) => `import { ${capitalize(module2)}Store } from "./_${module2}/${module2}.store";`).join("\n")}
|
|
33
39
|
|
|
40
|
+
export class RootStore extends MixStore(
|
|
41
|
+
...libStores,
|
|
42
|
+
${[...databaseModules, ...serviceModules].map((module2) => `${capitalize(module2)}Store`).join(",\n ")}
|
|
43
|
+
) {}
|
|
44
|
+
|
|
45
|
+
export const store = rootStoreOf(RootStore);
|
|
34
46
|
export const st = makeStore(baseSt, store${scanInfo.type === "lib" ? `, { library: true }` : ""});
|
|
35
47
|
`;
|
|
36
48
|
}
|
|
@@ -26,8 +26,8 @@ function getContent(scanInfo, dict = {}) {
|
|
|
26
26
|
return `
|
|
27
27
|
import { makePageProto } from "@akanjs/next";
|
|
28
28
|
|
|
29
|
-
import { dictionary } from "./dict";
|
|
29
|
+
import type { dictionary } from "./dict";
|
|
30
30
|
|
|
31
|
-
export const usePage = makePageProto(
|
|
31
|
+
export const { msg, Revert, usePage } = makePageProto<typeof dictionary>();
|
|
32
32
|
`;
|
|
33
33
|
}
|
|
@@ -54,12 +54,6 @@ export class ${dict.Model}Insight {
|
|
|
54
54
|
count: number;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@Model.Summary("${dict.Model}Summary")
|
|
58
|
-
export class ${dict.Model}Summary {
|
|
59
|
-
@Field.Prop(() => Int, { min: 0, default: 0, query: {} })
|
|
60
|
-
total${dict.Model}: number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
57
|
@Model.Filter("${dict.Model}Filter")
|
|
64
58
|
export class ${dict.Model}Filter extends sortOf(${dict.Model}, {}) {
|
|
65
59
|
@Filter.Mongo()
|
|
@@ -24,13 +24,7 @@ __export(model_dictionary_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(model_dictionary_exports);
|
|
25
25
|
function getContent(scanInfo, dict) {
|
|
26
26
|
return `
|
|
27
|
-
import {
|
|
28
|
-
baseTrans,
|
|
29
|
-
getBaseSignalTrans,
|
|
30
|
-
ModelDictionary,
|
|
31
|
-
SignalDictionary,
|
|
32
|
-
SummaryDictionary,
|
|
33
|
-
} from "@akanjs/dictionary";
|
|
27
|
+
import { baseTrans, getBaseSignalTrans, ModelDictionary, SignalDictionary } from "@akanjs/dictionary";
|
|
34
28
|
|
|
35
29
|
import type { ${dict.Model}, ${dict.Model}Filter, ${dict.Model}Insight, ${dict.Model}Summary } from "./${dict.model}.constant";
|
|
36
30
|
import type { ${dict.Model}Signal } from "./${dict.model}.signal";
|
|
@@ -66,13 +60,6 @@ const modelDictionary = {
|
|
|
66
60
|
// * ==================== Etc ==================== * //
|
|
67
61
|
} satisfies ModelDictionary<${dict.Model}, ${dict.Model}Insight, ${dict.Model}Filter>;
|
|
68
62
|
|
|
69
|
-
export const ${dict.model}SummaryDictionary = {
|
|
70
|
-
// * ==================== Summary ==================== * //
|
|
71
|
-
total${dict.Model}: ["Total${dict.Model}", "\uCD1D \uBC30\uB108 \uC218"],
|
|
72
|
-
"desc-total${dict.Model}": ["Total ${dict.model} count in the database", "\uB370\uC774\uD130\uBCA0\uC774\uC2A4\uC5D0 \uC800\uC7A5\uB41C \uCD1D \uBC30\uB108 \uC218"],
|
|
73
|
-
// * ==================== Summary ==================== * //
|
|
74
|
-
} satisfies SummaryDictionary<${dict.Model}Summary>;
|
|
75
|
-
|
|
76
63
|
const signalDictionary = {
|
|
77
64
|
...getBaseSignalTrans("${dict.model}" as const),
|
|
78
65
|
// * ==================== Endpoint ==================== * //
|
|
@@ -26,7 +26,7 @@ function getContent(scanInfo, dict) {
|
|
|
26
26
|
return `
|
|
27
27
|
import { beyond, by, Database, into, type SchemaOf } from "@akanjs/document";
|
|
28
28
|
|
|
29
|
-
import
|
|
29
|
+
import * as cnst from "../cnst";
|
|
30
30
|
|
|
31
31
|
@Database.Input(() => cnst.${dict.Model}Input)
|
|
32
32
|
export class ${dict.Model}Input extends by(cnst.${dict.Model}Input) {}
|
|
@@ -28,10 +28,10 @@ import { Int } from "@akanjs/base";
|
|
|
28
28
|
import { SortOf } from "@akanjs/constant";
|
|
29
29
|
import { Arg, DbSignal, Mutation, Query, resolve, Signal } from "@akanjs/signal";
|
|
30
30
|
|
|
31
|
-
import
|
|
31
|
+
import * as cnst from "../cnst";
|
|
32
32
|
|
|
33
33
|
@Signal(() => cnst.${dict.Model})
|
|
34
|
-
export class ${dict.Model}Signal extends DbSignal(cnst.${dict.model}Cnst, Srvs, {
|
|
34
|
+
export class ${dict.Model}Signal extends DbSignal(cnst.${dict.model}Cnst, cnst.Srvs, {
|
|
35
35
|
guards: { get: Query.Public, cru: Mutation.Public },
|
|
36
36
|
}) {
|
|
37
37
|
// * /////////////////////////////////////
|
|
@@ -26,8 +26,8 @@ function getContent(scanInfo, dict) {
|
|
|
26
26
|
return `
|
|
27
27
|
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
28
28
|
import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
|
|
29
|
-
import
|
|
30
|
-
import { fetch } from "../
|
|
29
|
+
import * as cnst from "../cnst";
|
|
30
|
+
import { fetch } from "../sig";
|
|
31
31
|
import { sampleOf } from "@akanjs/test";
|
|
32
32
|
|
|
33
33
|
export const create${dict.Model} = async (adminAgent: userSpec.AdminAgent, userAgent: userSpec.UserAgent) => {
|
|
@@ -27,8 +27,8 @@ function getContent(scanInfo, dict) {
|
|
|
27
27
|
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
28
28
|
import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
|
|
29
29
|
import * as ${dict.model}Spec from "@${dict.sysName}/lib/${dict.model}/${dict.model}.signal.spec";
|
|
30
|
-
import
|
|
31
|
-
import { fetch } from "../
|
|
30
|
+
import * as cnst from "../cnst";
|
|
31
|
+
import { fetch } from "../sig";
|
|
32
32
|
|
|
33
33
|
describe("${dict.Model} Signal", () => {
|
|
34
34
|
describe("${dict.Model} Service", () => {
|
|
@@ -26,8 +26,8 @@ function getContent(scanInfo, dict) {
|
|
|
26
26
|
return `
|
|
27
27
|
import { stateOf, Store } from "@akanjs/store";
|
|
28
28
|
|
|
29
|
-
import
|
|
30
|
-
import { fetch } from "../
|
|
29
|
+
import * as cnst from "../cnst";
|
|
30
|
+
import { fetch } from "../sig";
|
|
31
31
|
|
|
32
32
|
@Store(() => cnst.${dict.Model})
|
|
33
33
|
export class ${dict.Model}Store extends stateOf(fetch.${dict.model}Gql, {
|
|
@@ -36,7 +36,7 @@ ${libs.map((lib) => `import { registerModules as register${capitalize(lib)}Modul
|
|
|
36
36
|
|
|
37
37
|
import * as db from "./lib/db";
|
|
38
38
|
import { allSrvs } from "./lib/srv";
|
|
39
|
-
import
|
|
39
|
+
import * as cnst from "./lib/cnst";
|
|
40
40
|
import * as srv from "./lib/srv";
|
|
41
41
|
import * as sig from "./lib/sig";
|
|
42
42
|
import { type ModulesOptions, registerGlobalModule } from "./lib/option";
|
|
@@ -71,7 +71,8 @@ export { env } from "./env/env.server.testing";
|
|
|
71
71
|
export * as db from "./lib/db";
|
|
72
72
|
export * as srv from "./lib/srv";
|
|
73
73
|
export * as option from "./lib/option";
|
|
74
|
-
export
|
|
75
|
-
export { fetch } from "./lib/
|
|
74
|
+
export * as cnst from "./lib/cnst";
|
|
75
|
+
export { fetch } from "./lib/sig";
|
|
76
|
+
export * from "./lib/dict";
|
|
76
77
|
`;
|
|
77
78
|
}
|
|
@@ -85,27 +85,21 @@ local.properties
|
|
|
85
85
|
apps/**/lib/__lib/**
|
|
86
86
|
libs/**/lib/__lib/**
|
|
87
87
|
apps/*/lib/cnst.ts
|
|
88
|
-
apps/*/lib/cnst_.ts
|
|
89
88
|
apps/*/lib/dict.ts
|
|
90
89
|
apps/*/lib/db.ts
|
|
91
|
-
apps/*/lib/fetch.ts
|
|
92
90
|
apps/*/lib/srv.ts
|
|
93
91
|
apps/*/lib/st.ts
|
|
94
92
|
apps/*/lib/sig.ts
|
|
95
|
-
apps/*/lib/store.ts
|
|
96
93
|
apps/*/lib/usePage.ts
|
|
97
94
|
apps/*/lib/*/index.tsx
|
|
98
95
|
apps/*/client.ts
|
|
99
96
|
apps/*/server.ts
|
|
100
97
|
libs/*/lib/cnst.ts
|
|
101
|
-
libs/*/lib/cnst_.ts
|
|
102
98
|
libs/*/lib/dict.ts
|
|
103
99
|
libs/*/lib/db.ts
|
|
104
|
-
libs/*/lib/fetch.ts
|
|
105
100
|
libs/*/lib/srv.ts
|
|
106
101
|
libs/*/lib/st.ts
|
|
107
102
|
libs/*/lib/sig.ts
|
|
108
|
-
libs/*/lib/store.ts
|
|
109
103
|
libs/*/lib/usePage.ts
|
|
110
104
|
apps/*/lib/*/index.tsx
|
|
111
105
|
libs/*/client.ts
|