vona-module-a-core 5.0.173 → 5.1.1
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/LICENSE +0 -0
- package/assets/static/img/vona.svg +2 -15
- package/dist/.metadata/index.d.ts +1 -0
- package/dist/.metadata/index.d.ts.map +1 -0
- package/dist/.metadata/this.d.ts +1 -0
- package/dist/.metadata/this.d.ts.map +1 -0
- package/dist/bean/bean.core.d.ts +1 -0
- package/dist/bean/bean.core.d.ts.map +1 -0
- package/dist/bean/meta.runtime.d.ts +1 -0
- package/dist/bean/meta.runtime.d.ts.map +1 -0
- package/dist/bean/meta.static.d.ts +1 -0
- package/dist/bean/meta.static.d.ts.map +1 -0
- package/dist/bean/middleware.gate.d.ts +1 -0
- package/dist/bean/middleware.gate.d.ts.map +1 -0
- package/dist/bean/middlewareSystem.notfound.d.ts +1 -0
- package/dist/bean/middlewareSystem.notfound.d.ts.map +1 -0
- package/dist/bean/middlewareSystem.overrideMethod.d.ts +1 -0
- package/dist/bean/middlewareSystem.overrideMethod.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/core.d.ts +1 -0
- package/dist/lib/core.d.ts.map +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/package.json +68 -64
- package/src/.metadata/index.ts +163 -0
- package/src/.metadata/this.ts +2 -0
- package/src/bean/bean.core.ts +21 -0
- package/src/bean/meta.runtime.ts +19 -0
- package/src/bean/meta.static.ts +7 -0
- package/src/bean/middleware.gate.ts +23 -0
- package/src/bean/middlewareSystem.notfound.ts +47 -0
- package/src/bean/middlewareSystem.overrideMethod.ts +27 -0
- package/src/index.ts +2 -0
- package/src/lib/core.ts +43 -0
- package/src/lib/index.ts +1 -0
package/LICENSE
CHANGED
|
File without changes
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="341.5 169 86.8125 155" width="86.8125" height="155">
|
|
4
|
-
<defs/>
|
|
5
|
-
<g id="Canvas_1" stroke-dasharray="none" stroke="none" fill-opacity="1" fill="none" stroke-opacity="1">
|
|
6
|
-
<title>Canvas 1</title>
|
|
7
|
-
<g id="Canvas_1_Layer_1">
|
|
8
|
-
<title>Layer 1</title>
|
|
9
|
-
<g id="Graphic_2">
|
|
10
|
-
<text transform="translate(346.5 174)" fill="#ff9300">
|
|
11
|
-
<tspan font-family="Courier New" font-weight="bold" font-size="128" fill="#ff9300" x="0" y="107" xml:space="preserve">V</tspan>
|
|
12
|
-
</text>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
1
|
+
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M18.5156 0C18.7656 0 18.9583 0.046875 19.0938 0.140625C19.2292 0.223958 19.3281 0.380208 19.3906 0.609375C19.4635 0.838542 19.5 1.17188 19.5 1.60938C19.5 2.04688 19.4635 2.38021 19.3906 2.60938C19.3281 2.83854 19.2292 2.99479 19.0938 3.07812C18.9583 3.16146 18.7656 3.20312 18.5156 3.20312H17.4531L11.7812 17.875C11.6354 18.25 11.4115 18.5104 11.1094 18.6562C10.8073 18.8125 10.3385 18.8906 9.70312 18.8906C9.06771 18.8906 8.59896 18.8125 8.29688 18.6562C8.00521 18.5 7.79167 18.2396 7.65625 17.875L2.1875 3.20312H0.984375C0.734375 3.20312 0.541667 3.16146 0.40625 3.07812C0.270833 2.99479 0.171875 2.83854 0.109375 2.60938C0.0364583 2.38021 0 2.04688 0 1.60938C0 1.17188 0.0364583 0.838542 0.109375 0.609375C0.171875 0.380208 0.270833 0.223958 0.40625 0.140625C0.541667 0.046875 0.734375 0 0.984375 0H7.76562C8.01562 0 8.20833 0.046875 8.34375 0.140625C8.47917 0.223958 8.57812 0.380208 8.64062 0.609375C8.71354 0.838542 8.75 1.17188 8.75 1.60938C8.75 2.04688 8.71354 2.38021 8.64062 2.60938C8.57812 2.83854 8.47917 2.99479 8.34375 3.07812C8.20833 3.16146 8.01562 3.20312 7.76562 3.20312H6.375L9.73438 12.7812L13.3125 3.20312H12.2031C11.9531 3.20312 11.7604 3.16146 11.625 3.07812C11.4896 2.99479 11.3854 2.83854 11.3125 2.60938C11.25 2.38021 11.2188 2.04688 11.2188 1.60938C11.2188 1.17188 11.25 0.838542 11.3125 0.609375C11.3854 0.380208 11.4896 0.223958 11.625 0.140625C11.7604 0.046875 11.9531 0 12.2031 0H18.5156Z" fill="#FF9300"/>
|
|
16
3
|
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/.metadata/index.ts"],"names":[],"mappings":"AACA,wBAAwB;AACxB,cAAc,4BAA4B,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,sBAAsB,CAAC;AAC9B,OAAO,QAAQ,sBAAsB,CAAC;IAElC,UAAiB,uBAAuB;QACtC,aAAa,EAAE,sBAAsB,CAAC;KACvC;CAGJ;AACD,OAAO,QAAQ,oBAAoB,CAAC;IAE5B,UAAiB,cAAc;KAG9B;IAEC,UAAiB,cAAc;QAC7B,IAAI,aAAa,IAAI,wBAAwB,CAAC;QAC9C,IAAI,UAAU,IAAI,aAAa,CAAC;QAChC,IAAI,aAAa,IAAI,sBAAsB,CAAC;KAC7C;CACV;AACD,sBAAsB;AACtB,8BAA8B;AAC9B,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,KAAK,EAAE,sCAAsC,EAAE,MA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C;IAE5B,UAAiB,WAAW;KAG3B;IAEC,UAAiB,WAAW;QAC1B,IAAI,aAAa,IAAI,qBAAqB,CAAC;QAC3C,IAAI,UAAU,IAAI,gBAAgB,CAAC;KAEpC;IAEH,UAAiB,UAAU;KAG1B;IAEC,UAAiB,UAAU;QACzB,IAAI,aAAa,IAAI,oBAAoB,CAAC;QAC1C,IAAI,UAAU,IAAI,eAAe,CAAC;KAEnC;CACV;AACD,gBAAgB;AAChB,yBAAyB;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,uBAAuB;AACvB,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAGzD,qBACa,gBAAiB,SAAQ,aAAa;CAAG;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,UAAU,CAAC;CAClB;AAED,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,gBAAgB;QAC/B,QAAQ,EAAE,gBAAgB,CAAC;KAC5B;IAED,UAAiB,mBAAmB;QAClC,IAAI,EAAE,gBAAgB,CAAC;KACxB;CAOF;AACD,iBAAiB"}
|
package/dist/.metadata/this.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"this.d.ts","sourceRoot":"","sources":["../../src/.metadata/this.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,OAAO,EAAE,gBAAgB,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/bean/bean.core.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bean.core.d.ts","sourceRoot":"","sources":["../../src/bean/bean.core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGhC,qBACa,QAAS,SAAQ,QAAQ;IACpC,IAAI,QAAQ,WAEX;IAED,IAAI,IAAI,WAEP;IAED,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM;IAI5B,uBAAuB,CAAC,IAAI,EAAE,MAAM;CAGrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.runtime.d.ts","sourceRoot":"","sources":["../../src/bean/meta.runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGhC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBACa,WAAY,SAAQ,QAAS,YAAW,mBAAmB;IAChE,OAAO,IAAI,OAAO,CAAC,qBAAqB,CAAC;CAMhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.static.d.ts","sourceRoot":"","sources":["../../src/bean/meta.static.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,cAAc,CAAC;AAEhE,qBACa,UAAW,SAAQ,cAAc,CAAC,iBAAiB,CAAC;CAAG"}
|
|
@@ -8,3 +8,4 @@ export interface IMiddlewareOptionsGate extends IDecoratorMiddlewareOptionsGloba
|
|
|
8
8
|
export declare class MiddlewareGate extends BeanBase implements IMiddlewareExecute {
|
|
9
9
|
execute(options: IMiddlewareOptionsGate, next: Next): Promise<any>;
|
|
10
10
|
}
|
|
11
|
+
//# sourceMappingURL=middleware.gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.gate.d.ts","sourceRoot":"","sources":["../../src/bean/middleware.gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAU,MAAM,MAAM,CAAC;AAGxC,MAAM,WAAW,sBAAuB,SAAQ,iCAAiC;IAC/E,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B;AAED,qBAEa,cAAe,SAAQ,QAAS,YAAW,kBAAkB;IAClE,OAAO,CAAC,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,IAAI;CAQ1D"}
|
|
@@ -7,3 +7,4 @@ export interface IMiddlewareSystemOptionsNotfound extends IDecoratorMiddlewareSy
|
|
|
7
7
|
export declare class MiddlewareSystemNotfound extends BeanBase implements IMiddlewareSystemExecute {
|
|
8
8
|
execute(options: IMiddlewareSystemOptionsNotfound, next: Next): Promise<void>;
|
|
9
9
|
}
|
|
10
|
+
//# sourceMappingURL=middlewareSystem.notfound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middlewareSystem.notfound.d.ts","sourceRoot":"","sources":["../../src/bean/middlewareSystem.notfound.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,iCAAiC,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAExG,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGhC,MAAM,WAAW,gCAAiC,SAAQ,iCAAiC;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBACa,wBAAyB,SAAQ,QAAS,YAAW,wBAAwB;IAClF,OAAO,CAAC,OAAO,EAAE,gCAAgC,EAAE,IAAI,EAAE,IAAI;CAkCpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middlewareSystem.overrideMethod.d.ts","sourceRoot":"","sources":["../../src/bean/middlewareSystem.overrideMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,iCAAiC,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAGxG,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAKhC,MAAM,WAAW,sCAAuC,SAAQ,iCAAiC;IAC/F,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,qBAIa,8BAA+B,SAAQ,QAAS,YAAW,wBAAwB;IAC9F,OAAO,CAAC,eAAe,CAAM;IAEvB,OAAO,CAAC,OAAO,EAAE,sCAAsC,EAAE,IAAI,EAAE,IAAI;CAM1E"}
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/bean/middleware.gate.ts","../src/bean/middlewareSystem.notfound.ts","../src/bean/middlewareSystem.overrideMethod.ts","../src/bean/bean.core.ts","../src/bean/meta.runtime.ts","../src/bean/meta.static.ts","../src/.metadata/index.ts","../src/lib/core.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["MiddlewareGate","BeanBase","execute","options","next","app","bean","onion","checkOnionOptionsMeta","gate","throw","__decorate","Middleware","Global","__z_BeanInfo","module","MiddlewareSystemNotfound","ctx","status","body","acceptJSON","message","notFoundHtml","pageUrl","path","realStatus","redirect","MiddlewareSystem","dependencies","overrideMethod","overrideMethodImport","MiddlewareSystemOverrideMethod","constructor","args","_overrideMethod","allowedMethods","BeanCore","protocol","util","host","getAbsoluteUrl","getAbsoluteUrlByApiPath","Bean","MetaRuntime","core","Meta","MetaStatic","BeanStaticBase","ScopeModuleACore","BeanScopeBase","Scope","Gate","Aspect","middlewareGlobal","Error","filterGlobal","Log","aopMethod","Transaction","CaptchaVerify","interceptor","FileUpload","Core","error","log","transaction","captchaVerify","fileUpload"],"mappings":";;;;;;;;AAaO,IAAMA,cAAc,GAApB,MAAMA,cAAe,SAAQC,QAAQ,CAAA;AAC1C,EAAA,MAAMC,OAAOA,CAACC,OAA+B,EAAEC,IAAU,EAAA;AACvD;AACA,IAAA,IAAI,CAAC,IAAI,CAACC,GAAG,CAACC,IAAI,CAACC,KAAK,CAACC,qBAAqB,CAACL,OAAO,CAACM,IAAI,CAAC,EAAE;AAC5D,MAAA,IAAI,CAACJ,GAAG,CAACK,KAAK,CAAC,GAAG,CAAC;AACrB,IAAA;AACA;IACA,OAAON,IAAI,EAAE;AACf,EAAA;;AARWJ,cAAc,GAAAW,UAAA,CAAA,CAF1BC,UAAU,EAA0B,EACpCC,MAAM,EAAE,EAAAC,QAAA,CAAA;EAAAC,MAAA,EAAA;AAAA,CAAA,CAAA,CACI,EAAAf,cAAc,CAS1B;;ACXM,IAAMgB,wBAAwB,GAA9B,MAAMA,wBAAyB,SAAQf,QAAQ,CAAA;AACpD,EAAA,MAAMC,OAAOA,CAACC,OAAyC,EAAEC,IAAU,EAAA;AACjE,IAAA,MAAMa,GAAG,GAAG,IAAI,CAACA,GAAG;IAEpB,MAAMb,IAAI,EAAE;IAEZ,IAAIa,GAAG,CAACC,MAAM,KAAK,GAAG,IAAID,GAAG,CAACE,IAAI,EAAE;AAClC,MAAA;AACF,IAAA;AAEA;IACAF,GAAG,CAACC,MAAM,GAAG,GAAG;IAEhB,IAAID,GAAG,CAACG,UAAU,EAAE;MAClBH,GAAG,CAACE,IAAI,GAAG;AACTE,QAAAA,OAAO,EAAE;OACV;AACD,MAAA;AACF,IAAA;IAEA,MAAMC,YAAY,GAAG,wBAAwB;AAE7C;IACA,IAAInB,OAAO,CAACoB,OAAO,IAAIN,GAAG,CAACO,IAAI,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OhB,CAAC"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,57 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-module-a-core",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"title": "a-core",
|
|
6
|
-
"vonaModule": {
|
|
7
|
-
"dependencies": {},
|
|
8
|
-
"globalDependencies": {
|
|
9
|
-
"@babel/core": true,
|
|
10
|
-
"@babel/traverse": true,
|
|
11
|
-
"@cabloy/deps": true,
|
|
12
|
-
"@cabloy/json5": true,
|
|
13
|
-
"@cabloy/module-info:": true,
|
|
14
|
-
"@cabloy/type-fest": true,
|
|
15
|
-
"@cabloy/utils": true,
|
|
16
|
-
"@cabloy/word-utils": true,
|
|
17
|
-
"bignumber.js": true,
|
|
18
|
-
"boxen": true,
|
|
19
|
-
"chalk": true,
|
|
20
|
-
"cli-table3": true,
|
|
21
|
-
"fs-extra": true,
|
|
22
|
-
"luxon": true,
|
|
23
|
-
"mutate-on-copy": true,
|
|
24
|
-
"react": true,
|
|
25
|
-
"retry": true,
|
|
26
|
-
"uuid": true,
|
|
27
|
-
"vona-shared": true,
|
|
28
|
-
"winston": true
|
|
29
|
-
},
|
|
30
|
-
"globalDependenciesDev": {
|
|
31
|
-
"@cabloy/cli": true,
|
|
32
|
-
"@swc/core": true,
|
|
33
|
-
"@swc/helpers": true,
|
|
34
|
-
"@types/babel__core": true,
|
|
35
|
-
"@types/babel__traverse": true,
|
|
36
|
-
"@types/koa": true,
|
|
37
|
-
"@types/luxon": true,
|
|
38
|
-
"@types/node": true,
|
|
39
|
-
"@types/react": true,
|
|
40
|
-
"@types/retry": true,
|
|
41
|
-
"cross-env": true,
|
|
42
|
-
"gogocode": true,
|
|
43
|
-
"ts-node-maintained": true,
|
|
44
|
-
"tslib": true,
|
|
45
|
-
"typescript": true,
|
|
46
|
-
"vona-mock": true,
|
|
47
|
-
"why-is-node-running": true
|
|
48
|
-
}
|
|
49
|
-
},
|
|
3
|
+
"version": "5.1.1",
|
|
4
|
+
"gitHead": "991189da4443b789fcf77872990b901ccf43bccb",
|
|
50
5
|
"description": "",
|
|
51
|
-
"author": "",
|
|
52
6
|
"keywords": [
|
|
53
7
|
"Vona Module"
|
|
54
8
|
],
|
|
9
|
+
"author": "",
|
|
10
|
+
"files": [
|
|
11
|
+
"assets",
|
|
12
|
+
"dist",
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
55
16
|
"exports": {
|
|
56
17
|
".": {
|
|
57
18
|
"types": [
|
|
@@ -62,18 +23,21 @@
|
|
|
62
23
|
},
|
|
63
24
|
"./package.json": "./package.json"
|
|
64
25
|
},
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
26
|
+
"scripts": {
|
|
27
|
+
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
28
|
+
"tsc:publish": "npm run clean && vona :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
|
|
29
|
+
"prepublishOnly": "npm run tsc:publish",
|
|
30
|
+
"prepack": "clean-package",
|
|
31
|
+
"postpack": "clean-package restore && npm run clean"
|
|
32
|
+
},
|
|
69
33
|
"dependencies": {
|
|
70
34
|
"@babel/core": "^7.28.0",
|
|
71
35
|
"@babel/traverse": "^7.28.0",
|
|
72
|
-
"@cabloy/deps": "^1.
|
|
73
|
-
"@cabloy/json5": "^1.
|
|
74
|
-
"@cabloy/module-info": "^
|
|
36
|
+
"@cabloy/deps": "^1.1.1",
|
|
37
|
+
"@cabloy/json5": "^1.1.1",
|
|
38
|
+
"@cabloy/module-info": "^2.0.0",
|
|
75
39
|
"@cabloy/type-fest": "^5.3.1",
|
|
76
|
-
"@cabloy/utils": "^2.
|
|
40
|
+
"@cabloy/utils": "^2.1.1",
|
|
77
41
|
"@cabloy/word-utils": "^2.0.2",
|
|
78
42
|
"bignumber.js": "^9.3.1",
|
|
79
43
|
"boxen": "^8.0.1",
|
|
@@ -86,11 +50,11 @@
|
|
|
86
50
|
"react": "^19.2.3",
|
|
87
51
|
"retry": "^0.13.1",
|
|
88
52
|
"uuid": "^11.0.3",
|
|
89
|
-
"vona-shared": "^1.
|
|
53
|
+
"vona-shared": "^1.1.1",
|
|
90
54
|
"winston": "^3.17.0"
|
|
91
55
|
},
|
|
92
56
|
"devDependencies": {
|
|
93
|
-
"@cabloy/cli": "^3.
|
|
57
|
+
"@cabloy/cli": "^3.1.1",
|
|
94
58
|
"@swc/core": "^1.14.0",
|
|
95
59
|
"@swc/helpers": "^0.5.17",
|
|
96
60
|
"@types/babel__core": "^7.20.5",
|
|
@@ -107,12 +71,52 @@
|
|
|
107
71
|
"ts-node-maintained": "^10.9.6",
|
|
108
72
|
"tslib": "^2.8.1",
|
|
109
73
|
"typescript": "^5.9.3",
|
|
110
|
-
"vona-mock": "^6.
|
|
74
|
+
"vona-mock": "^6.1.1",
|
|
111
75
|
"why-is-node-running": "^3.2.2"
|
|
112
76
|
},
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
77
|
+
"title": "a-core",
|
|
78
|
+
"vonaModule": {
|
|
79
|
+
"dependencies": {},
|
|
80
|
+
"globalDependencies": {
|
|
81
|
+
"@babel/core": true,
|
|
82
|
+
"@babel/traverse": true,
|
|
83
|
+
"@cabloy/deps": true,
|
|
84
|
+
"@cabloy/json5": true,
|
|
85
|
+
"@cabloy/module-info": true,
|
|
86
|
+
"@cabloy/type-fest": true,
|
|
87
|
+
"@cabloy/utils": true,
|
|
88
|
+
"@cabloy/word-utils": true,
|
|
89
|
+
"bignumber.js": true,
|
|
90
|
+
"boxen": true,
|
|
91
|
+
"chalk": true,
|
|
92
|
+
"cli-table3": true,
|
|
93
|
+
"fs-extra": true,
|
|
94
|
+
"luxon": true,
|
|
95
|
+
"mutate-on-copy": true,
|
|
96
|
+
"react": true,
|
|
97
|
+
"retry": true,
|
|
98
|
+
"uuid": true,
|
|
99
|
+
"vona-shared": true,
|
|
100
|
+
"winston": true
|
|
101
|
+
},
|
|
102
|
+
"globalDependenciesDev": {
|
|
103
|
+
"@cabloy/cli": true,
|
|
104
|
+
"@swc/core": true,
|
|
105
|
+
"@swc/helpers": true,
|
|
106
|
+
"@types/babel__core": true,
|
|
107
|
+
"@types/babel__traverse": true,
|
|
108
|
+
"@types/koa": true,
|
|
109
|
+
"@types/luxon": true,
|
|
110
|
+
"@types/node": true,
|
|
111
|
+
"@types/react": true,
|
|
112
|
+
"@types/retry": true,
|
|
113
|
+
"cross-env": true,
|
|
114
|
+
"gogocode": true,
|
|
115
|
+
"ts-node-maintained": true,
|
|
116
|
+
"tslib": true,
|
|
117
|
+
"typescript": true,
|
|
118
|
+
"vona-mock": true,
|
|
119
|
+
"why-is-node-running": true
|
|
120
|
+
}
|
|
117
121
|
}
|
|
118
|
-
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// eslint-disable
|
|
2
|
+
/** middleware: begin */
|
|
3
|
+
export * from '../bean/middleware.gate.ts';
|
|
4
|
+
import type { IMiddlewareOptionsGate } from '../bean/middleware.gate.ts';
|
|
5
|
+
import 'vona-module-a-aspect';
|
|
6
|
+
declare module 'vona-module-a-aspect' {
|
|
7
|
+
|
|
8
|
+
export interface IMiddlewareRecordGlobal {
|
|
9
|
+
'a-core:gate': IMiddlewareOptionsGate;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
declare module 'vona-module-a-core' {
|
|
15
|
+
|
|
16
|
+
export interface MiddlewareGate {
|
|
17
|
+
/** @internal */
|
|
18
|
+
get scope(): ScopeModuleACore;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface MiddlewareGate {
|
|
22
|
+
get $beanFullName(): 'a-core.middleware.gate';
|
|
23
|
+
get $onionName(): 'a-core:gate';
|
|
24
|
+
get $onionOptions(): IMiddlewareOptionsGate;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** middleware: end */
|
|
28
|
+
/** middlewareSystem: begin */
|
|
29
|
+
export * from '../bean/middlewareSystem.notfound.ts';
|
|
30
|
+
export * from '../bean/middlewareSystem.overrideMethod.ts';
|
|
31
|
+
import type { IMiddlewareSystemOptionsNotfound } from '../bean/middlewareSystem.notfound.ts';
|
|
32
|
+
import type { IMiddlewareSystemOptionsOverrideMethod } from '../bean/middlewareSystem.overrideMethod.ts';
|
|
33
|
+
import 'vona-module-a-aspect';
|
|
34
|
+
declare module 'vona-module-a-aspect' {
|
|
35
|
+
|
|
36
|
+
export interface IMiddlewareSystemRecord {
|
|
37
|
+
'a-core:notfound': IMiddlewareSystemOptionsNotfound;
|
|
38
|
+
'a-core:overrideMethod': IMiddlewareSystemOptionsOverrideMethod;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
declare module 'vona-module-a-core' {
|
|
44
|
+
|
|
45
|
+
export interface MiddlewareSystemNotfound {
|
|
46
|
+
/** @internal */
|
|
47
|
+
get scope(): ScopeModuleACore;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface MiddlewareSystemNotfound {
|
|
51
|
+
get $beanFullName(): 'a-core.middlewareSystem.notfound';
|
|
52
|
+
get $onionName(): 'a-core:notfound';
|
|
53
|
+
get $onionOptions(): IMiddlewareSystemOptionsNotfound;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface MiddlewareSystemOverrideMethod {
|
|
57
|
+
/** @internal */
|
|
58
|
+
get scope(): ScopeModuleACore;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface MiddlewareSystemOverrideMethod {
|
|
62
|
+
get $beanFullName(): 'a-core.middlewareSystem.overrideMethod';
|
|
63
|
+
get $onionName(): 'a-core:overrideMethod';
|
|
64
|
+
get $onionOptions(): IMiddlewareSystemOptionsOverrideMethod;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** middlewareSystem: end */
|
|
68
|
+
/** bean: begin */
|
|
69
|
+
export * from '../bean/bean.core.ts';
|
|
70
|
+
|
|
71
|
+
import 'vona';
|
|
72
|
+
declare module 'vona' {
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
declare module 'vona-module-a-core' {
|
|
77
|
+
|
|
78
|
+
export interface BeanCore {
|
|
79
|
+
/** @internal */
|
|
80
|
+
get scope(): ScopeModuleACore;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** bean: end */
|
|
84
|
+
/** bean: begin */
|
|
85
|
+
import type { BeanCore } from '../bean/bean.core.ts';
|
|
86
|
+
import 'vona';
|
|
87
|
+
declare module 'vona' {
|
|
88
|
+
export interface IBeanRecordGlobal {
|
|
89
|
+
'core': BeanCore;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/** bean: end */
|
|
93
|
+
/** meta: begin */
|
|
94
|
+
export * from '../bean/meta.runtime.ts';
|
|
95
|
+
export * from '../bean/meta.static.ts';
|
|
96
|
+
|
|
97
|
+
import 'vona-module-a-meta';
|
|
98
|
+
declare module 'vona-module-a-meta' {
|
|
99
|
+
|
|
100
|
+
export interface IMetaRecord {
|
|
101
|
+
'a-core:runtime': never;
|
|
102
|
+
'a-core:static': never;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
}
|
|
107
|
+
declare module 'vona-module-a-core' {
|
|
108
|
+
|
|
109
|
+
export interface MetaRuntime {
|
|
110
|
+
/** @internal */
|
|
111
|
+
get scope(): ScopeModuleACore;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface MetaRuntime {
|
|
115
|
+
get $beanFullName(): 'a-core.meta.runtime';
|
|
116
|
+
get $onionName(): 'a-core:runtime';
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface MetaStatic {
|
|
121
|
+
/** @internal */
|
|
122
|
+
get scope(): ScopeModuleACore;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface MetaStatic {
|
|
126
|
+
get $beanFullName(): 'a-core.meta.static';
|
|
127
|
+
get $onionName(): 'a-core:static';
|
|
128
|
+
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/** meta: end */
|
|
132
|
+
/** meta static: begin */
|
|
133
|
+
import type { MetaStatic } from '../bean/meta.static.ts';
|
|
134
|
+
/** meta static: end */
|
|
135
|
+
/** scope: begin */
|
|
136
|
+
import { BeanScopeBase, type BeanScopeUtil } from 'vona';
|
|
137
|
+
import { Scope } from 'vona-module-a-bean';
|
|
138
|
+
|
|
139
|
+
@Scope()
|
|
140
|
+
export class ScopeModuleACore extends BeanScopeBase {}
|
|
141
|
+
|
|
142
|
+
export interface ScopeModuleACore {
|
|
143
|
+
util: BeanScopeUtil;
|
|
144
|
+
static: MetaStatic;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
import 'vona';
|
|
148
|
+
declare module 'vona' {
|
|
149
|
+
export interface IBeanScopeRecord {
|
|
150
|
+
'a-core': ScopeModuleACore;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface IBeanScopeContainer {
|
|
154
|
+
core: ScopeModuleACore;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
}
|
|
163
|
+
/** scope: end */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BeanBase } from 'vona';
|
|
2
|
+
import { Bean } from 'vona-module-a-bean';
|
|
3
|
+
|
|
4
|
+
@Bean()
|
|
5
|
+
export class BeanCore extends BeanBase {
|
|
6
|
+
get protocol() {
|
|
7
|
+
return this.app.util.protocol;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
get host() {
|
|
11
|
+
return this.app.util.host;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
getAbsoluteUrl(path?: string) {
|
|
15
|
+
return this.app.util.getAbsoluteUrl(path);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
getAbsoluteUrlByApiPath(path: string) {
|
|
19
|
+
return this.app.util.getAbsoluteUrlByApiPath(path);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IMetaRuntimeExecute } from 'vona-module-a-runtime';
|
|
2
|
+
|
|
3
|
+
import { BeanBase } from 'vona';
|
|
4
|
+
import { Meta } from 'vona-module-a-meta';
|
|
5
|
+
|
|
6
|
+
export interface TypeMetaRuntimeResult {
|
|
7
|
+
protocol: string;
|
|
8
|
+
host: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Meta()
|
|
12
|
+
export class MetaRuntime extends BeanBase implements IMetaRuntimeExecute {
|
|
13
|
+
async execute(): Promise<TypeMetaRuntimeResult> {
|
|
14
|
+
return {
|
|
15
|
+
protocol: this.bean.core.protocol,
|
|
16
|
+
host: this.bean.core.host,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Next } from 'vona';
|
|
2
|
+
import type { IDecoratorMiddlewareOptionsGlobal, IMiddlewareExecute } from 'vona-module-a-aspect';
|
|
3
|
+
import type { IOnionOptionsMeta } from 'vona-module-a-onion';
|
|
4
|
+
|
|
5
|
+
import { BeanBase, Global } from 'vona';
|
|
6
|
+
import { Middleware } from 'vona-module-a-aspect';
|
|
7
|
+
|
|
8
|
+
export interface IMiddlewareOptionsGate extends IDecoratorMiddlewareOptionsGlobal {
|
|
9
|
+
gate?: IOnionOptionsMeta;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Middleware<IMiddlewareOptionsGate>()
|
|
13
|
+
@Global()
|
|
14
|
+
export class MiddlewareGate extends BeanBase implements IMiddlewareExecute {
|
|
15
|
+
async execute(options: IMiddlewareOptionsGate, next: Next) {
|
|
16
|
+
// check gate
|
|
17
|
+
if (!this.app.bean.onion.checkOnionOptionsMeta(options.gate)) {
|
|
18
|
+
this.app.throw(403);
|
|
19
|
+
}
|
|
20
|
+
// next
|
|
21
|
+
return next();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Next } from 'vona';
|
|
2
|
+
import type { IDecoratorMiddlewareSystemOptions, IMiddlewareSystemExecute } from 'vona-module-a-aspect';
|
|
3
|
+
|
|
4
|
+
import { BeanBase } from 'vona';
|
|
5
|
+
import { MiddlewareSystem } from 'vona-module-a-aspect';
|
|
6
|
+
|
|
7
|
+
export interface IMiddlewareSystemOptionsNotfound extends IDecoratorMiddlewareSystemOptions {
|
|
8
|
+
pageUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@MiddlewareSystem<IMiddlewareSystemOptionsNotfound>({ dependencies: 'a-logger:httpLog' })
|
|
12
|
+
export class MiddlewareSystemNotfound extends BeanBase implements IMiddlewareSystemExecute {
|
|
13
|
+
async execute(options: IMiddlewareSystemOptionsNotfound, next: Next) {
|
|
14
|
+
const ctx = this.ctx;
|
|
15
|
+
|
|
16
|
+
await next();
|
|
17
|
+
|
|
18
|
+
if (ctx.status !== 404 || ctx.body) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// set status first, make sure set body not set status
|
|
23
|
+
ctx.status = 404;
|
|
24
|
+
|
|
25
|
+
if (ctx.acceptJSON) {
|
|
26
|
+
ctx.body = {
|
|
27
|
+
message: 'Not Found',
|
|
28
|
+
};
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const notFoundHtml = '<h1>404 Not Found</h1>';
|
|
33
|
+
|
|
34
|
+
// notfound handler is unimplemented
|
|
35
|
+
if (options.pageUrl && ctx.path === options.pageUrl) {
|
|
36
|
+
ctx.body = `${notFoundHtml}<p><pre><code>config.notfound.pageUrl(${options.pageUrl})</code></pre> is unimplemented</p>`;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (options.pageUrl) {
|
|
41
|
+
ctx.realStatus = 404;
|
|
42
|
+
ctx.redirect(options.pageUrl);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
ctx.body = notFoundHtml;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Next } from 'vona';
|
|
2
|
+
import type { IDecoratorMiddlewareSystemOptions, IMiddlewareSystemExecute } from 'vona-module-a-aspect';
|
|
3
|
+
|
|
4
|
+
import overrideMethodImport from 'koa-override';
|
|
5
|
+
import { BeanBase } from 'vona';
|
|
6
|
+
import { MiddlewareSystem } from 'vona-module-a-aspect';
|
|
7
|
+
|
|
8
|
+
const overrideMethod = overrideMethodImport as any;
|
|
9
|
+
|
|
10
|
+
export interface IMiddlewareSystemOptionsOverrideMethod extends IDecoratorMiddlewareSystemOptions {
|
|
11
|
+
allowedMethods?: string[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@MiddlewareSystem<IMiddlewareSystemOptionsOverrideMethod>({
|
|
15
|
+
dependencies: 'a-core:notfound',
|
|
16
|
+
allowedMethods: ['POST'],
|
|
17
|
+
})
|
|
18
|
+
export class MiddlewareSystemOverrideMethod extends BeanBase implements IMiddlewareSystemExecute {
|
|
19
|
+
private _overrideMethod: any;
|
|
20
|
+
|
|
21
|
+
async execute(options: IMiddlewareSystemOptionsOverrideMethod, next: Next) {
|
|
22
|
+
if (!this._overrideMethod) {
|
|
23
|
+
this._overrideMethod = overrideMethod(options);
|
|
24
|
+
}
|
|
25
|
+
return this._overrideMethod(this.ctx, next);
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/index.ts
ADDED
package/src/lib/core.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IInterceptorOptionsCaptchaVerify } from 'vona-module-a-captcha';
|
|
2
|
+
import type { IFilterOptionsError } from 'vona-module-a-error';
|
|
3
|
+
import type { IAopMethodOptionsLog } from 'vona-module-a-logger';
|
|
4
|
+
import type { TypeUseOnionOmitOptionsGlobal } from 'vona-module-a-onion';
|
|
5
|
+
import type { IAopMethodOptionsTransaction } from 'vona-module-a-orm';
|
|
6
|
+
import type { IInterceptorOptionsUpload } from 'vona-module-a-upload';
|
|
7
|
+
|
|
8
|
+
import { Aspect } from 'vona-module-a-aspect';
|
|
9
|
+
|
|
10
|
+
import type { IMiddlewareOptionsGate } from '../bean/middleware.gate.ts';
|
|
11
|
+
|
|
12
|
+
function Gate(options?: Partial<TypeUseOnionOmitOptionsGlobal<IMiddlewareOptionsGate>>): ClassDecorator & MethodDecorator {
|
|
13
|
+
return Aspect.middlewareGlobal('a-core:gate', options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function Error(options?: Partial<TypeUseOnionOmitOptionsGlobal<IFilterOptionsError>>): ClassDecorator & MethodDecorator {
|
|
17
|
+
return Aspect.filterGlobal('a-error:error', options);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function Log(options?: Partial<IAopMethodOptionsLog>): MethodDecorator {
|
|
21
|
+
return Aspect.aopMethod('a-logger:log', options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function Transaction(options?: Partial<IAopMethodOptionsTransaction>): MethodDecorator {
|
|
25
|
+
return Aspect.aopMethod('a-orm:transaction', options);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function CaptchaVerify(options?: Partial<IInterceptorOptionsCaptchaVerify>): MethodDecorator {
|
|
29
|
+
return Aspect.interceptor('a-captcha:captchaVerify', options);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function FileUpload(options?: Partial<IInterceptorOptionsUpload>): MethodDecorator {
|
|
33
|
+
return Aspect.interceptor('a-upload:upload', options);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Core = {
|
|
37
|
+
gate: Gate,
|
|
38
|
+
error: Error,
|
|
39
|
+
log: Log,
|
|
40
|
+
transaction: Transaction,
|
|
41
|
+
captchaVerify: CaptchaVerify,
|
|
42
|
+
fileUpload: FileUpload,
|
|
43
|
+
};
|
package/src/lib/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './core.ts';
|