vona-core 5.0.109 → 5.0.111
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/dist/index.js +18 -9
- package/dist/lib/utils/util.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -318,8 +318,9 @@ function prepareEnv(env) {
|
|
|
318
318
|
function beanFullNameFromOnionName(onionName, sceneName) {
|
|
319
319
|
return onionName.replace(':', `.${sceneName}.`);
|
|
320
320
|
}
|
|
321
|
-
function onionNameFromBeanFullName(beanFullName
|
|
322
|
-
|
|
321
|
+
function onionNameFromBeanFullName(beanFullName) {
|
|
322
|
+
const parts = beanFullName.split('.');
|
|
323
|
+
return `${parts[0]}:${parts[2]}`;
|
|
323
324
|
}
|
|
324
325
|
function filterHeaders(headers, whitelist) {
|
|
325
326
|
if (!headers) return;
|
|
@@ -695,8 +696,7 @@ class BeanBaseSimple extends BeanSimple {
|
|
|
695
696
|
return appResource.getBean(this[SymbolBeanFullName]);
|
|
696
697
|
}
|
|
697
698
|
get $onionName() {
|
|
698
|
-
|
|
699
|
-
return `${parts[0]}:${parts[2]}`;
|
|
699
|
+
return onionNameFromBeanFullName(this.$beanFullName);
|
|
700
700
|
}
|
|
701
701
|
get $onionOptions() {
|
|
702
702
|
return this.$beanOptions.options;
|
|
@@ -917,11 +917,12 @@ function __prepareInjectSelectorInfo_init(beanInstance, useOptions) {
|
|
|
917
917
|
const withSelector = init.withSelector ?? false;
|
|
918
918
|
const _args = init.args ?? [init.arg];
|
|
919
919
|
if (!_args) return;
|
|
920
|
-
const
|
|
921
|
-
self:
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
}
|
|
920
|
+
const context = {
|
|
921
|
+
self: {
|
|
922
|
+
...beanInstance
|
|
923
|
+
}
|
|
924
|
+
};
|
|
925
|
+
const args = _args.map(arg => evaluateExpressions(arg, context));
|
|
925
926
|
return {
|
|
926
927
|
withSelector,
|
|
927
928
|
args
|
|
@@ -3011,6 +3012,14 @@ function handleProcessMaster(workers) {
|
|
|
3011
3012
|
// console.log(`----------------- worker ${_worker.process.pid} died`, _code, _signal);
|
|
3012
3013
|
if (cluster.workers && Object.keys(cluster.workers).length === 0) {
|
|
3013
3014
|
clearTimeout(__timeout);
|
|
3015
|
+
// log
|
|
3016
|
+
const app = useApp();
|
|
3017
|
+
if (app.meta.env.LOGGER_DUMMY !== 'true') {
|
|
3018
|
+
const message = `Master shutdown gracefully: ${process.pid}`;
|
|
3019
|
+
// eslint-disable-next-line
|
|
3020
|
+
console.log(chalk.cyan(message));
|
|
3021
|
+
}
|
|
3022
|
+
// exit
|
|
3014
3023
|
process.exit(0);
|
|
3015
3024
|
}
|
|
3016
3025
|
});
|
package/dist/lib/utils/util.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare function polyfillDispose(instance: any): void;
|
|
|
59
59
|
export declare function pathToHref(fileName: string): string;
|
|
60
60
|
export declare function prepareEnv(env: Partial<NodeJS.ProcessEnv>): VonaConfigEnv;
|
|
61
61
|
export declare function beanFullNameFromOnionName(onionName: string, sceneName: keyof IBeanSceneRecord): keyof IBeanRecord;
|
|
62
|
-
export declare function onionNameFromBeanFullName(beanFullName: string
|
|
62
|
+
export declare function onionNameFromBeanFullName(beanFullName: string): string;
|
|
63
63
|
export declare function filterHeaders(headers: object | undefined, whitelist: string[]): {} | undefined;
|
|
64
64
|
export declare function combineFilePathSafe(dir: string, file: string): string;
|
|
65
65
|
export declare function loadJSONFile(fileName: string): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.111",
|
|
5
5
|
"description": "vona",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@cabloy/module-info-pro": "^1.0.40",
|
|
34
34
|
"@cabloy/set": "^1.0.18",
|
|
35
35
|
"@cabloy/type-fest": "^5.3.1",
|
|
36
|
-
"@cabloy/utils": "^
|
|
36
|
+
"@cabloy/utils": "^2.0.1",
|
|
37
37
|
"@cabloy/word-utils": "^2.0.1",
|
|
38
38
|
"@cabloy/zod-errors-custom": "^2.0.4",
|
|
39
39
|
"@cabloy/zod-openapi": "^1.0.8",
|