@akanjs/cli 0.9.43 → 0.9.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +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
package/esm/index.js
CHANGED
|
@@ -1264,17 +1264,6 @@ var ScanInfo = class {
|
|
|
1264
1264
|
{ all: /* @__PURE__ */ new Set(), databases: /* @__PURE__ */ new Set(), services: /* @__PURE__ */ new Set(), scalars: /* @__PURE__ */ new Set() }
|
|
1265
1265
|
])
|
|
1266
1266
|
);
|
|
1267
|
-
constants = /* @__PURE__ */ new Set();
|
|
1268
|
-
dictionaries = /* @__PURE__ */ new Set();
|
|
1269
|
-
documents = /* @__PURE__ */ new Set();
|
|
1270
|
-
services = /* @__PURE__ */ new Set();
|
|
1271
|
-
signals = /* @__PURE__ */ new Set();
|
|
1272
|
-
stores = /* @__PURE__ */ new Set();
|
|
1273
|
-
templates = /* @__PURE__ */ new Set();
|
|
1274
|
-
units = /* @__PURE__ */ new Set();
|
|
1275
|
-
utils = /* @__PURE__ */ new Set();
|
|
1276
|
-
views = /* @__PURE__ */ new Set();
|
|
1277
|
-
zones = /* @__PURE__ */ new Set();
|
|
1278
1267
|
static async getScanResult(exec2) {
|
|
1279
1268
|
const akanConfig = await exec2.getConfig();
|
|
1280
1269
|
const tsconfig = exec2.getTsConfig();
|
|
@@ -1534,7 +1523,8 @@ var LibInfo = class _LibInfo extends ScanInfo {
|
|
|
1534
1523
|
await Promise.all(
|
|
1535
1524
|
scanResult.libDeps.filter((libName) => !this.loadedLibs.has(libName)).map(async (libName) => {
|
|
1536
1525
|
this.loadedLibs.add(libName);
|
|
1537
|
-
|
|
1526
|
+
const libExecutor = LibExecutor.from(exec2, libName);
|
|
1527
|
+
this.libInfos.set(libName, await _LibInfo.fromExecutor(libExecutor));
|
|
1538
1528
|
})
|
|
1539
1529
|
);
|
|
1540
1530
|
const libInfo = new _LibInfo(exec2, scanResult);
|
|
@@ -1917,8 +1907,8 @@ var Executor = class _Executor {
|
|
|
1917
1907
|
});
|
|
1918
1908
|
return new Promise((resolve, reject) => {
|
|
1919
1909
|
proc.on("exit", (code, signal) => {
|
|
1920
|
-
if (
|
|
1921
|
-
reject(
|
|
1910
|
+
if (code !== 0 || signal)
|
|
1911
|
+
reject(stdout);
|
|
1922
1912
|
else
|
|
1923
1913
|
resolve(stdout);
|
|
1924
1914
|
});
|
|
@@ -2063,6 +2053,10 @@ var Executor = class _Executor {
|
|
|
2063
2053
|
async cp(srcPath, destPath) {
|
|
2064
2054
|
const src = this.getPath(srcPath);
|
|
2065
2055
|
const dest = this.getPath(destPath);
|
|
2056
|
+
if (!fs8.existsSync(src))
|
|
2057
|
+
return;
|
|
2058
|
+
if (!fs8.existsSync(dest))
|
|
2059
|
+
await fsPromise.mkdir(dest, { recursive: true });
|
|
2066
2060
|
await fsPromise.cp(src, dest, { recursive: true });
|
|
2067
2061
|
}
|
|
2068
2062
|
log(msg) {
|
|
@@ -2622,18 +2616,23 @@ var AppExecutor = class _AppExecutor extends SysExecutor {
|
|
|
2622
2616
|
fs8.existsSync(projectPublicLibPath) && fsPromise.rm(projectPublicLibPath, { recursive: true }),
|
|
2623
2617
|
fs8.existsSync(projectAssetsLibPath) && fsPromise.rm(projectAssetsLibPath, { recursive: true })
|
|
2624
2618
|
]);
|
|
2625
|
-
const
|
|
2619
|
+
const targetPublicDeps = libDeps.filter(
|
|
2620
|
+
(dep) => fs8.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`)
|
|
2621
|
+
);
|
|
2622
|
+
const targetAssetsDeps = libDeps.filter(
|
|
2623
|
+
(dep) => fs8.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`)
|
|
2624
|
+
);
|
|
2626
2625
|
await Promise.all([
|
|
2627
|
-
...
|
|
2628
|
-
...
|
|
2626
|
+
...targetPublicDeps.map((dep) => fsPromise.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
2627
|
+
...targetAssetsDeps.map((dep) => fsPromise.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
2629
2628
|
]);
|
|
2630
2629
|
await Promise.all([
|
|
2631
|
-
...
|
|
2630
|
+
...targetPublicDeps.map(
|
|
2632
2631
|
(dep) => fs8.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
2633
2632
|
recursive: true
|
|
2634
2633
|
})
|
|
2635
2634
|
),
|
|
2636
|
-
...
|
|
2635
|
+
...targetAssetsDeps.map(
|
|
2637
2636
|
(dep) => fs8.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
2638
2637
|
recursive: true
|
|
2639
2638
|
})
|
|
@@ -2844,6 +2843,7 @@ var CapacitorApp = class {
|
|
|
2844
2843
|
"android",
|
|
2845
2844
|
"--live-reload",
|
|
2846
2845
|
"--port",
|
|
2846
|
+
"--list",
|
|
2847
2847
|
"4201"
|
|
2848
2848
|
]);
|
|
2849
2849
|
}
|
|
@@ -3925,10 +3925,10 @@ import { Box as Box2, render, Text as Text2, useApp } from "ink";
|
|
|
3925
3925
|
import React2, { useEffect as useEffect3, useState as useState3 } from "react";
|
|
3926
3926
|
|
|
3927
3927
|
// pkgs/@akanjs/cli/ui/MultiScrollList.tsx
|
|
3928
|
-
import { Box,
|
|
3928
|
+
import { Box, Text, useInput } from "ink";
|
|
3929
3929
|
import React, { useEffect as useEffect2, useState as useState2 } from "react";
|
|
3930
3930
|
var HEADER_HEIGHT = 1;
|
|
3931
|
-
var FOOTER_HEIGHT =
|
|
3931
|
+
var FOOTER_HEIGHT = 1;
|
|
3932
3932
|
var OUTER_BORDER_HEIGHT = 2;
|
|
3933
3933
|
var BORDER_HEIGHT = 2;
|
|
3934
3934
|
var MultiScrollList = ({ logList, maxLength = 100 }) => {
|
|
@@ -3941,9 +3941,21 @@ var MultiScrollList = ({ logList, maxLength = 100 }) => {
|
|
|
3941
3941
|
const [boxHeight, setBoxHeight] = useState2(
|
|
3942
3942
|
height - HEADER_HEIGHT - OUTER_BORDER_HEIGHT - FOOTER_HEIGHT - BORDER_HEIGHT
|
|
3943
3943
|
);
|
|
3944
|
-
const [boxWidth, setBoxWidth] = useState2(width -
|
|
3944
|
+
const [boxWidth, setBoxWidth] = useState2(width - 27);
|
|
3945
3945
|
const getLimitedLogs = (logs) => {
|
|
3946
|
-
|
|
3946
|
+
const sortedLogs = logs.reduce((acc, log) => {
|
|
3947
|
+
const content = log.content.replace(/\u001b(?:[@-Z\\\-_]|\[[\u0000-\u007F]*[@-~])/g, "");
|
|
3948
|
+
if (content.length > boxWidth) {
|
|
3949
|
+
const lines = Math.ceil(content.length / boxWidth);
|
|
3950
|
+
for (let i = 0; i < lines; i++) {
|
|
3951
|
+
acc.push({ type: log.type, content: content.slice(i * boxWidth, (i + 1) * boxWidth) });
|
|
3952
|
+
}
|
|
3953
|
+
} else {
|
|
3954
|
+
acc.push(log);
|
|
3955
|
+
}
|
|
3956
|
+
return acc;
|
|
3957
|
+
}, []);
|
|
3958
|
+
return sortedLogs.length > maxLength ? sortedLogs.slice(sortedLogs.length - maxLength) : sortedLogs;
|
|
3947
3959
|
};
|
|
3948
3960
|
useInput((input6, key) => {
|
|
3949
3961
|
if (key.tab) {
|
|
@@ -3993,15 +4005,6 @@ var MultiScrollList = ({ logList, maxLength = 100 }) => {
|
|
|
3993
4005
|
useEffect2(() => {
|
|
3994
4006
|
const getLogsToRender = (logs, index) => {
|
|
3995
4007
|
const limitedLogs = getLimitedLogs(logs);
|
|
3996
|
-
const logWidth = limitedLogs.reduce((acc, log) => acc + log.content.length, 0);
|
|
3997
|
-
if (logWidth > boxWidth) {
|
|
3998
|
-
return limitedLogs.map((log) => {
|
|
3999
|
-
return {
|
|
4000
|
-
type: log.type,
|
|
4001
|
-
content: log.content.slice(0, boxWidth)
|
|
4002
|
-
};
|
|
4003
|
-
});
|
|
4004
|
-
}
|
|
4005
4008
|
if (scrollPos > 0 && tabIndex === index) {
|
|
4006
4009
|
return limitedLogs.slice(limitedLogs.length - boxHeight - scrollPos, limitedLogs.length - scrollPos);
|
|
4007
4010
|
} else if (limitedLogs.length > boxHeight) {
|
|
@@ -4032,7 +4035,7 @@ var MultiScrollList = ({ logList, maxLength = 100 }) => {
|
|
|
4032
4035
|
}, [logList, maxLength]);
|
|
4033
4036
|
return /* @__PURE__ */ React.createElement(Box, { width, height, borderStyle: "round", borderColor: "blackBright", flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, { width: "100%", height: boxHeight + BORDER_HEIGHT + HEADER_HEIGHT, flexDirection: "row" }, /* @__PURE__ */ React.createElement(Box, { width: 30, height: "100%", flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, null, "List ", tabIndex + 1, "/", logList.length)), /* @__PURE__ */ React.createElement(Box, { borderStyle: "round", borderColor: "blackBright", width: "100%", height: "100%", flexDirection: "column" }, logList.map((log, index) => {
|
|
4034
4037
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, { color: index === tabIndex ? "green" : "white" }, /* @__PURE__ */ React.createElement(Text, null, "\u25CF"), "\xA0", log.title.length > 25 ? log.title.slice(0, 25) + "..." : log.title));
|
|
4035
|
-
}))), /* @__PURE__ */ React.createElement(Box, { width: "100%", height: "100%", flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, { height: 1 }, /* @__PURE__ */ React.createElement(Text, { color: logList[tabIndex].color }, logList[tabIndex].title)), /* @__PURE__ */ React.createElement(
|
|
4038
|
+
}))), /* @__PURE__ */ React.createElement(Box, { width: "100%", height: "100%", flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, { height: 1 }, /* @__PURE__ */ React.createElement(Text, { color: logList[tabIndex].color }, logList[tabIndex].title, " ", logList[tabIndex].logs.length)), /* @__PURE__ */ React.createElement(
|
|
4036
4039
|
Box,
|
|
4037
4040
|
{
|
|
4038
4041
|
borderStyle: isRunning ? "double" : "round",
|
|
@@ -4042,11 +4045,11 @@ var MultiScrollList = ({ logList, maxLength = 100 }) => {
|
|
|
4042
4045
|
height: "100%"
|
|
4043
4046
|
},
|
|
4044
4047
|
scrollPos > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, focusLog.slice(0, focusLog.length - 1).map((log, index) => {
|
|
4045
|
-
return /* @__PURE__ */ React.createElement(Text, { color: log.type === "error" ? "red" : "white", key: index }, log.content);
|
|
4046
|
-
}), /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "Scrolling... +", scrollPos)) : focusLog.map((log, index) => {
|
|
4047
|
-
return /* @__PURE__ */ React.createElement(Text, { color: log.type === "error" ? "red" : "white", key: index }, log.content);
|
|
4048
|
+
return /* @__PURE__ */ React.createElement(Text, { underline: false, color: log.type === "error" ? "red" : "white", key: index }, log.content);
|
|
4049
|
+
}), /* @__PURE__ */ React.createElement(Text, { underline: false, backgroundColor: "green" }, "Scrolling... +", scrollPos)) : focusLog.map((log, index) => {
|
|
4050
|
+
return /* @__PURE__ */ React.createElement(Text, { underline: false, color: log.type === "error" ? "red" : "white", key: index }, log.content);
|
|
4048
4051
|
})
|
|
4049
|
-
))), /* @__PURE__ */ React.createElement(Box, { width: "100%", height: FOOTER_HEIGHT }, /* @__PURE__ */ React.createElement(Text, { dimColor: true },
|
|
4052
|
+
))), /* @__PURE__ */ React.createElement(Box, { width: "100%", height: FOOTER_HEIGHT }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Tab : switch tab | Up / Down(shift : x10) : scroll | Space : back last position | Esc : stop scrolling")));
|
|
4050
4053
|
};
|
|
4051
4054
|
|
|
4052
4055
|
// pkgs/@akanjs/cli/src/application/application.interface.tsx
|
|
@@ -4134,16 +4137,16 @@ var Start = ({ appName, bcp, fcp, csr, maxLength = 100 }) => {
|
|
|
4134
4137
|
};
|
|
4135
4138
|
useEffect3(() => {
|
|
4136
4139
|
bcp.stdout?.on("data", (data) => {
|
|
4137
|
-
saveLog("
|
|
4140
|
+
saveLog("info", data, setBackendLogs);
|
|
4138
4141
|
});
|
|
4139
4142
|
bcp.stderr?.on("data", (data) => {
|
|
4140
|
-
saveLog("
|
|
4143
|
+
saveLog("error", data, setBackendLogs);
|
|
4141
4144
|
});
|
|
4142
4145
|
fcp.stdout?.on("data", (data) => {
|
|
4143
|
-
saveLog("
|
|
4146
|
+
saveLog("info", data, setFrontendLogs);
|
|
4144
4147
|
});
|
|
4145
4148
|
fcp.stderr?.on("data", (data) => {
|
|
4146
|
-
saveLog("
|
|
4149
|
+
saveLog("error", data, setFrontendLogs);
|
|
4147
4150
|
});
|
|
4148
4151
|
csr.on("info", (msg) => {
|
|
4149
4152
|
saveLog("info", msg, setCsrLogs);
|
|
@@ -4266,7 +4269,7 @@ var ApplicationRunner = class {
|
|
|
4266
4269
|
}
|
|
4267
4270
|
async scanSync(app) {
|
|
4268
4271
|
const scanInfo = await app.scan();
|
|
4269
|
-
await app.syncAssets(scanInfo.getScanResult().
|
|
4272
|
+
await app.syncAssets(scanInfo.getScanResult().akanConfig.libs);
|
|
4270
4273
|
return scanInfo;
|
|
4271
4274
|
}
|
|
4272
4275
|
async getScriptFilename(app) {
|
|
@@ -4371,11 +4374,12 @@ var ApplicationRunner = class {
|
|
|
4371
4374
|
onStart?.();
|
|
4372
4375
|
if (open2)
|
|
4373
4376
|
setTimeout(() => openBrowser("http://localhost:8080/backend/graphql"), 3e3);
|
|
4374
|
-
|
|
4377
|
+
const startProcessFn = () => app.dist.spawnSync("node", ["--watch", "main.js"], {
|
|
4375
4378
|
env,
|
|
4376
4379
|
stdio: withInk ? ["ignore", "pipe", "pipe"] : "inherit",
|
|
4377
4380
|
cwd: `${app.dist.cwdPath}/backend`
|
|
4378
4381
|
});
|
|
4382
|
+
return startProcessFn();
|
|
4379
4383
|
}
|
|
4380
4384
|
async buildFrontend(app, { spawnOptions } = {}) {
|
|
4381
4385
|
const { env } = await this.#prepareCommand(app, "build", "frontend");
|
|
@@ -5105,10 +5109,6 @@ var ApplicationCommand = class {
|
|
|
5105
5109
|
async test(sys3) {
|
|
5106
5110
|
await this.applicationScript.testSys(sys3);
|
|
5107
5111
|
}
|
|
5108
|
-
// @Target.Public()
|
|
5109
|
-
// ink(@Workspace() workspace: Workspace) {
|
|
5110
|
-
// run();
|
|
5111
|
-
// }
|
|
5112
5112
|
};
|
|
5113
5113
|
__decorateClass([
|
|
5114
5114
|
Target.Public(),
|
|
@@ -519,28 +519,10 @@ export const General = () => {
|
|
|
519
519
|
```tsx
|
|
520
520
|
"use client";
|
|
521
521
|
import { ModelDashboardProps } from "@akanjs/client";
|
|
522
|
-
import { getQueryMap } from "@akanjs/constant";
|
|
523
522
|
import { cnst, st } from "@app/client";
|
|
524
523
|
import { Data } from "@akanjs/ui";
|
|
525
524
|
import { Button } from "@akanjs/ui";
|
|
526
525
|
|
|
527
|
-
export const Stat = ({
|
|
528
|
-
className,
|
|
529
|
-
summary,
|
|
530
|
-
sliceName = "product",
|
|
531
|
-
queryMap = getQueryMap(cnst.ProductSummary),
|
|
532
|
-
}: ModelDashboardProps<cnst.Summary>) => {
|
|
533
|
-
return (
|
|
534
|
-
<Data.Dashboard
|
|
535
|
-
className={className}
|
|
536
|
-
summary={summary}
|
|
537
|
-
sliceName={sliceName}
|
|
538
|
-
queryMap={queryMap}
|
|
539
|
-
columns={["totalProducts", "inStock", "outOfStock"]}
|
|
540
|
-
/>
|
|
541
|
-
);
|
|
542
|
-
};
|
|
543
|
-
|
|
544
526
|
export const AddToCart = ({ productId, className }: { productId: string; className?: string }) => {
|
|
545
527
|
return (
|
|
546
528
|
<Button className={clsx("bg-primary text-white", className)} onClick={() => st.do.addToCart(productId)}>
|
|
@@ -200,8 +200,8 @@ Detailed displays of full data models:
|
|
|
200
200
|
export const Detail = ({ className, project }: ModelProps<"project", cnst.FullProject>) => {
|
|
201
201
|
return (
|
|
202
202
|
<div className={clsx("bg-base-100 rounded-lg p-6 shadow-lg", className)}>
|
|
203
|
-
<div className="border-
|
|
204
|
-
<h1 className="text-
|
|
203
|
+
<div className="border-base-content mb-8">
|
|
204
|
+
<h1 className="text-2xl font-bold">{project.name}</h1>
|
|
205
205
|
</div>
|
|
206
206
|
|
|
207
207
|
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">{/* Project details */}</div>
|
|
@@ -97,7 +97,7 @@ import { dayjs } from "@akanjs/base";
|
|
|
97
97
|
import { beyond, by, Database, into, Loader, type SchemaOf } from "@akanjs/document";
|
|
98
98
|
import { hashPassword } from "@shared/nest";
|
|
99
99
|
|
|
100
|
-
import
|
|
100
|
+
import * as cnst from "../cnst";
|
|
101
101
|
|
|
102
102
|
// Input model for database operations
|
|
103
103
|
@Database.Input(() => cnst.UserInput)
|
|
@@ -119,7 +119,7 @@ export class User extends by(cnst.User) {
|
|
|
119
119
|
|
|
120
120
|
// Model with database operations
|
|
121
121
|
@Database.Model(() => cnst.User)
|
|
122
|
-
export class UserModel extends into(User, cnst.userCnst) {
|
|
122
|
+
export class UserModel extends into(User, cnst.userCnst, ...user.models) {
|
|
123
123
|
@Loader.ByField("email") userEmailLoader: Loader<string, User>;
|
|
124
124
|
|
|
125
125
|
async findByEmail(email: string) {
|
|
@@ -162,7 +162,7 @@ import { DbService, Service, Srv, Use } from "@akanjs/service";
|
|
|
162
162
|
import { Account, type Me } from "@akanjs/signal";
|
|
163
163
|
import { isPasswordMatch } from "@shared/nest";
|
|
164
164
|
|
|
165
|
-
import
|
|
165
|
+
import * as cnst from "../cnst";
|
|
166
166
|
import * as db from "../db";
|
|
167
167
|
import type * as option from "../option";
|
|
168
168
|
import type * as srv from "../srv";
|
|
@@ -208,11 +208,11 @@ Define GraphQL operations in the signal:
|
|
|
208
208
|
import { ID } from "@akanjs/base";
|
|
209
209
|
import { Account, Arg, DbSignal, Me, Mutation, Query, resolve, Signal } from "@akanjs/signal";
|
|
210
210
|
|
|
211
|
-
import
|
|
211
|
+
import * as cnst from "../cnst";
|
|
212
212
|
import type * as db from "../db";
|
|
213
213
|
|
|
214
214
|
@Signal(() => cnst.User)
|
|
215
|
-
export class UserSignal extends DbSignal(cnst.userCnst, Srvs, {
|
|
215
|
+
export class UserSignal extends DbSignal(cnst.userCnst, cnst.Srvs, {
|
|
216
216
|
guards: { get: Query.Public, cru: Mutation.Admin },
|
|
217
217
|
}) {
|
|
218
218
|
@Mutation.Public(() => cnst.util.AccessToken)
|
|
@@ -256,8 +256,8 @@ Implement client-side state management:
|
|
|
256
256
|
import { StateCreator } from "zustand";
|
|
257
257
|
import { immer } from "zustand/middleware/immer";
|
|
258
258
|
|
|
259
|
-
import
|
|
260
|
-
import * as fetch from "../
|
|
259
|
+
import * as cnst from "../cnst";
|
|
260
|
+
import * as fetch from "../sig";
|
|
261
261
|
|
|
262
262
|
export interface UserState {
|
|
263
263
|
users: cnst.User[];
|
|
@@ -584,30 +584,36 @@ export const Layout = () => (
|
|
|
584
584
|
## Best Practices
|
|
585
585
|
|
|
586
586
|
1. **Naming Conventions**
|
|
587
|
+
|
|
587
588
|
- Use PascalCase for classes and components (e.g., `UserService`, `User.Unit.tsx`)
|
|
588
589
|
- Use camelCase for files (e.g., `user.service.ts`, `user.document.ts`)
|
|
589
590
|
|
|
590
591
|
2. **Security**
|
|
592
|
+
|
|
591
593
|
- Use `@Field.Secret` for sensitive data like passwords
|
|
592
594
|
- Apply proper permission guards to queries and mutations (`@Query.Admin`, `@Mutation.Public`)
|
|
593
595
|
- Validate input data using the `validate` option in `@Field.Prop`
|
|
594
596
|
|
|
595
597
|
3. **Code Organization**
|
|
598
|
+
|
|
596
599
|
- Keep business logic in service files
|
|
597
600
|
- Use signals for API calls only, not for business logic
|
|
598
601
|
- Define reusable utility methods in document models
|
|
599
602
|
|
|
600
603
|
4. **Performance**
|
|
604
|
+
|
|
601
605
|
- Use dataloader pattern (`@Loader.ByField`) for efficient database access
|
|
602
606
|
- Create proper indexes in the middleware
|
|
603
607
|
- Use projections to limit returned fields when appropriate
|
|
604
608
|
|
|
605
609
|
5. **Testing**
|
|
610
|
+
|
|
606
611
|
- Create signal tests for each API endpoint
|
|
607
612
|
- Mock services for unit testing signals
|
|
608
613
|
- Use integration tests for testing complex workflows
|
|
609
614
|
|
|
610
615
|
6. **UI Components**
|
|
616
|
+
|
|
611
617
|
- Follow the separation between Template, Unit, View, and Zone components
|
|
612
618
|
- Make components reusable across different parts of the application
|
|
613
619
|
- Use dictionary files for all UI text to support internationalization
|
|
@@ -84,13 +84,6 @@ export class DroneInsight {
|
|
|
84
84
|
count: number;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
// 8. Summary Model
|
|
88
|
-
@Model.Summary("DroneSummary")
|
|
89
|
-
export class DroneSummary {
|
|
90
|
-
@Field.Prop(() => Int, { min: 0, default: 0, query: { status: { $ne: "inactive" } } })
|
|
91
|
-
totalDrone: number;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
87
|
// 9. Query Model
|
|
95
88
|
export const droneQuery = {
|
|
96
89
|
byName: (name: string) => ({ name }),
|
|
@@ -253,18 +246,6 @@ const droneInsight = await fetch.droneInsight({ ...query });
|
|
|
253
246
|
const droneInsight = st.use.droneInsight(); // droneInsight.count
|
|
254
247
|
```
|
|
255
248
|
|
|
256
|
-
## Summary Model Implementation
|
|
257
|
-
|
|
258
|
-
Summary model defines periodic statistics:
|
|
259
|
-
|
|
260
|
-
```typescript
|
|
261
|
-
@Model.Summary("DroneSummary")
|
|
262
|
-
export class DroneSummary {
|
|
263
|
-
@Field.Prop(() => Int, { min: 0, default: 0, query: { status: { $ne: "inactive" } } })
|
|
264
|
-
totalDrone: number;
|
|
265
|
-
}
|
|
266
|
-
```
|
|
267
|
-
|
|
268
249
|
**Usage Examples**:
|
|
269
250
|
|
|
270
251
|
```typescript
|
|
@@ -436,7 +417,6 @@ import { LightMission } from "../cnst_";
|
|
|
436
417
|
## Best Practices for Maintainable Models
|
|
437
418
|
|
|
438
419
|
1. **Consistent Naming**:
|
|
439
|
-
|
|
440
420
|
- Input: `DroneInput`
|
|
441
421
|
- Object: `DroneObject`
|
|
442
422
|
- Light: `LightDrone`
|
|
@@ -444,19 +424,16 @@ import { LightMission } from "../cnst_";
|
|
|
444
424
|
- Sort: `droneSort`
|
|
445
425
|
|
|
446
426
|
2. **Reference Handling**:
|
|
447
|
-
|
|
448
427
|
- Use Light models for references
|
|
449
428
|
- Avoid circular dependencies
|
|
450
429
|
- Prefer direct imports over barrel files
|
|
451
430
|
|
|
452
431
|
3. **Field Design**:
|
|
453
|
-
|
|
454
432
|
- Use proper field types (Prop, Hidden, Secret, Resolve)
|
|
455
433
|
- Set appropriate defaults (especially for arrays)
|
|
456
434
|
- Add validation where needed
|
|
457
435
|
|
|
458
436
|
4. **Performance Optimization**:
|
|
459
|
-
|
|
460
437
|
- Use Light models for list queries
|
|
461
438
|
- Keep Insight/Summary models lean
|
|
462
439
|
- Use appropriate indexes for queries
|
|
@@ -509,13 +486,6 @@ export class DroneInsight {
|
|
|
509
486
|
count: number;
|
|
510
487
|
}
|
|
511
488
|
|
|
512
|
-
// Summary Model
|
|
513
|
-
@Model.Summary("DroneSummary")
|
|
514
|
-
export class DroneSummary {
|
|
515
|
-
@Field.Prop(() => Int, { query: { status: "active" } })
|
|
516
|
-
activeDrones: number;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
489
|
// Query Model
|
|
520
490
|
export const droneQuery = {
|
|
521
491
|
byStatus: (status: string) => ({ status }),
|
|
@@ -31,13 +31,6 @@
|
|
|
31
31
|
"path": "{apps,libs}/*/lib/{user,setting}/*.dictionary.ts",
|
|
32
32
|
"sample": 2
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
"type": "example",
|
|
36
|
-
"description": "Examples of summary dictionaries",
|
|
37
|
-
"path": "{apps,libs}/*/lib/[!_]*/*.dictionary.ts",
|
|
38
|
-
"filterText": "SummaryDictionary",
|
|
39
|
-
"sample": 2
|
|
40
|
-
},
|
|
41
34
|
{
|
|
42
35
|
"type": "example",
|
|
43
36
|
"description": "Examples of enum translations",
|
|
@@ -18,13 +18,7 @@ This system ensures consistent terminology across all application layers and sup
|
|
|
18
18
|
## 2. File Structure
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import {
|
|
22
|
-
ModelDictionary,
|
|
23
|
-
SignalDictionary,
|
|
24
|
-
SummaryDictionary,
|
|
25
|
-
baseTrans,
|
|
26
|
-
getBaseSignalTrans,
|
|
27
|
-
} from "@akanjs/dictionary";
|
|
21
|
+
import { ModelDictionary, SignalDictionary, baseTrans, getBaseSignalTrans } from "@akanjs/dictionary";
|
|
28
22
|
|
|
29
23
|
import type { YourModel, YourFilter, YourInsight, YourSummary } from "./your-model.constant";
|
|
30
24
|
import type { YourSignal } from "./your-model.signal";
|
|
@@ -59,14 +53,6 @@ const modelDictionary = {
|
|
|
59
53
|
// * ==================== Etc ==================== * //
|
|
60
54
|
} satisfies ModelDictionary<YourModel, YourInsight, YourFilter>;
|
|
61
55
|
|
|
62
|
-
// Summary model translations (optional)
|
|
63
|
-
export const yourSummaryDictionary = {
|
|
64
|
-
// * ==================== Summary ==================== * //
|
|
65
|
-
totalItems: ["Total Items", "총 항목 수"],
|
|
66
|
-
"desc-totalItems": ["Total item count in database", "데이터베이스의 총 항목 수"],
|
|
67
|
-
// * ==================== Summary ==================== * //
|
|
68
|
-
} satisfies SummaryDictionary<YourSummary>;
|
|
69
|
-
|
|
70
56
|
// API endpoint translations
|
|
71
57
|
const signalDictionary = {
|
|
72
58
|
...getBaseSignalTrans("modelName"), // Auto-generate standard API texts
|
|
@@ -341,7 +327,6 @@ Always include these imports in your dictionary file:
|
|
|
341
327
|
import {
|
|
342
328
|
ModelDictionary,
|
|
343
329
|
SignalDictionary,
|
|
344
|
-
SummaryDictionary,
|
|
345
330
|
ExtendModelDictionary, // For extended models
|
|
346
331
|
baseTrans, // Common translations
|
|
347
332
|
getBaseSignalTrans, // Auto-generated API translations
|
|
@@ -358,17 +343,10 @@ import type { YourSummary } from "./your-model.summary"; // If using summary
|
|
|
358
343
|
## 10. Full Example of model.dictionary.ts
|
|
359
344
|
|
|
360
345
|
```typescript
|
|
361
|
-
import {
|
|
362
|
-
ModelDictionary,
|
|
363
|
-
SignalDictionary,
|
|
364
|
-
SummaryDictionary,
|
|
365
|
-
baseTrans,
|
|
366
|
-
getBaseSignalTrans,
|
|
367
|
-
} from "@akanjs/dictionary";
|
|
346
|
+
import { ModelDictionary, SignalDictionary, baseTrans, getBaseSignalTrans } from "@akanjs/dictionary";
|
|
368
347
|
|
|
369
348
|
import type { Post, PostFilter, PostInsight } from "./post.constant";
|
|
370
349
|
import type { PostSignal } from "./post.signal";
|
|
371
|
-
import type { PostSummary } from "./post.summary";
|
|
372
350
|
|
|
373
351
|
const modelDictionary = {
|
|
374
352
|
...baseTrans,
|
|
@@ -438,19 +416,6 @@ const modelDictionary = {
|
|
|
438
416
|
// * ==================== Etc ==================== * //
|
|
439
417
|
} satisfies ModelDictionary<Post, PostInsight, PostFilter>;
|
|
440
418
|
|
|
441
|
-
export const postSummaryDictionary = {
|
|
442
|
-
// * ==================== Summary ==================== * //
|
|
443
|
-
totalPosts: ["Total Posts", "총 게시물 수"],
|
|
444
|
-
"desc-totalPosts": ["Total post count in database", "데이터베이스의 총 게시물 수"],
|
|
445
|
-
|
|
446
|
-
publishedPosts: ["Published Posts", "게시된 게시물 수"],
|
|
447
|
-
"desc-publishedPosts": ["Number of published posts", "게시된 게시물 수"],
|
|
448
|
-
|
|
449
|
-
draftPosts: ["Draft Posts", "초안 게시물 수"],
|
|
450
|
-
"desc-draftPosts": ["Number of draft posts", "초안 게시물 수"],
|
|
451
|
-
// * ==================== Summary ==================== * //
|
|
452
|
-
} satisfies SummaryDictionary<PostSummary>;
|
|
453
|
-
|
|
454
419
|
const signalDictionary = {
|
|
455
420
|
...getBaseSignalTrans("post"),
|
|
456
421
|
|
|
@@ -573,7 +538,6 @@ export const settingDictionary = userSettingDictionary;
|
|
|
573
538
|
7. **Validate Dictionary**: Run `akan dict:check` before committing changes
|
|
574
539
|
|
|
575
540
|
8. **Consistent Casing**:
|
|
576
|
-
|
|
577
541
|
- Model field names: camelCase
|
|
578
542
|
- Enum values: camelCase
|
|
579
543
|
- Custom keys: camelCase
|
|
@@ -495,7 +495,7 @@ Here's a complete example integrating multiple features:
|
|
|
495
495
|
// product.document.ts
|
|
496
496
|
import { dayjs } from "@akanjs/base";
|
|
497
497
|
import { beyond, by, Database, into, Loader, SchemaOf } from "@akanjs/document";
|
|
498
|
-
import
|
|
498
|
+
import * as cnst from "../cnst";
|
|
499
499
|
|
|
500
500
|
@Database.Input(() => cnst.ProductInput)
|
|
501
501
|
export class ProductInput extends by(cnst.ProductInput) {}
|
|
@@ -605,7 +605,7 @@ import { Cron } from "@akanjs/nest";
|
|
|
605
605
|
import { DbService, Service, Srv, Use } from "@akanjs/service";
|
|
606
606
|
import type { EmailApi } from "@util/nest";
|
|
607
607
|
|
|
608
|
-
import
|
|
608
|
+
import * as cnst from "../cnst";
|
|
609
609
|
import * as db from "../db";
|
|
610
610
|
import { Revert } from "../dict";
|
|
611
611
|
import type * as srv from "../srv";
|
|
@@ -23,11 +23,11 @@ import { ID, Int } from "@akanjs/base";
|
|
|
23
23
|
import { SortOf } from "@akanjs/constant";
|
|
24
24
|
import { Arg, DbSignal, Mutation, Query, resolve, Self, Signal } from "@akanjs/signal";
|
|
25
25
|
|
|
26
|
-
import
|
|
26
|
+
import * as cnst from "../cnst";
|
|
27
27
|
import type * as db from "../db";
|
|
28
28
|
|
|
29
29
|
@Signal(() => cnst.ModelName)
|
|
30
|
-
export class ModelNameSignal extends DbSignal(cnst.modelNameCnst, Srvs, {
|
|
30
|
+
export class ModelNameSignal extends DbSignal(cnst.modelNameCnst, cnst.Srvs, {
|
|
31
31
|
guards: { get: Query.Public, cru: Mutation.User },
|
|
32
32
|
}) {
|
|
33
33
|
// Signal methods here...
|
|
@@ -289,7 +289,7 @@ DbSignal creates standard operations that you don't need to implement:
|
|
|
289
289
|
|
|
290
290
|
```typescript
|
|
291
291
|
@Signal(() => cnst.Board)
|
|
292
|
-
export class BoardSignal extends DbSignal(cnst.boardCnst, Srvs, {
|
|
292
|
+
export class BoardSignal extends DbSignal(cnst.boardCnst, cnst.Srvs, {
|
|
293
293
|
guards: { get: Query.Public, cru: Mutation.Admin },
|
|
294
294
|
}) {
|
|
295
295
|
// Custom methods beyond CRUD go here
|
|
@@ -409,7 +409,7 @@ async getProjectDetails(
|
|
|
409
409
|
|
|
410
410
|
```typescript
|
|
411
411
|
@Signal(() => cnst.Product)
|
|
412
|
-
export class ProductSignal extends DbSignal(cnst.productCnst, Srvs, {
|
|
412
|
+
export class ProductSignal extends DbSignal(cnst.productCnst, cnst.Srvs, {
|
|
413
413
|
guards: { get: Query.Public, cru: Mutation.Admin },
|
|
414
414
|
}) {
|
|
415
415
|
// Custom methods beyond auto-generated CRUD
|
|
@@ -34,8 +34,8 @@ Model stores follow a consistent architecture pattern:
|
|
|
34
34
|
|
|
35
35
|
```typescript
|
|
36
36
|
import { stateOf, Store } from "@akanjs/store";
|
|
37
|
-
import
|
|
38
|
-
import { fetch } from "../
|
|
37
|
+
import * as cnst from "../cnst";
|
|
38
|
+
import { fetch } from "../sig";
|
|
39
39
|
|
|
40
40
|
@Store(() => cnst.Product)
|
|
41
41
|
export class ProductStore extends stateOf(fetch.productGql, {
|
|
@@ -485,8 +485,8 @@ initProductChat(productId: string) {
|
|
|
485
485
|
|
|
486
486
|
```typescript
|
|
487
487
|
import { stateOf, Store, Toast } from "@akanjs/store";
|
|
488
|
-
import
|
|
489
|
-
import { fetch } from "../
|
|
488
|
+
import * as cnst from "../cnst";
|
|
489
|
+
import { fetch } from "../sig";
|
|
490
490
|
import { msg } from "../msg";
|
|
491
491
|
|
|
492
492
|
@Store(() => cnst.Product)
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
// pkgs/@akanjs/cli/src/templates/app/lib/___appName__/__appName__.service.ts
|
|
2
2
|
function getContent(scanInfo, dict) {
|
|
3
3
|
return `
|
|
4
|
-
import {
|
|
5
|
-
import { LogService, Service, Srv } from "@akanjs/service";
|
|
6
|
-
|
|
7
|
-
import type * as srv from "../srv";
|
|
4
|
+
import { LogService, Service } from "@akanjs/service";
|
|
8
5
|
|
|
9
6
|
@Service("${dict.appName}Service", { serverMode: "batch" })
|
|
10
7
|
export class ${dict.AppName}Service extends LogService("${dict.appName}Service") {}
|
|
11
|
-
|
|
8
|
+
`;
|
|
12
9
|
}
|
|
13
10
|
export {
|
|
14
11
|
getContent as default
|
|
@@ -3,10 +3,10 @@ function getContent(scanInfo, dict) {
|
|
|
3
3
|
return `
|
|
4
4
|
import { LogSignal, Signal } from "@akanjs/signal";
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as cnst from "../cnst";
|
|
7
7
|
|
|
8
8
|
@Signal({ name: "${dict.AppName}" })
|
|
9
|
-
export class ${dict.AppName}Signal extends LogSignal(Srvs) {}
|
|
9
|
+
export class ${dict.AppName}Signal extends LogSignal(cnst.Srvs) {}
|
|
10
10
|
`;
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
@@ -13,11 +13,10 @@ function getContent(scanInfo, dict = {}) {
|
|
|
13
13
|
([_, fileTypes]) => fileTypes.has("template") || fileTypes.has("unit") || fileTypes.has("util") || fileTypes.has("view") || fileTypes.has("zone")
|
|
14
14
|
).map(([key]) => key);
|
|
15
15
|
return `
|
|
16
|
-
export {
|
|
17
|
-
export { store } from "./lib/
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
20
|
-
export { cnst } from "./lib/cnst";
|
|
16
|
+
export { Revert, msg, usePage } from "./lib/usePage";
|
|
17
|
+
export { st, store } from "./lib/st";
|
|
18
|
+
export { fetch } from "./lib/sig";
|
|
19
|
+
export * as cnst from "./lib/cnst"
|
|
21
20
|
${scalarModules.map((module) => `export { ${capitalize(module)} } from "./lib/__scalar/${module}";`).join("\n")}
|
|
22
21
|
${serviceModules.map((module) => `export { ${capitalize(module)} } from "./lib/_${module}";`).join("\n")}
|
|
23
22
|
${databaseModules.map((module) => `export { ${capitalize(module)} } from "./lib/${module}";`).join("\n")}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// pkgs/@akanjs/cli/src/templates/index.ts
|
|
2
2
|
function getContent(scanInfo, dict = {}) {
|
|
3
3
|
return `
|
|
4
|
-
export
|
|
5
|
-
export { fetch } from "./lib/
|
|
6
|
-
export * from "./lib/dict";
|
|
4
|
+
export * as cnst from "./lib/cnst";
|
|
5
|
+
export { fetch } from "./lib/sig";
|
|
7
6
|
`;
|
|
8
7
|
}
|
|
9
8
|
export {
|