vona-core 5.0.109 → 5.0.110

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 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, sceneName) {
322
- return beanFullName.replace(`.${sceneName}.`, ':');
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
- const parts = this.$beanFullName.split('.');
699
- return `${parts[0]}:${parts[2]}`;
699
+ return onionNameFromBeanFullName(this.$beanFullName);
700
700
  }
701
701
  get $onionOptions() {
702
702
  return this.$beanOptions.options;
@@ -3011,6 +3011,14 @@ function handleProcessMaster(workers) {
3011
3011
  // console.log(`----------------- worker ${_worker.process.pid} died`, _code, _signal);
3012
3012
  if (cluster.workers && Object.keys(cluster.workers).length === 0) {
3013
3013
  clearTimeout(__timeout);
3014
+ // log
3015
+ const app = useApp();
3016
+ if (app.meta.env.LOGGER_DUMMY !== 'true') {
3017
+ const message = `Master shutdown gracefully: ${process.pid}`;
3018
+ // eslint-disable-next-line
3019
+ console.log(chalk.cyan(message));
3020
+ }
3021
+ // exit
3014
3022
  process.exit(0);
3015
3023
  }
3016
3024
  });
@@ -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, sceneName: keyof IBeanSceneRecord): 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.109",
4
+ "version": "5.0.110",
5
5
  "description": "vona",
6
6
  "publishConfig": {
7
7
  "access": "public"