@fastcar/core 0.2.38 → 0.2.39

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 CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  ## 快速安装
22
22
 
23
- npm install fastcar-core
23
+ npm install fastcar@core
24
24
 
25
25
  ## 常用注解引用
26
26
 
@@ -135,7 +135,7 @@ ResourcePath 自定义resource的位置
135
135
 
136
136
  ```ts
137
137
  //声明一个组件
138
- import { Service } from "fastcar-core/annotation";
138
+ import { Service } from "@fastcar/core/annotation";
139
139
 
140
140
  @Service
141
141
  class HelloService {
@@ -149,7 +149,7 @@ export default HelloService;
149
149
 
150
150
  ```ts
151
151
  //声明一个别名组件
152
- import { Service, BeanName } from "fastcar-core/annotation";
152
+ import { Service, BeanName } from "@fastcar/core/annotation";
153
153
 
154
154
  @Service
155
155
  @BeanName("HelloService")
@@ -164,7 +164,7 @@ export default HelloService;
164
164
 
165
165
  ```ts
166
166
  //引入依赖组件
167
- import { Controller, Autowired } from "fastcar-core/annotation";
167
+ import { Controller, Autowired } from "@fastcar/core/annotation";
168
168
 
169
169
  @Controller
170
170
  class HelloController {
@@ -181,7 +181,7 @@ class HelloController {
181
181
 
182
182
  ```ts
183
183
  //生命周期内运行
184
- import { ApplicationStart } from "fastcar-core/annotation";
184
+ import { ApplicationStart } from "@fastcar/core/annotation";
185
185
 
186
186
  @ApplicationStart()
