@ultrst-armada/krnl 1.0.1 → 1.0.3
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/README.md +67 -65
- package/package.json +13 -9
- package/packages/cli/dist/bin/krnl.cjs +1535 -9508
- package/packages/cli/dist/bin/krnl.js +55 -1915
- package/packages/cli/dist/chunk-6SHSECXR.js +1628 -0
- package/packages/cli/dist/index.cjs +1244 -7373
- package/packages/cli/dist/index.d.cts +45 -2
- package/packages/cli/dist/index.d.ts +45 -2
- package/packages/cli/dist/index.js +5 -20
- package/packages/cli/package.json +17 -10
- package/packages/core/dist/index.cjs +3039 -141
- package/packages/core/dist/index.d.cts +633 -27
- package/packages/core/dist/index.d.ts +633 -27
- package/packages/core/dist/index.js +3028 -139
- package/packages/core/package.json +15 -7
- package/packages/create-krnl/dist/index.cjs +322 -316
- package/packages/create-krnl/dist/index.js +322 -316
- package/packages/create-krnl/package.json +5 -3
- package/packages/eslint-plugin/dist/index.cjs +17 -55
- package/packages/eslint-plugin/dist/index.d.cts +8 -43
- package/packages/eslint-plugin/dist/index.d.ts +8 -43
- package/packages/eslint-plugin/dist/index.js +17 -55
- package/packages/eslint-plugin/package.json +5 -4
- package/packages/validate/dist/index.cjs +692 -361
- package/packages/validate/dist/index.d.cts +12 -14
- package/packages/validate/dist/index.d.ts +12 -14
- package/packages/validate/dist/index.js +692 -361
- package/packages/validate/package.json +14 -7
- package/packages/cli/dist/K_ENT_Entity-PQ5MURQY-ZG6FZXXX.js +0 -13
- package/packages/cli/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW-K4CRQYA5.js +0 -8
- package/packages/cli/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF-LNPXZYOE.js +0 -110
- package/packages/cli/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF-3ALZPNX4.js +0 -11
- package/packages/cli/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X-PJTICYSW.js +0 -11
- package/packages/cli/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW-M5TYU55O.js +0 -8
- package/packages/cli/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2-H6STOXRK.js +0 -20
- package/packages/cli/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK-XPJXSF7D.js +0 -19
- package/packages/cli/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7-CUYGTWOW.js +0 -7
- package/packages/cli/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU-VR6T4N6J.js +0 -17
- package/packages/cli/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5-RLJ4QWDP.js +0 -58
- package/packages/cli/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF-BOQGUASC.js +0 -22
- package/packages/cli/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG-XJI7KIT5.js +0 -8
- package/packages/cli/dist/K_LIB_Krnl_Telemetry-77FRZ3KV-K5VCWAFW.js +0 -9
- package/packages/cli/dist/chunk-3TRM6CYL.js +0 -152
- package/packages/cli/dist/chunk-5JDK35TG.js +0 -3872
- package/packages/cli/dist/chunk-63PTK33I.js +0 -997
- package/packages/cli/dist/chunk-6NIKAMUZ.js +0 -82
- package/packages/cli/dist/chunk-BOXWWXQG.js +0 -400
- package/packages/cli/dist/chunk-EEKLK7QJ.js +0 -565
- package/packages/cli/dist/chunk-EG7T2IAD.js +0 -107
- package/packages/cli/dist/chunk-F5EHXE2O.js +0 -1036
- package/packages/cli/dist/chunk-F65ANSQG.js +0 -269
- package/packages/cli/dist/chunk-FDNCADFE.js +0 -71
- package/packages/cli/dist/chunk-GDLRMDAN.js +0 -127
- package/packages/cli/dist/chunk-HWMTCMOS.js +0 -656
- package/packages/cli/dist/chunk-I74QIQOD.js +0 -5536
- package/packages/cli/dist/chunk-JTLSTO25.js +0 -71
- package/packages/cli/dist/chunk-JULBBJ27.js +0 -1033
- package/packages/cli/dist/chunk-OHVMVRBP.js +0 -117
- package/packages/cli/dist/chunk-P2PCLEKX.js +0 -666
- package/packages/cli/dist/chunk-PJQIUOX2.js +0 -7767
- package/packages/cli/dist/chunk-PPOF3DJW.js +0 -471
- package/packages/cli/dist/chunk-Q45257P6.js +0 -173
- package/packages/cli/dist/chunk-QNROWGBI.js +0 -1036
- package/packages/cli/dist/chunk-RJNYUXZD.js +0 -977
- package/packages/cli/dist/chunk-SRTOPJ5W.js +0 -104
- package/packages/cli/dist/chunk-TCEX3MPS.js +0 -702
- package/packages/cli/dist/chunk-TNOAJO2J.js +0 -675
- package/packages/cli/dist/chunk-UR2SUCSF.js +0 -701
- package/packages/cli/dist/chunk-X5LOIFM7.js +0 -68
- package/packages/cli/dist/chunk-XIRFOO3H.js +0 -589
- package/packages/cli/dist/chunk-ZAAV3JXQ.js +0 -809
- package/packages/core/dist/K_ENT_Entity-4MB7CU4A.js +0 -12
- package/packages/core/dist/K_ENT_Entity-DEJGIDGH.js +0 -12
- package/packages/core/dist/K_ENT_Entity-FXZO5UZ2.js +0 -12
- package/packages/core/dist/K_ENT_Entity-HDSCXC5F.js +0 -12
- package/packages/core/dist/K_ENT_Entity-JILABHLW.js +0 -12
- package/packages/core/dist/K_ENT_Entity-PQ5MURQY.js +0 -13
- package/packages/core/dist/K_ENT_Entity-ROAKDIHW.js +0 -12
- package/packages/core/dist/K_ENT_Entity-TBVFSKDV.js +0 -12
- package/packages/core/dist/K_ENT_Entity-ZFLKG3JO.js +0 -12
- package/packages/core/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF.js +0 -110
- package/packages/core/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF.js +0 -9
- package/packages/core/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X.js +0 -9
- package/packages/core/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2.js +0 -20
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-4C6GBQAG.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-6V23A6F6.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK.js +0 -19
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-DYLLC5G2.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-F4FOFAUP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-FBOXXMI3.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-Q73BWLNP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-QM2C4MVA.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-QUGI6SMP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-RGMTBHNP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-RWR7UNDW.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7.js +0 -7
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-32MFJJ5Z.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-4J4CEWRY.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-A366YHF2.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-LK4LYJHI.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-NW3K63II.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-QDHTI5ZV.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-VHCT6VIW.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-WBRKF24R.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-XKYQYT6Q.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-Z2PWZYDZ.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5.js +0 -58
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-2EZU7QF4.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-6G3AQNAV.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-B2NZMQUG.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-C2RABMZP.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-HHE3NZ4F.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-LHFGR6WK.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-M74BLM3N.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-PT6ZA6EA.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-SP52V3CX.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF.js +0 -22
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-YNSEUHJJ.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Unified_Http_Adapter-M6SBHIVA.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_Telemetry-77FRZ3KV.js +0 -9
- package/packages/core/dist/chunk-33L2J7V7.js +0 -82
- package/packages/core/dist/chunk-3ES4K2ZP.js +0 -817
- package/packages/core/dist/chunk-3SMHVVLL.js +0 -82
- package/packages/core/dist/chunk-3UEZ7JQA.js +0 -4877
- package/packages/core/dist/chunk-3XIE6KBD.js +0 -4877
- package/packages/core/dist/chunk-46ZLCML6.js +0 -107
- package/packages/core/dist/chunk-4UEL3DWJ.js +0 -107
- package/packages/core/dist/chunk-54GWZ5PC.js +0 -82
- package/packages/core/dist/chunk-6QCYRS5L.js +0 -127
- package/packages/core/dist/chunk-6ULMHNXR.js +0 -104
- package/packages/core/dist/chunk-7WUETJEV.js +0 -117
- package/packages/core/dist/chunk-A5KRAYDB.js +0 -107
- package/packages/core/dist/chunk-ANEAZ3PO.js +0 -107
- package/packages/core/dist/chunk-BE76RL6F.js +0 -82
- package/packages/core/dist/chunk-CIARVYDO.js +0 -107
- package/packages/core/dist/chunk-CR2ANE62.js +0 -107
- package/packages/core/dist/chunk-DI27MOR7.js +0 -173
- package/packages/core/dist/chunk-E6RLFHM5.js +0 -596
- package/packages/core/dist/chunk-EELAPMNV.js +0 -4877
- package/packages/core/dist/chunk-ENZ2RQVJ.js +0 -107
- package/packages/core/dist/chunk-F2U6CX4F.js +0 -4877
- package/packages/core/dist/chunk-FKG64OHL.js +0 -82
- package/packages/core/dist/chunk-FYAZJYM5.js +0 -772
- package/packages/core/dist/chunk-G4NP4RDQ.js +0 -82
- package/packages/core/dist/chunk-GADIRLRS.js +0 -473
- package/packages/core/dist/chunk-GR6CSLQJ.js +0 -772
- package/packages/core/dist/chunk-HDS7AT6O.js +0 -772
- package/packages/core/dist/chunk-HIMEZUU2.js +0 -71
- package/packages/core/dist/chunk-IB4UHG5I.js +0 -596
- package/packages/core/dist/chunk-J7ZYNVRS.js +0 -772
- package/packages/core/dist/chunk-JVLZU4K7.js +0 -604
- package/packages/core/dist/chunk-JYXXI7Q3.js +0 -82
- package/packages/core/dist/chunk-K54K2KZW.js +0 -192
- package/packages/core/dist/chunk-K6VHLBNH.js +0 -3316
- package/packages/core/dist/chunk-KCBP7ZYA.js +0 -596
- package/packages/core/dist/chunk-KFQGP6VL.js +0 -33
- package/packages/core/dist/chunk-KIUEUI7K.js +0 -82
- package/packages/core/dist/chunk-LB67NIZP.js +0 -949
- package/packages/core/dist/chunk-LDTYFUNW.js +0 -596
- package/packages/core/dist/chunk-MLVWARD4.js +0 -596
- package/packages/core/dist/chunk-MPYVXHKO.js +0 -2777
- package/packages/core/dist/chunk-MRQ3MITU.js +0 -772
- package/packages/core/dist/chunk-MVUN7I7O.js +0 -107
- package/packages/core/dist/chunk-NDDOIRW7.js +0 -596
- package/packages/core/dist/chunk-O3KDB5MH.js +0 -3330
- package/packages/core/dist/chunk-OEINUDSE.js +0 -400
- package/packages/core/dist/chunk-OPDENPT4.js +0 -4877
- package/packages/core/dist/chunk-P6XEM2LA.js +0 -429
- package/packages/core/dist/chunk-QKMRSQV4.js +0 -82
- package/packages/core/dist/chunk-R6CCWALL.js +0 -4877
- package/packages/core/dist/chunk-RAMMOO73.js +0 -774
- package/packages/core/dist/chunk-S3FTZFG6.js +0 -772
- package/packages/core/dist/chunk-T2ZVN434.js +0 -4877
- package/packages/core/dist/chunk-TFHLDMIA.js +0 -107
- package/packages/core/dist/chunk-TI3QUCIJ.js +0 -107
- package/packages/core/dist/chunk-TR2BAIGI.js +0 -107
- package/packages/core/dist/chunk-UGVVJKC6.js +0 -4877
- package/packages/core/dist/chunk-V2DX7YIU.js +0 -984
- package/packages/core/dist/chunk-W4IHYUYD.js +0 -772
- package/packages/core/dist/chunk-W6WBG5OY.js +0 -4877
- package/packages/core/dist/chunk-WN3M7O7H.js +0 -3312
- package/packages/core/dist/chunk-WR3NCU7U.js +0 -4877
- package/packages/core/dist/chunk-XC6B6L27.js +0 -82
- package/packages/core/dist/chunk-XNSE64ZY.js +0 -3316
- package/packages/core/dist/chunk-XROES2WN.js +0 -634
- package/packages/core/dist/chunk-XSCKNRCZ.js +0 -5020
- package/packages/core/dist/chunk-XVABPAUZ.js +0 -82
- package/packages/core/dist/chunk-YOBCB5C5.js +0 -596
- package/packages/core/dist/chunk-YUK6Q563.js +0 -666
- package/packages/core/dist/chunk-YXGL3ZEU.js +0 -1030
- package/packages/core/dist/chunk-ZINJ5OUX.js +0 -596
- package/packages/core/dist/chunk-ZPFD4BIQ.js +0 -604
- package/packages/core/dist/chunk-ZQZBFG6F.js +0 -4826
- package/packages/core/dist/chunk-ZZFRJGXM.js +0 -4877
- package/packages/create-krnl/dist/K_ENT_Entity-PQ5MURQY-R2OH4VXE.js +0 -14
- package/packages/create-krnl/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW-AZM5HF4M.js +0 -9
- package/packages/create-krnl/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF-X5N6SV2S.js +0 -111
- package/packages/create-krnl/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF-5PFHF4JU.js +0 -12
- package/packages/create-krnl/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X-ED33OQPH.js +0 -12
- package/packages/create-krnl/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW-YGQLVR4P.js +0 -9
- package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2-VM7CTU2L.js +0 -21
- package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK-Y2GQFJ7I.js +0 -21
- package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7-L3JQWO54.js +0 -8
- package/packages/create-krnl/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU-KQARASPR.js +0 -19
- package/packages/create-krnl/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5-OF3IGLVL.js +0 -59
- package/packages/create-krnl/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF-JOLHKOEX.js +0 -24
- package/packages/create-krnl/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG-L46LSHKQ.js +0 -10
- package/packages/create-krnl/dist/K_LIB_Krnl_Telemetry-77FRZ3KV-4JUPRR3X.js +0 -10
- package/packages/create-krnl/dist/chunk-3TRM6CYL.js +0 -152
- package/packages/create-krnl/dist/chunk-3URCB3QS.js +0 -127
- package/packages/create-krnl/dist/chunk-5JDK35TG.js +0 -3872
- package/packages/create-krnl/dist/chunk-A2XAXDOW.js +0 -812
- package/packages/create-krnl/dist/chunk-AN6TMQHG.js +0 -1033
- package/packages/create-krnl/dist/chunk-BOXWWXQG.js +0 -400
- package/packages/create-krnl/dist/chunk-BPTBREBG.js +0 -38
- package/packages/create-krnl/dist/chunk-FDNCADFE.js +0 -71
- package/packages/create-krnl/dist/chunk-JTLSTO25.js +0 -71
- package/packages/create-krnl/dist/chunk-M3NCUIPL.js +0 -107
- package/packages/create-krnl/dist/chunk-N2EONSOC.js +0 -7769
- package/packages/create-krnl/dist/chunk-OHVMVRBP.js +0 -117
- package/packages/create-krnl/dist/chunk-Q45257P6.js +0 -173
- package/packages/create-krnl/dist/chunk-QGM4M3NI.js +0 -37
- package/packages/create-krnl/dist/chunk-RJNYUXZD.js +0 -977
- package/packages/create-krnl/dist/chunk-SRTOPJ5W.js +0 -104
- package/packages/create-krnl/dist/chunk-UPBIGEC3.js +0 -666
- package/packages/create-krnl/dist/chunk-V2DB7UD7.js +0 -82
- package/packages/create-krnl/dist/chunk-WMHLIUI6.js +0 -3644
- package/packages/create-krnl/dist/chunk-XIRFOO3H.js +0 -589
- package/packages/create-krnl/dist/chunk-Y2CEEVZP.js +0 -5536
- package/packages/create-krnl/dist/main-DXUMPBND.js +0 -2217
- package/packages/create-krnl/dist/wrapper-SDF2VKX3.js +0 -31
|
@@ -11,13 +11,15 @@
|
|
|
11
11
|
"registry": "https://npm.pkg.github.com"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "tsup"
|
|
14
|
+
"build": "tsup",
|
|
15
|
+
"test": "vitest run"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"tsup": "^8.4.0",
|
|
18
|
-
"typescript": "^5.7.3"
|
|
19
|
+
"typescript": "^5.7.3",
|
|
20
|
+
"vitest": "^3.1.0"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
|
-
"@
|
|
23
|
+
"@ultrst-armada/krnl-core": "workspace:*"
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -106,7 +106,7 @@ var helperPurityRule = {
|
|
|
106
106
|
recommended: true
|
|
107
107
|
},
|
|
108
108
|
messages: {
|
|
109
|
-
impureImport: "Helper functions (Layer 1) cannot import I/O or state module '{{module}}'. Delegate to Layer 0 libraries or
|
|
109
|
+
impureImport: "Helper functions (Layer 1) cannot import I/O or state module '{{module}}'. Delegate to Layer 0 libraries or ServiceFacade context."
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
create(context) {
|
|
@@ -137,7 +137,7 @@ var noPollingRule = {
|
|
|
137
137
|
recommended: true
|
|
138
138
|
},
|
|
139
139
|
messages: {
|
|
140
|
-
noPolling: "Prohibited use of '{{callee}}'. Krnl systems must use reactive events (
|
|
140
|
+
noPolling: "Prohibited use of '{{callee}}'. Krnl systems must use reactive events (facade.emitEvent / facade.on) instead of polling."
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
143
|
create(context) {
|
|
@@ -166,11 +166,11 @@ var contextDestructuringRule = {
|
|
|
166
166
|
meta: {
|
|
167
167
|
type: "problem",
|
|
168
168
|
docs: {
|
|
169
|
-
description: "Prevent the { state, system } destructuring trap; require { state,
|
|
169
|
+
description: "Prevent the { state, system } destructuring trap; require { state, facade } or { state, service } in functionality handlers.",
|
|
170
170
|
recommended: true
|
|
171
171
|
},
|
|
172
172
|
messages: {
|
|
173
|
-
destructureSystem: "Functionality context parameter destructures 'system'. Functionality passes { state,
|
|
173
|
+
destructureSystem: "Functionality context parameter destructures 'system'. Functionality passes { state, facade }. Destructure 'facade' or 'service'."
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
create(context) {
|
|
@@ -192,14 +192,14 @@ function checkParams(node, context) {
|
|
|
192
192
|
const ctxParam = node.params[1];
|
|
193
193
|
if (ctxParam && ctxParam.type === "ObjectPattern") {
|
|
194
194
|
let hasSystem = false;
|
|
195
|
-
let
|
|
195
|
+
let hasValidContext = false;
|
|
196
196
|
for (const prop of ctxParam.properties) {
|
|
197
197
|
if (prop.type === "Property" && prop.key.type === "Identifier") {
|
|
198
198
|
if (prop.key.name === "system") hasSystem = true;
|
|
199
|
-
if (prop.key.name
|
|
199
|
+
if (["facade", "service", "orchestration"].includes(prop.key.name)) hasValidContext = true;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
if (hasSystem && !
|
|
202
|
+
if (hasSystem && !hasValidContext) {
|
|
203
203
|
context.report({
|
|
204
204
|
node: ctxParam,
|
|
205
205
|
messageId: "destructureSystem"
|
|
@@ -209,42 +209,6 @@ function checkParams(node, context) {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
// src/rules/no-server-in-subapp.ts
|
|
213
|
-
var noServerInSubappRule = {
|
|
214
|
-
meta: {
|
|
215
|
-
type: "problem",
|
|
216
|
-
docs: {
|
|
217
|
-
description: "Sub-apps must not instantiate HTTP or WebSocket servers directly; Krnl handles network ingress.",
|
|
218
|
-
recommended: true
|
|
219
|
-
},
|
|
220
|
-
messages: {
|
|
221
|
-
noServer: "Sub-apps must NEVER start HTTP/WebSocket servers directly ('{{callee}}'). Krnl provides unified network ingress."
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
create(context) {
|
|
225
|
-
const filename = context.filename || context.getFilename?.() || "";
|
|
226
|
-
const isSubApp = filename.includes("subapps/") || filename.includes("subapp");
|
|
227
|
-
if (!isSubApp) return {};
|
|
228
|
-
return {
|
|
229
|
-
CallExpression(node) {
|
|
230
|
-
let calleeText = "";
|
|
231
|
-
if (node.callee.type === "MemberExpression") {
|
|
232
|
-
const obj = node.callee.object.name || "";
|
|
233
|
-
const prop = node.callee.property.name || "";
|
|
234
|
-
calleeText = `${obj}.${prop}`;
|
|
235
|
-
}
|
|
236
|
-
if (["http.createServer", "https.createServer", "app.listen", "server.listen"].includes(calleeText)) {
|
|
237
|
-
context.report({
|
|
238
|
-
node,
|
|
239
|
-
messageId: "noServer",
|
|
240
|
-
data: { callee: calleeText }
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
|
|
248
212
|
// src/rules/top-level-purity.ts
|
|
249
213
|
var topLevelPurityRule = {
|
|
250
214
|
meta: {
|
|
@@ -408,30 +372,28 @@ var rules = {
|
|
|
408
372
|
"helper-purity": helperPurityRule,
|
|
409
373
|
"no-polling": noPollingRule,
|
|
410
374
|
"context-destructuring": contextDestructuringRule,
|
|
411
|
-
"no-server-in-subapp": noServerInSubappRule,
|
|
412
375
|
"top-level-purity": topLevelPurityRule,
|
|
413
376
|
"one-component-per-file": oneComponentPerFileRule
|
|
414
377
|
};
|
|
415
378
|
var plugin = {
|
|
416
379
|
meta: {
|
|
417
|
-
name: "@
|
|
418
|
-
version: "1.0.
|
|
380
|
+
name: "@ultrst-armada/eslint-plugin-krnl",
|
|
381
|
+
version: "1.0.2"
|
|
419
382
|
},
|
|
420
383
|
rules,
|
|
421
384
|
configs: {
|
|
422
385
|
recommended: {
|
|
423
386
|
plugins: {
|
|
424
|
-
"@
|
|
387
|
+
"@ultrst-armada/krnl": { rules }
|
|
425
388
|
},
|
|
426
389
|
rules: {
|
|
427
|
-
"@
|
|
428
|
-
"@
|
|
429
|
-
"@
|
|
430
|
-
"@
|
|
431
|
-
"@
|
|
432
|
-
"@
|
|
433
|
-
"@
|
|
434
|
-
"@dinilmusick/krnl/one-component-per-file": "error"
|
|
390
|
+
"@ultrst-armada/krnl/file-line-limit": "error",
|
|
391
|
+
"@ultrst-armada/krnl/import-suffix": "error",
|
|
392
|
+
"@ultrst-armada/krnl/helper-purity": "error",
|
|
393
|
+
"@ultrst-armada/krnl/no-polling": "error",
|
|
394
|
+
"@ultrst-armada/krnl/context-destructuring": "error",
|
|
395
|
+
"@ultrst-armada/krnl/top-level-purity": "error",
|
|
396
|
+
"@ultrst-armada/krnl/one-component-per-file": "error"
|
|
435
397
|
}
|
|
436
398
|
}
|
|
437
399
|
}
|
|
@@ -94,23 +94,6 @@ declare const plugin: {
|
|
|
94
94
|
FunctionExpression(node: any): void;
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
|
-
'no-server-in-subapp': {
|
|
98
|
-
meta: {
|
|
99
|
-
type: string;
|
|
100
|
-
docs: {
|
|
101
|
-
description: string;
|
|
102
|
-
recommended: boolean;
|
|
103
|
-
};
|
|
104
|
-
messages: {
|
|
105
|
-
noServer: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
create(context: any): {
|
|
109
|
-
CallExpression?: undefined;
|
|
110
|
-
} | {
|
|
111
|
-
CallExpression(node: any): void;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
97
|
'top-level-purity': {
|
|
115
98
|
meta: {
|
|
116
99
|
type: string;
|
|
@@ -161,7 +144,7 @@ declare const plugin: {
|
|
|
161
144
|
configs: {
|
|
162
145
|
recommended: {
|
|
163
146
|
plugins: {
|
|
164
|
-
'@
|
|
147
|
+
'@ultrst-armada/krnl': {
|
|
165
148
|
rules: {
|
|
166
149
|
'file-line-limit': {
|
|
167
150
|
meta: {
|
|
@@ -253,23 +236,6 @@ declare const plugin: {
|
|
|
253
236
|
FunctionExpression(node: any): void;
|
|
254
237
|
};
|
|
255
238
|
};
|
|
256
|
-
'no-server-in-subapp': {
|
|
257
|
-
meta: {
|
|
258
|
-
type: string;
|
|
259
|
-
docs: {
|
|
260
|
-
description: string;
|
|
261
|
-
recommended: boolean;
|
|
262
|
-
};
|
|
263
|
-
messages: {
|
|
264
|
-
noServer: string;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
create(context: any): {
|
|
268
|
-
CallExpression?: undefined;
|
|
269
|
-
} | {
|
|
270
|
-
CallExpression(node: any): void;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
239
|
'top-level-purity': {
|
|
274
240
|
meta: {
|
|
275
241
|
type: string;
|
|
@@ -320,14 +286,13 @@ declare const plugin: {
|
|
|
320
286
|
};
|
|
321
287
|
};
|
|
322
288
|
rules: {
|
|
323
|
-
'@
|
|
324
|
-
'@
|
|
325
|
-
'@
|
|
326
|
-
'@
|
|
327
|
-
'@
|
|
328
|
-
'@
|
|
329
|
-
'@
|
|
330
|
-
'@dinilmusick/krnl/one-component-per-file': string;
|
|
289
|
+
'@ultrst-armada/krnl/file-line-limit': string;
|
|
290
|
+
'@ultrst-armada/krnl/import-suffix': string;
|
|
291
|
+
'@ultrst-armada/krnl/helper-purity': string;
|
|
292
|
+
'@ultrst-armada/krnl/no-polling': string;
|
|
293
|
+
'@ultrst-armada/krnl/context-destructuring': string;
|
|
294
|
+
'@ultrst-armada/krnl/top-level-purity': string;
|
|
295
|
+
'@ultrst-armada/krnl/one-component-per-file': string;
|
|
331
296
|
};
|
|
332
297
|
};
|
|
333
298
|
};
|
|
@@ -94,23 +94,6 @@ declare const plugin: {
|
|
|
94
94
|
FunctionExpression(node: any): void;
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
|
-
'no-server-in-subapp': {
|
|
98
|
-
meta: {
|
|
99
|
-
type: string;
|
|
100
|
-
docs: {
|
|
101
|
-
description: string;
|
|
102
|
-
recommended: boolean;
|
|
103
|
-
};
|
|
104
|
-
messages: {
|
|
105
|
-
noServer: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
create(context: any): {
|
|
109
|
-
CallExpression?: undefined;
|
|
110
|
-
} | {
|
|
111
|
-
CallExpression(node: any): void;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
97
|
'top-level-purity': {
|
|
115
98
|
meta: {
|
|
116
99
|
type: string;
|
|
@@ -161,7 +144,7 @@ declare const plugin: {
|
|
|
161
144
|
configs: {
|
|
162
145
|
recommended: {
|
|
163
146
|
plugins: {
|
|
164
|
-
'@
|
|
147
|
+
'@ultrst-armada/krnl': {
|
|
165
148
|
rules: {
|
|
166
149
|
'file-line-limit': {
|
|
167
150
|
meta: {
|
|
@@ -253,23 +236,6 @@ declare const plugin: {
|
|
|
253
236
|
FunctionExpression(node: any): void;
|
|
254
237
|
};
|
|
255
238
|
};
|
|
256
|
-
'no-server-in-subapp': {
|
|
257
|
-
meta: {
|
|
258
|
-
type: string;
|
|
259
|
-
docs: {
|
|
260
|
-
description: string;
|
|
261
|
-
recommended: boolean;
|
|
262
|
-
};
|
|
263
|
-
messages: {
|
|
264
|
-
noServer: string;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
create(context: any): {
|
|
268
|
-
CallExpression?: undefined;
|
|
269
|
-
} | {
|
|
270
|
-
CallExpression(node: any): void;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
239
|
'top-level-purity': {
|
|
274
240
|
meta: {
|
|
275
241
|
type: string;
|
|
@@ -320,14 +286,13 @@ declare const plugin: {
|
|
|
320
286
|
};
|
|
321
287
|
};
|
|
322
288
|
rules: {
|
|
323
|
-
'@
|
|
324
|
-
'@
|
|
325
|
-
'@
|
|
326
|
-
'@
|
|
327
|
-
'@
|
|
328
|
-
'@
|
|
329
|
-
'@
|
|
330
|
-
'@dinilmusick/krnl/one-component-per-file': string;
|
|
289
|
+
'@ultrst-armada/krnl/file-line-limit': string;
|
|
290
|
+
'@ultrst-armada/krnl/import-suffix': string;
|
|
291
|
+
'@ultrst-armada/krnl/helper-purity': string;
|
|
292
|
+
'@ultrst-armada/krnl/no-polling': string;
|
|
293
|
+
'@ultrst-armada/krnl/context-destructuring': string;
|
|
294
|
+
'@ultrst-armada/krnl/top-level-purity': string;
|
|
295
|
+
'@ultrst-armada/krnl/one-component-per-file': string;
|
|
331
296
|
};
|
|
332
297
|
};
|
|
333
298
|
};
|
|
@@ -80,7 +80,7 @@ var helperPurityRule = {
|
|
|
80
80
|
recommended: true
|
|
81
81
|
},
|
|
82
82
|
messages: {
|
|
83
|
-
impureImport: "Helper functions (Layer 1) cannot import I/O or state module '{{module}}'. Delegate to Layer 0 libraries or
|
|
83
|
+
impureImport: "Helper functions (Layer 1) cannot import I/O or state module '{{module}}'. Delegate to Layer 0 libraries or ServiceFacade context."
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
create(context) {
|
|
@@ -111,7 +111,7 @@ var noPollingRule = {
|
|
|
111
111
|
recommended: true
|
|
112
112
|
},
|
|
113
113
|
messages: {
|
|
114
|
-
noPolling: "Prohibited use of '{{callee}}'. Krnl systems must use reactive events (
|
|
114
|
+
noPolling: "Prohibited use of '{{callee}}'. Krnl systems must use reactive events (facade.emitEvent / facade.on) instead of polling."
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
create(context) {
|
|
@@ -140,11 +140,11 @@ var contextDestructuringRule = {
|
|
|
140
140
|
meta: {
|
|
141
141
|
type: "problem",
|
|
142
142
|
docs: {
|
|
143
|
-
description: "Prevent the { state, system } destructuring trap; require { state,
|
|
143
|
+
description: "Prevent the { state, system } destructuring trap; require { state, facade } or { state, service } in functionality handlers.",
|
|
144
144
|
recommended: true
|
|
145
145
|
},
|
|
146
146
|
messages: {
|
|
147
|
-
destructureSystem: "Functionality context parameter destructures 'system'. Functionality passes { state,
|
|
147
|
+
destructureSystem: "Functionality context parameter destructures 'system'. Functionality passes { state, facade }. Destructure 'facade' or 'service'."
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
150
|
create(context) {
|
|
@@ -166,14 +166,14 @@ function checkParams(node, context) {
|
|
|
166
166
|
const ctxParam = node.params[1];
|
|
167
167
|
if (ctxParam && ctxParam.type === "ObjectPattern") {
|
|
168
168
|
let hasSystem = false;
|
|
169
|
-
let
|
|
169
|
+
let hasValidContext = false;
|
|
170
170
|
for (const prop of ctxParam.properties) {
|
|
171
171
|
if (prop.type === "Property" && prop.key.type === "Identifier") {
|
|
172
172
|
if (prop.key.name === "system") hasSystem = true;
|
|
173
|
-
if (prop.key.name
|
|
173
|
+
if (["facade", "service", "orchestration"].includes(prop.key.name)) hasValidContext = true;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
if (hasSystem && !
|
|
176
|
+
if (hasSystem && !hasValidContext) {
|
|
177
177
|
context.report({
|
|
178
178
|
node: ctxParam,
|
|
179
179
|
messageId: "destructureSystem"
|
|
@@ -183,42 +183,6 @@ function checkParams(node, context) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
// src/rules/no-server-in-subapp.ts
|
|
187
|
-
var noServerInSubappRule = {
|
|
188
|
-
meta: {
|
|
189
|
-
type: "problem",
|
|
190
|
-
docs: {
|
|
191
|
-
description: "Sub-apps must not instantiate HTTP or WebSocket servers directly; Krnl handles network ingress.",
|
|
192
|
-
recommended: true
|
|
193
|
-
},
|
|
194
|
-
messages: {
|
|
195
|
-
noServer: "Sub-apps must NEVER start HTTP/WebSocket servers directly ('{{callee}}'). Krnl provides unified network ingress."
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
create(context) {
|
|
199
|
-
const filename = context.filename || context.getFilename?.() || "";
|
|
200
|
-
const isSubApp = filename.includes("subapps/") || filename.includes("subapp");
|
|
201
|
-
if (!isSubApp) return {};
|
|
202
|
-
return {
|
|
203
|
-
CallExpression(node) {
|
|
204
|
-
let calleeText = "";
|
|
205
|
-
if (node.callee.type === "MemberExpression") {
|
|
206
|
-
const obj = node.callee.object.name || "";
|
|
207
|
-
const prop = node.callee.property.name || "";
|
|
208
|
-
calleeText = `${obj}.${prop}`;
|
|
209
|
-
}
|
|
210
|
-
if (["http.createServer", "https.createServer", "app.listen", "server.listen"].includes(calleeText)) {
|
|
211
|
-
context.report({
|
|
212
|
-
node,
|
|
213
|
-
messageId: "noServer",
|
|
214
|
-
data: { callee: calleeText }
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
|
|
222
186
|
// src/rules/top-level-purity.ts
|
|
223
187
|
var topLevelPurityRule = {
|
|
224
188
|
meta: {
|
|
@@ -382,30 +346,28 @@ var rules = {
|
|
|
382
346
|
"helper-purity": helperPurityRule,
|
|
383
347
|
"no-polling": noPollingRule,
|
|
384
348
|
"context-destructuring": contextDestructuringRule,
|
|
385
|
-
"no-server-in-subapp": noServerInSubappRule,
|
|
386
349
|
"top-level-purity": topLevelPurityRule,
|
|
387
350
|
"one-component-per-file": oneComponentPerFileRule
|
|
388
351
|
};
|
|
389
352
|
var plugin = {
|
|
390
353
|
meta: {
|
|
391
|
-
name: "@
|
|
392
|
-
version: "1.0.
|
|
354
|
+
name: "@ultrst-armada/eslint-plugin-krnl",
|
|
355
|
+
version: "1.0.2"
|
|
393
356
|
},
|
|
394
357
|
rules,
|
|
395
358
|
configs: {
|
|
396
359
|
recommended: {
|
|
397
360
|
plugins: {
|
|
398
|
-
"@
|
|
361
|
+
"@ultrst-armada/krnl": { rules }
|
|
399
362
|
},
|
|
400
363
|
rules: {
|
|
401
|
-
"@
|
|
402
|
-
"@
|
|
403
|
-
"@
|
|
404
|
-
"@
|
|
405
|
-
"@
|
|
406
|
-
"@
|
|
407
|
-
"@
|
|
408
|
-
"@dinilmusick/krnl/one-component-per-file": "error"
|
|
364
|
+
"@ultrst-armada/krnl/file-line-limit": "error",
|
|
365
|
+
"@ultrst-armada/krnl/import-suffix": "error",
|
|
366
|
+
"@ultrst-armada/krnl/helper-purity": "error",
|
|
367
|
+
"@ultrst-armada/krnl/no-polling": "error",
|
|
368
|
+
"@ultrst-armada/krnl/context-destructuring": "error",
|
|
369
|
+
"@ultrst-armada/krnl/top-level-purity": "error",
|
|
370
|
+
"@ultrst-armada/krnl/one-component-per-file": "error"
|
|
409
371
|
}
|
|
410
372
|
}
|
|
411
373
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
3
|
-
"version": "1.0.
|
|
2
|
+
"name": "@ultrst-armada/eslint-plugin-krnl",
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "ESLint plugin enforcing Krnl backend service purity, 4-layer architecture, and backend standards",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
15
|
-
"
|
|
15
|
+
"access": "public",
|
|
16
|
+
"registry": "https://registry.npmjs.org/"
|
|
16
17
|
},
|
|
17
18
|
"scripts": {
|
|
18
|
-
"build": "tsup src/index.ts --dts --format esm,cjs"
|
|
19
|
+
"build": "tsup src/index.ts --dts --format esm,cjs --clean"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"tsup": "^8.4.0",
|