187
187
  export default class StartRunner {
@@ -204,8 +204,8 @@ export default class StartRunner {
204
204
 
205
205
  ```ts
206
206
  //声明入口应用 这边有个约定 启动后会自动扫描所在文件夹下的文件 并进行注入
207
- import { FastCarApplication } from "fastcar-core";
208
- import { Application } from "fastcar-core/annotation";
207
+ import { FastCarApplication } from "@fastcar/core";
208
+ import { Application } from "@fastcar/core/annotation";
209
209
 
210
210
  @Application //声明是一个应用
211
211
  @ENV("TEST") //声明为TEST环境或者在resource下的application.yml内声明
@@ -217,7 +217,7 @@ class APP {
217
217
 
218
218
  ```ts
219
219
  //表单示例
220
- import { NotNull, Size, Rule, ValidForm } from "fastcar-core/annotation";
220
+ import { NotNull, Size, Rule, ValidForm } from "@fastcar/core/annotation";
221
221
 
222
222
  class B {
223
223
  @NotNull
@@ -241,7 +241,7 @@ instance.test("a", { c: "c", d: 13 }); //校验失败
241
241
 
242
242
  ```ts
243
243
  //本地配置映射示例
244
- import { Configure } from "fastcar-core/annotation";
244
+ import { Configure } from "@fastcar/core/annotation";
245
245
 
246
246
  //读取resource下的配置 如hello.yml中为hello: "world"
247
247
  @Configure("hello.yml")
@@ -259,7 +259,7 @@ class HelloConfig {
259
259
  ```ts
260
260
  //调用依赖版本示例
261
261
  import HelloService from "./HelloService";
262
- import { CallDependency } from "fastcar-core/annotation";
262
+ import { CallDependency } from "@fastcar/core/annotation";
263
263
 
264
264
  export default class CallService {
265
265
 
@@ -290,7 +290,7 @@ export default class IndexController {
290
290
 
291
291
  ```ts
292
292
  //改造一个好用的map-list数据链表
293
- import { DataMap } from "fastcar-core";
293
+ import { DataMap } from "@fastcar/core";
294
294
 
295
295
  describe("数据集合测试", () => {
296
296
  it("数据集合", () => {
@@ -340,8 +340,8 @@ describe("数据集合测试", () => {
340
340
 
341
341
  ```ts
342
342
  //根据启动应用的时机 加载自定义方法
343
- import { ApplicationHook, FastCarApplication, Logger } from "fastcar-core";
344
- import { Application } from "fastcar-core/annotation";
343
+ import { ApplicationHook, FastCarApplication, Logger } from "@fastcar/core";
344
+ import { Application } from "@fastcar/core/annotation";
345
345
 
346
346
  @Application
347
347
  class APP implements ApplicationHook {
@@ -370,7 +370,7 @@ class APP implements ApplicationHook {
370
370
 
371
371
  ## 更多用法
372
372
 
373
- 参考项目git地址 fastcar-core/test 下的simple内
373
+ 参考项目git地址 @fastcar/core/test 下的simple内
374
374
 
375
375
  ## 项目开源地址
376
376
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastcar/core",
3
- "version": "0.2.38",
3
+ "version": "0.2.39",
4
4
  "homepage": "https://github.com/williamDazhangyu/fast-car",
5
5
  "main": "target/index.js",
6
6
  "author": "william_zhong",
@@ -26,7 +26,7 @@
26
26
  "ioc",
27
27
  "spring",
28
28
  "node",
29
- "fastcar-core"
29
+ "@fastcar/core"
30
30
  ],
31
31
  "engines": {
32
32
  "node": ">=16"
@@ -25,6 +25,7 @@ import { ProcessType } from "./type/ProcessType";
25
25
  import { FileHotterDesc } from "./type/FileHotterDesc";
26
26
  import { LifeCycleType } from "./annotation/lifeCycle/AddLifeCycleItem";
27
27
  import { WinstonLoggerType } from "./type/WinstonLoggerType";
28
+ import { Log } from "./annotation";
28
29
 
29
30
  @Component
30
31
  class FastCarApplication extends Events {
@@ -34,7 +35,10 @@ class FastCarApplication extends Events {
34
35
  protected baseFileName!: string; //入口文件路径
35
36
  protected loggerFactory!: WinstonLogger;
36
37
  protected applicationStatus: AppStatusEnum;
38
+
39
+ @Log("sys")
37
40
  protected sysLogger!: winston.Logger;
41
+
38
42
  protected componentDeatils: Map<string | symbol, ComponentDesc>; //读取路径 名称
39
43
  protected liveTime: number;
40
44
  protected watchFiles: Map<string, FileHotterDesc[]>;
@@ -168,7 +172,7 @@ class FastCarApplication extends Events {
168
172
  loadSysConfig() {
169
173
  this.sysConfig = FileUtil.getApplicationConfig(this.getResourcePath(), CommonConstant.Application, this.sysConfig);
170
174
 
171
- let env = Reflect.get(this, CommonConstant.ENV) || this.sysConfig.application.env;
175
+ let env = (Reflect.get(this, CommonConstant.ENV) || this.sysConfig.application.env || "devlopment") as string;
172
176
 
173
177
  this.sysConfig = FileUtil.getApplicationConfig(this.getResourcePath(), `${CommonConstant.Application}-${env}`, this.sysConfig);
174
178
 
@@ -241,7 +245,7 @@ class FastCarApplication extends Events {
241
245
  loadClass() {
242
246
  //加载文件扫描下的bean
243
247
  let tmpFilePath: string[] = Array.of();
244
- let includeList: string[] = Reflect.get(this, FastCarMetaData.ComponentScan);
248
+ let includeList: string[] = Reflect.get(this, FastCarMetaData.ComponentScan) as string[];
245
249
 
246
250
  if (includeList) {
247
251
  includeList.forEach((item) => {
@@ -254,7 +258,7 @@ class FastCarApplication extends Events {
254
258
  filePathList = tmpFilePath.concat(filePathList);
255
259
  filePathList = [...new Set(filePathList)];
256
260
 
257
- let excludeList: string[] = Reflect.get(this, FastCarMetaData.ComponentScanExclusion);
261
+ let excludeList: string[] = Reflect.get(this, FastCarMetaData.ComponentScanExclusion) as string[];
258
262
  if (excludeList) {
259
263
  let excludAllPath: string[] = [];
260
264
  excludeList.forEach((item) => {
@@ -519,7 +523,7 @@ class FastCarApplication extends Events {
519
523
 
520
524
  this.loggerFactory = new WinstonLogger(defaultConfig);
521
525
  //添加系统日志
522
- this.sysLogger = this.loggerFactory.addLogger(CommonConstant.SYSLOGGER);
526
+ // this.sysLogger = this.loggerFactory.addLogger(CommonConstant.SYSLOGGER);
523
527
  }
524
528
 
525
529
  /***
@@ -527,8 +531,8 @@ class FastCarApplication extends Events {
527
531
  */
528
532
  init() {
529
533
  //加载配置
530
- this.basePath = Reflect.get(this, CommonConstant.BasePath) || require.main?.path || module.path;
531
- this.baseFileName = Reflect.get(this, CommonConstant.BaseFileName) || require.main?.filename || module.filename;
534
+ this.basePath = (Reflect.get(this, CommonConstant.BasePath) || require.main?.path || module.path) as string;
535
+ this.baseFileName = (Reflect.get(this, CommonConstant.BaseFileName) || require.main?.filename || module.filename) as string;
532
536
 
533
537
  this.beforeStartServer();
534
538
  this.startServer();
@@ -1,10 +1,10 @@
1
1
  import "reflect-metadata";
2
- import CryptoUtil from "../../utils/CryptoUtil";
3
2
  import { FastCarMetaData } from "../../constant/FastCarMetaData";
3
+ import { id } from "../../utils/Id";
4
4
 
5
5
  export default function Injection(target: any, name: string) {
6
6
  //生成别名 避免名称重复的情况
7
- let key = `${name}:${CryptoUtil.getHashStr()}`;
7
+ let key = `${name}:${id()}`;
8
8
  Reflect.defineMetadata(name, true, target.prototype);
9
9
  Reflect.defineMetadata(FastCarMetaData.InjectionUniqueKey, key, target); //放入至原型中
10
10
  }
@@ -10,7 +10,8 @@ export default function Log(category?: string) {
10
10
  Reflect.defineProperty(target, propertyKey, {
11
11
  get: (): Logger => {
12
12
  let app: FastCarApplication = Reflect.get(global, CommonConstant.FastcarApp);
13
- return app ? app.getLogger(m) : console;
13
+ let appid = app.getSetting(CommonConstant.APPId) || ""; //进行差异化区分
14
+ return app ? app.getLogger(appid ? `[${appid}] ${m}` : m) : console;
14
15
  },
15
16
  });
16
17
  };
@@ -1,5 +1,4 @@
1
1
  import AddChildValid from "./AddChildValid";
2
- import ValidationUtil from "../../utils/ValidationUtil";
3
2
 
4
3
  //是否为非空字段
5
4
  export default function NotNull(target: any, propertyKey: string, index?: number) {
@@ -9,6 +9,7 @@ export const CommonConstant = {
9
9
  FastcarApp: Symbol("FastcarApp"), //应用app
10
10
  FastcarSetting: Symbol("FastcarSetting"),
11
11
  ResourcePath: "resourcePath",
12
+ APPId: "appid",
12
13
  };
13
14
 
14
15
  export const FileResSuffix = ["json", "yml", "js"];
@@ -0,0 +1,8 @@
1
+ //生成唯一ID
2
+ let idCounter = 0;
3
+
4
+ function id(): number {
5
+ return ++idCounter;
6
+ }
7
+
8
+ export { id };
@@ -27,7 +27,9 @@ const AppStatusEnum_1 = require("./constant/AppStatusEnum");
27
27
  const ValidationUtil_1 = require("./utils/ValidationUtil");
28
28
  const Component_1 = require("./annotation/stereotype/Component");
29
29
  const WinstonLogger_1 = require("./model/WinstonLogger");
30
+ const winston = require("winston");
30
31
  const DateUtil_1 = require("./utils/DateUtil");
32
+ const annotation_1 = require("./annotation");
31
33
  let FastCarApplication = FastCarApplication_1 = class FastCarApplication extends Events {
32
34
  constructor() {
33
35
  super();
@@ -142,7 +144,7 @@ let FastCarApplication = FastCarApplication_1 = class FastCarApplication extends
142
144
  */
143
145
  loadSysConfig() {
144
146
  this.sysConfig = FileUtil_1.default.getApplicationConfig(this.getResourcePath(), CommonConstant_1.CommonConstant.Application, this.sysConfig);
145
- let env = Reflect.get(this, CommonConstant_1.CommonConstant.ENV) || this.sysConfig.application.env;
147
+ let env = (Reflect.get(this, CommonConstant_1.CommonConstant.ENV) || this.sysConfig.application.env || "devlopment");
146
148
  this.sysConfig = FileUtil_1.default.getApplicationConfig(this.getResourcePath(), `${CommonConstant_1.CommonConstant.Application}-${env}`, this.sysConfig);
147
149
  //自定义环境变量设置
148
150
  process.env.NODE_ENV = env;
@@ -450,15 +452,15 @@ let FastCarApplication = FastCarApplication_1 = class FastCarApplication extends
450
452
  }
451
453
  this.loggerFactory = new WinstonLogger_1.default(defaultConfig);
452
454
  //添加系统日志
453
- this.sysLogger = this.loggerFactory.addLogger(CommonConstant_1.CommonConstant.SYSLOGGER);
455
+ // this.sysLogger = this.loggerFactory.addLogger(CommonConstant.SYSLOGGER);
454
456
  }
455
457
  /***
456
458
  * @version 1.0 初始化应用
457
459
  */
458
460
  init() {
459
461
  //加载配置
460
- this.basePath = Reflect.get(this, CommonConstant_1.CommonConstant.BasePath) || require.main?.path || module.path;
461
- this.baseFileName = Reflect.get(this, CommonConstant_1.CommonConstant.BaseFileName) || require.main?.filename || module.filename;
462
+ this.basePath = (Reflect.get(this, CommonConstant_1.CommonConstant.BasePath) || require.main?.path || module.path);
463
+ this.baseFileName = (Reflect.get(this, CommonConstant_1.CommonConstant.BaseFileName) || require.main?.filename || module.filename);
462
464
  this.beforeStartServer();
463
465
  this.startServer();
464
466
  this.addExitEvent();
@@ -654,6 +656,10 @@ let FastCarApplication = FastCarApplication_1 = class FastCarApplication extends
654
656
  return logger;
655
657
  }
656
658
  };
659
+ __decorate([
660
+ (0, annotation_1.Log)("sys"),
661
+ __metadata("design:type", Object)
662
+ ], FastCarApplication.prototype, "sysLogger", void 0);
657
663
  FastCarApplication = FastCarApplication_1 = __decorate([
658
664
  Component_1.default,
659
665
  __metadata("design:paramtypes", [])
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("reflect-metadata");
4
- const CryptoUtil_1 = require("../../utils/CryptoUtil");
5
4
  const FastCarMetaData_1 = require("../../constant/FastCarMetaData");
5
+ const Id_1 = require("../../utils/Id");
6
6
  function Injection(target, name) {
7
7
  //生成别名 避免名称重复的情况
8
- let key = `${name}:${CryptoUtil_1.default.getHashStr()}`;
8
+ let key = `${name}:${(0, Id_1.id)()}`;
9
9
  Reflect.defineMetadata(name, true, target.prototype);
10
10
  Reflect.defineMetadata(FastCarMetaData_1.FastCarMetaData.InjectionUniqueKey, key, target); //放入至原型中
11
11
  }
@@ -8,7 +8,8 @@ function Log(category) {
8
8
  Reflect.defineProperty(target, propertyKey, {
9
9
  get: () => {
10
10
  let app = Reflect.get(global, CommonConstant_1.CommonConstant.FastcarApp);
11
- return app ? app.getLogger(m) : console;
11
+ let appid = app.getSetting(CommonConstant_1.CommonConstant.APPId) || ""; //进行差异化区分
12
+ return app ? app.getLogger(appid ? `[${appid}] ${m}` : m) : console;
12
13
  },
13
14
  });
14
15
  };
@@ -12,5 +12,6 @@ exports.CommonConstant = {
12
12
  FastcarApp: Symbol("FastcarApp"),
13
13
  FastcarSetting: Symbol("FastcarSetting"),
14
14
  ResourcePath: "resourcePath",
15
+ APPId: "appid",
15
16
  };
16
17
  exports.FileResSuffix = ["json", "yml", "js"];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.id = void 0;
4
+ //生成唯一ID
5
+ let idCounter = 0;
6
+ function id() {
7
+ return ++idCounter;
8
+ }
9
+ exports.id = id;
File without changes
@@ -0,0 +1,6 @@
1
+ {"timestamp":"2022-12-21 17:57:11.546","level":"INFO","label":"[fastcar-server] logger","message":"自定义的日志输出"}
2
+ {"timestamp":"2022-12-21 17:57:11.547","level":"WARN","label":"[fastcar-server] logger","message":"自定义警告"}
3
+ {"timestamp":"2022-12-21 17:57:11.548","level":"ERROR","label":"[fastcar-server] logger","message":"自定义报错"}
4
+ {"timestamp":"2022-12-21 18:00:16.672","level":"INFO","label":"[fastcar-server] logger","message":"自定义的日志输出"}
5
+ {"timestamp":"2022-12-21 18:00:16.673","level":"WARN","label":"[fastcar-server] logger","message":"自定义警告"}
6
+ {"timestamp":"2022-12-21 18:00:16.674","level":"ERROR","label":"[fastcar-server] logger","message":"自定义报错"}
@@ -0,0 +1,8 @@
1
+ {"timestamp":"2022-12-21 18:00:16.571","level":"INFO","label":"[fastcar-server] sys","message":"Start scanning component"}
2
+ {"timestamp":"2022-12-21 18:00:16.660","level":"INFO","label":"[fastcar-server] sys","message":"Complete component scan"}
3
+ {"timestamp":"2022-12-21 18:00:16.662","level":"INFO","label":"[fastcar-server] sys","message":"Call application initialization method"}
4
+ {"timestamp":"2022-12-21 18:00:16.664","level":"INFO","label":"[fastcar-server] sys","message":"start server app is run"}
5
+ {"timestamp":"2022-12-21 18:00:16.665","level":"INFO","label":"[fastcar-server] sys","message":"version 1.0.0"}
6
+ {"timestamp":"2022-12-21 18:00:18.691","level":"INFO","label":"[fastcar-server] sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
7
+ {"timestamp":"2022-12-21 18:00:18.692","level":"INFO","label":"[fastcar-server] sys","message":"Call the method before the application stops"}
8
+ {"timestamp":"2022-12-21 18:00:23.695","level":"INFO","label":"[fastcar-server] sys","message":"application stop"}
@@ -4,3 +4,9 @@
4
4
  {"timestamp":"2022-09-22 14:05:29.436","level":"INFO","label":"logger","message":"自定义的日志输出"}
5
5
  {"timestamp":"2022-09-22 14:05:29.437","level":"WARN","label":"logger","message":"自定义警告"}
6
6
  {"timestamp":"2022-09-22 14:05:29.438","level":"ERROR","label":"logger","message":"自定义报错"}
7
+ {"timestamp":"2022-12-13 17:56:56.447","level":"INFO","label":"logger","message":"自定义的日志输出"}
8
+ {"timestamp":"2022-12-13 17:56:56.448","level":"WARN","label":"logger","message":"自定义警告"}
9
+ {"timestamp":"2022-12-13 17:56:56.449","level":"ERROR","label":"logger","message":"自定义报错"}
10
+ {"timestamp":"2022-12-13 17:57:38.950","level":"INFO","label":"logger","message":"自定义的日志输出"}
11
+ {"timestamp":"2022-12-13 17:57:38.952","level":"WARN","label":"logger","message":"自定义警告"}
12
+ {"timestamp":"2022-12-13 17:57:38.953","level":"ERROR","label":"logger","message":"自定义报错"}
@@ -0,0 +1,6 @@
1
+ {"timestamp":"2022-12-13 17:59:51.490","level":"INFO","label":"logger","message":"自定义的日志输出"}
2
+ {"timestamp":"2022-12-13 17:59:51.491","level":"WARN","label":"logger","message":"自定义警告"}
3
+ {"timestamp":"2022-12-13 17:59:51.492","level":"ERROR","label":"logger","message":"自定义报错"}
4
+ {"timestamp":"2022-12-13 18:00:45.217","level":"INFO","label":"logger","message":"自定义的日志输出"}
5
+ {"timestamp":"2022-12-13 18:00:45.218","level":"WARN","label":"logger","message":"自定义警告"}
6
+ {"timestamp":"2022-12-13 18:00:45.219","level":"ERROR","label":"logger","message":"自定义报错"}
@@ -1,7 +1,2 @@
1
- {"timestamp":"2022-09-22 14:03:17.119","level":"INFO","label":"sys","message":"Start scanning component"}
2
- {"timestamp":"2022-09-22 14:03:17.212","level":"INFO","label":"sys","message":"Complete component scan"}
3
- {"timestamp":"2022-09-22 14:03:17.214","level":"INFO","label":"sys","message":"Call application initialization method"}
4
- {"timestamp":"2022-09-22 14:03:17.217","level":"INFO","label":"sys","message":"start server app is run"}
5
- {"timestamp":"2022-09-22 14:03:17.217","level":"INFO","label":"sys","message":"version 1.0.0"}
6
- {"timestamp":"2022-09-22 14:03:17.236","level":"ERROR","label":"sys","message":"Unsatisfied dependency expressed through [notFound] ","stack":"Error: Unsatisfied dependency expressed through [notFound] \n at NotFoundController.get (D:\\code\\fast-car\\fast-car\\fastcar-core\\src\\annotation\\bind\\AliasInjection.ts:16:27)\n at NotFoundController.getNotFound (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\controller\\NotFoundController.ts:14:15)\n at Context.<anonymous> (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\app.ts:93:13)\n at callFn (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:366:21)\n at Test.Runnable.run (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:354:5)\n at Runner.runTest (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:678:10)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:801:12\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:593:14)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:603:7\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:486:14)\n at Immediate._onImmediate (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:571:5)\n at processImmediate (node:internal/timers:466:21)\n at process.topLevelDomainCallback (node:domain:152:15)\n at process.callbackTrampoline (node:internal/async_hooks:128:24)"}
7
- {"timestamp":"2022-09-22 14:03:17.244","level":"ERROR","label":"sys","message":"Unsatisfied dependency expressed through [autoNotFound] ","stack":"Error: Unsatisfied dependency expressed through [autoNotFound] \n at NotFoundController.get (D:\\code\\fast-car\\fast-car\\fastcar-core\\src\\annotation\\bind\\CallDependency.ts:17:26)\n at NotFoundController.getAutoNotFound (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\controller\\NotFoundController.ts:18:15)\n at Context.<anonymous> (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\app.ts:99:13)\n at callFn (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:366:21)\n at Test.Runnable.run (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:354:5)\n at Runner.runTest (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:678:10)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:801:12\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:593:14)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:603:7\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:486:14)\n at Immediate._onImmediate (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:571:5)\n at processImmediate (node:internal/timers:466:21)\n at process.topLevelDomainCallback (node:domain:152:15)\n at process.callbackTrampoline (node:internal/async_hooks:128:24)"}
1
+ {"timestamp":"2022-12-21 18:00:16.682","level":"ERROR","label":"sys","message":"Unsatisfied dependency expressed through [notFound] ","stack":"Error: Unsatisfied dependency expressed through [notFound] \n at NotFoundController.get (D:\\code\\fast-car\\fast-car\\fastcar-core\\src\\annotation\\bind\\AliasInjection.ts:16:27)\n at NotFoundController.getNotFound (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\controller\\NotFoundController.ts:14:15)\n at Context.<anonymous> (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\app.ts:89:13)\n at callFn (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:366:21)\n at Test.Runnable.run (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:354:5)\n at Runner.runTest (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:678:10)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:801:12\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:593:14)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:603:7\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:486:14)\n at Immediate._onImmediate (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:571:5)\n at processImmediate (node:internal/timers:466:21)\n at process.topLevelDomainCallback (node:domain:152:15)\n at process.callbackTrampoline (node:internal/async_hooks:128:24)"}
2
+ {"timestamp":"2022-12-21 18:00:16.690","level":"ERROR","label":"sys","message":"Unsatisfied dependency expressed through [autoNotFound] ","stack":"Error: Unsatisfied dependency expressed through [autoNotFound] \n at NotFoundController.get (D:\\code\\fast-car\\fast-car\\fastcar-core\\src\\annotation\\bind\\CallDependency.ts:17:26)\n at NotFoundController.getAutoNotFound (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\controller\\NotFoundController.ts:18:15)\n at Context.<anonymous> (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\app.ts:95:13)\n at callFn (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:366:21)\n at Test.Runnable.run (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:354:5)\n at Runner.runTest (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:678:10)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:801:12\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:593:14)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:603:7\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:486:14)\n at Immediate._onImmediate (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:571:5)\n at processImmediate (node:internal/timers:466:21)\n at process.topLevelDomainCallback (node:domain:152:15)\n at process.callbackTrampoline (node:internal/async_hooks:128:24)"}
@@ -1,14 +0,0 @@
1
- {"timestamp":"2022-09-22 14:03:39.499","level":"INFO","label":"sys","message":"Start scanning component"}
2
- {"timestamp":"2022-09-22 14:03:39.584","level":"INFO","label":"sys","message":"Complete component scan"}
3
- {"timestamp":"2022-09-22 14:03:39.586","level":"INFO","label":"sys","message":"Call application initialization method"}
4
- {"timestamp":"2022-09-22 14:03:39.588","level":"INFO","label":"sys","message":"start server app is run"}
5
- {"timestamp":"2022-09-22 14:03:39.588","level":"INFO","label":"sys","message":"version 1.0.0"}
6
- {"timestamp":"2022-09-22 14:03:41.624","level":"INFO","label":"sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
7
- {"timestamp":"2022-09-22 14:03:41.626","level":"INFO","label":"sys","message":"Call the method before the application stops"}
8
- {"timestamp":"2022-09-22 14:03:46.642","level":"INFO","label":"sys","message":"application stop"}
9
- {"timestamp":"2022-09-22 14:05:29.335","level":"INFO","label":"sys","message":"Start scanning component"}
10
- {"timestamp":"2022-09-22 14:05:29.424","level":"INFO","label":"sys","message":"Complete component scan"}
11
- {"timestamp":"2022-09-22 14:05:29.426","level":"INFO","label":"sys","message":"Call application initialization method"}
12
- {"timestamp":"2022-09-22 14:05:29.428","level":"INFO","label":"sys","message":"start server app is run"}
13
- {"timestamp":"2022-09-22 14:05:29.428","level":"INFO","label":"sys","message":"version 1.0.0"}
14
- {"timestamp":"2022-09-22 14:05:41.112","level":"INFO","label":"sys","message":"sysConfig hot update----D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\resource\\application.yml"}
@@ -3,3 +3,6 @@
3
3
  {"timestamp":"2022-09-13 09:54:18.555","level":"INFO","label":"sys","message":"application stop"}
4
4
  {"timestamp":"2022-09-16 10:15:27.08","level":"INFO","label":"sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
5
5
  {"timestamp":"2022-09-16 10:15:27.12","level":"INFO","label":"sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
6
+ {"timestamp":"2022-12-13 17:56:58.473","level":"INFO","label":"sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
7
+ {"timestamp":"2022-12-13 17:56:58.474","level":"INFO","label":"sys","message":"Call the method before the application stops"}
8
+ {"timestamp":"2022-12-13 17:57:03.482","level":"INFO","label":"sys","message":"application stop"}
@@ -0,0 +1,3 @@
1
+ {"timestamp":"2022-12-21 17:57:13.569","level":"INFO","label":"sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
2
+ {"timestamp":"2022-12-21 17:57:13.570","level":"INFO","label":"sys","message":"Call the method before the application stops"}
3
+ {"timestamp":"2022-12-21 17:57:18.583","level":"INFO","label":"sys","message":"application stop"}
@@ -0,0 +1,13 @@
1
+ {"timestamp":"2022-12-13 17:59:53.504","level":"INFO","label":"sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
2
+ {"timestamp":"2022-12-13 17:59:53.505","level":"INFO","label":"sys","message":"Call the method before the application stops"}
3
+ {"timestamp":"2022-12-13 17:59:58.508","level":"INFO","label":"sys","message":"application stop"}
4
+ {"timestamp":"2022-12-13 18:00:47.239","level":"INFO","label":"sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
5
+ {"timestamp":"2022-12-13 18:00:47.240","level":"INFO","label":"sys","message":"Call the method before the application stops"}
6
+ {"timestamp":"2022-12-13 18:00:52.243","level":"INFO","label":"sys","message":"application stop"}
7
+ {"timestamp":"2022-12-21 17:57:11.428","level":"INFO","label":"sys","message":"Start scanning component"}
8
+ {"timestamp":"2022-12-21 17:57:11.531","level":"INFO","label":"sys","message":"Complete component scan"}
9
+ {"timestamp":"2022-12-21 17:57:11.533","level":"INFO","label":"sys","message":"Call application initialization method"}
10
+ {"timestamp":"2022-12-21 17:57:11.535","level":"INFO","label":"sys","message":"start server app is run"}
11
+ {"timestamp":"2022-12-21 17:57:11.535","level":"INFO","label":"sys","message":"version 1.0.0"}
12
+ {"timestamp":"2022-12-21 17:57:11.567","level":"ERROR","label":"sys","message":"Unsatisfied dependency expressed through [notFound] ","stack":"Error: Unsatisfied dependency expressed through [notFound] \n at NotFoundController.get (D:\\code\\fast-car\\fast-car\\fastcar-core\\src\\annotation\\bind\\AliasInjection.ts:16:27)\n at NotFoundController.getNotFound (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\controller\\NotFoundController.ts:14:15)\n at Context.<anonymous> (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\app.ts:89:13)\n at callFn (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:366:21)\n at Test.Runnable.run (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:354:5)\n at Runner.runTest (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:678:10)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:801:12\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:593:14)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:603:7\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:486:14)\n at Immediate._onImmediate (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:571:5)\n at processImmediate (node:internal/timers:466:21)\n at process.topLevelDomainCallback (node:domain:152:15)\n at process.callbackTrampoline (node:internal/async_hooks:128:24)"}
13
+ {"timestamp":"2022-12-21 17:57:11.583","level":"ERROR","label":"sys","message":"Unsatisfied dependency expressed through [autoNotFound] ","stack":"Error: Unsatisfied dependency expressed through [autoNotFound] \n at NotFoundController.get (D:\\code\\fast-car\\fast-car\\fastcar-core\\src\\annotation\\bind\\CallDependency.ts:17:26)\n at NotFoundController.getAutoNotFound (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\controller\\NotFoundController.ts:18:15)\n at Context.<anonymous> (D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\app.ts:95:13)\n at callFn (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:366:21)\n at Test.Runnable.run (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runnable.js:354:5)\n at Runner.runTest (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:678:10)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:801:12\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:593:14)\n at D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:603:7\n at next (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:486:14)\n at Immediate._onImmediate (D:\\code\\fast-car\\fast-car\\node_modules\\mocha\\lib\\runner.js:571:5)\n at processImmediate (node:internal/timers:466:21)\n at process.topLevelDomainCallback (node:domain:152:15)\n at process.callbackTrampoline (node:internal/async_hooks:128:24)"}
@@ -17,6 +17,7 @@ import ApplicationSetting from "../../../src/annotation/env/ApplicationSetting";
17
17
  @BaseFilePath(__filename)
18
18
  @ApplicationSetting({
19
19
  customHello: "customHello",
20
+ appid: "fastcar-server",
20
21
  })
21
22
  class APP implements ApplicationHook {
22
23
  app!: FastCarApplication;
@@ -1,3 +0,0 @@
1
- {"timestamp":"2022-09-22 14:03:19.246","level":"INFO","label":"sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
2
- {"timestamp":"2022-09-22 14:03:19.247","level":"INFO","label":"sys","message":"Call the method before the application stops"}
3
- {"timestamp":"2022-09-22 14:03:24.263","level":"INFO","label":"sys","message":"application stop"}