@fastcar/koa 0.1.17 → 0.1.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastcar/koa",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "homepage": "https://github.com/williamDazhangyu/fast-car",
5
5
  "description": "fastcar框架下对koa的包装",
6
6
  "main": "target/index.js",
@@ -24,7 +24,7 @@ export default function KoaCors(app: FastCarApplication) {
24
24
 
25
25
  for (let o of origins) {
26
26
  if (orign.startsWith(o) || o == "*") {
27
- return o;
27
+ return orign;
28
28
  }
29
29
  }
30
30
 
@@ -20,7 +20,7 @@ function KoaCors(app) {
20
20
  }
21
21
  for (let o of origins) {
22
22
  if (orign.startsWith(o) || o == "*") {
23
- return o;
23
+ return orign;
24
24
  }
25
25
  }
26
26
  return false;
package/test/logs/sys.log CHANGED
@@ -99,3 +99,45 @@
99
99
  {"timestamp":"2024-12-12 18:31:21.714","level":"INFO","label":"sys","message":"http server is running in 1234"}
100
100
  {"timestamp":"2024-12-12 18:31:21.715","level":"INFO","label":"sys","message":"start server koaSimple is run"}
101
101
  {"timestamp":"2024-12-12 18:31:21.716","level":"INFO","label":"sys","message":"version 1.0.0"}
102
+ {"timestamp":"2025-06-27 10:53:27.408","level":"INFO","label":"sys","message":"Start scanning component"}
103
+ {"timestamp":"2025-06-27 10:53:29.281","level":"INFO","label":"sys","message":"Complete component scan"}
104
+ {"timestamp":"2025-06-27 10:53:29.282","level":"INFO","label":"sys","message":"Call application initialization method"}
105
+ {"timestamp":"2025-06-27 10:53:29.294","level":"INFO","label":"sys","message":"http server is running in 1234"}
106
+ {"timestamp":"2025-06-27 10:53:29.295","level":"INFO","label":"sys","message":"start server koaSimple is run"}
107
+ {"timestamp":"2025-06-27 10:53:29.296","level":"INFO","label":"sys","message":"version 1.0.0"}
108
+ {"timestamp":"2025-07-10 12:05:03.685","level":"INFO","label":"sys","message":"Start scanning component"}
109
+ {"timestamp":"2025-07-10 12:05:04.200","level":"INFO","label":"sys","message":"Complete component scan"}
110
+ {"timestamp":"2025-07-10 12:05:04.201","level":"INFO","label":"sys","message":"Call application initialization method"}
111
+ {"timestamp":"2025-07-10 12:05:04.211","level":"ERROR","label":"sys","message":"Unhandled Rejection at:","splat":"[{}]"}
112
+ {"timestamp":"2025-07-10 12:05:04.222","level":"ERROR","label":"sys","message":"reason: Cannot find module 'koa2-cors'\nRequire stack:\n- D:\\code\\fast-car\\fastcar-koa\\target\\middleware\\KoaCors.js\n- D:\\code\\fast-car\\fastcar-koa\\target\\index.js\n- D:\\code\\fast-car\\fastcar-koa\\test\\simple\\app.ts","splat":"[{\"code\":\"MODULE_NOT_FOUND\",\"requireStack\":[\"D:\\\\code\\\\fast-car\\\\fastcar-koa\\\\target\\\\middleware\\\\KoaCors.js\",\"D:\\\\code\\\\fast-car\\\\fastcar-koa\\\\target\\\\index.js\",\"D:\\\\code\\\\fast-car\\\\fastcar-koa\\\\test\\\\simple\\\\app.ts\"]}]","stack":"Error: Cannot find module 'koa2-cors'\nRequire stack:\n- D:\\code\\fast-car\\fastcar-koa\\target\\middleware\\KoaCors.js\n- D:\\code\\fast-car\\fastcar-koa\\target\\index.js\n- D:\\code\\fast-car\\fastcar-koa\\test\\simple\\app.ts\n at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)\n at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (D:\\code\\fast-car\\node_modules\\@cspotcode\\source-map-support\\source-map-support.js:811:30)\n at Function.Module._load (node:internal/modules/cjs/loader:986:27)\n at Module.require (node:internal/modules/cjs/loader:1233:19)\n at require (node:internal/modules/helpers:179:18)\n at KoaApplication.KoaCors (D:\\code\\fast-car\\fastcar-koa\\target\\middleware\\KoaCors.js:5:22)\n at KoaApplication.start (D:\\code\\fast-car\\fastcar-koa\\src\\KoaApplication.ts:119:63)\n at FastCarApplication.automaticRun (D:\\code\\fast-car\\fastcar-koa\\node_modules\\@fastcar\\core\\target\\FastCarApplication.js:632:25)\n at FastCarApplication.startServer (D:\\code\\fast-car\\fastcar-koa\\node_modules\\@fastcar\\core\\target\\FastCarApplication.js:658:20)\n at FastCarApplication.init (D:\\code\\fast-car\\fastcar-koa\\node_modules\\@fastcar\\core\\target\\FastCarApplication.js:565:14)"}
113
+ {"timestamp":"2025-07-10 12:05:04.232","level":"INFO","label":"sys","message":"application stop"}
114
+ {"timestamp":"2025-07-10 12:05:35.465","level":"INFO","label":"sys","message":"Start scanning component"}
115
+ {"timestamp":"2025-07-10 12:05:35.946","level":"INFO","label":"sys","message":"Complete component scan"}
116
+ {"timestamp":"2025-07-10 12:05:35.948","level":"INFO","label":"sys","message":"Call application initialization method"}
117
+ {"timestamp":"2025-07-10 12:05:35.955","level":"ERROR","label":"sys","message":"Unhandled Rejection at:","splat":"[{}]"}
118
+ {"timestamp":"2025-07-10 12:05:35.962","level":"ERROR","label":"sys","message":"reason: Cannot find module 'koa2-cors'\nRequire stack:\n- D:\\code\\fast-car\\fastcar-koa\\target\\middleware\\KoaCors.js\n- D:\\code\\fast-car\\fastcar-koa\\target\\index.js\n- D:\\code\\fast-car\\fastcar-koa\\test\\simple\\app.ts","splat":"[{\"code\":\"MODULE_NOT_FOUND\",\"requireStack\":[\"D:\\\\code\\\\fast-car\\\\fastcar-koa\\\\target\\\\middleware\\\\KoaCors.js\",\"D:\\\\code\\\\fast-car\\\\fastcar-koa\\\\target\\\\index.js\",\"D:\\\\code\\\\fast-car\\\\fastcar-koa\\\\test\\\\simple\\\\app.ts\"]}]","stack":"Error: Cannot find module 'koa2-cors'\nRequire stack:\n- D:\\code\\fast-car\\fastcar-koa\\target\\middleware\\KoaCors.js\n- D:\\code\\fast-car\\fastcar-koa\\target\\index.js\n- D:\\code\\fast-car\\fastcar-koa\\test\\simple\\app.ts\n at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)\n at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (D:\\code\\fast-car\\node_modules\\@cspotcode\\source-map-support\\source-map-support.js:811:30)\n at Function.Module._load (node:internal/modules/cjs/loader:986:27)\n at Module.require (node:internal/modules/cjs/loader:1233:19)\n at require (node:internal/modules/helpers:179:18)\n at KoaApplication.KoaCors (D:\\code\\fast-car\\fastcar-koa\\target\\middleware\\KoaCors.js:5:22)\n at KoaApplication.start (D:\\code\\fast-car\\fastcar-koa\\src\\KoaApplication.ts:119:63)\n at FastCarApplication.automaticRun (D:\\code\\fast-car\\fastcar-koa\\node_modules\\@fastcar\\core\\target\\FastCarApplication.js:632:25)\n at FastCarApplication.startServer (D:\\code\\fast-car\\fastcar-koa\\node_modules\\@fastcar\\core\\target\\FastCarApplication.js:658:20)\n at FastCarApplication.init (D:\\code\\fast-car\\fastcar-koa\\node_modules\\@fastcar\\core\\target\\FastCarApplication.js:565:14)"}
119
+ {"timestamp":"2025-07-10 12:05:35.968","level":"INFO","label":"sys","message":"application stop"}
120
+ {"timestamp":"2025-07-10 12:06:06.534","level":"INFO","label":"sys","message":"Start scanning component"}
121
+ {"timestamp":"2025-07-10 12:06:07.09","level":"INFO","label":"sys","message":"Complete component scan"}
122
+ {"timestamp":"2025-07-10 12:06:07.10","level":"INFO","label":"sys","message":"Call application initialization method"}
123
+ {"timestamp":"2025-07-10 12:06:07.71","level":"INFO","label":"sys","message":"http server is running in 1234"}
124
+ {"timestamp":"2025-07-10 12:06:07.72","level":"INFO","label":"sys","message":"start server koaSimple is run"}
125
+ {"timestamp":"2025-07-10 12:06:07.74","level":"INFO","label":"sys","message":"version 1.0.0"}
126
+ {"timestamp":"2025-07-10 12:07:46.25","level":"INFO","label":"sys","message":"Start scanning component"}
127
+ {"timestamp":"2025-07-10 12:07:46.605","level":"INFO","label":"sys","message":"Complete component scan"}
128
+ {"timestamp":"2025-07-10 12:07:46.606","level":"INFO","label":"sys","message":"Call application initialization method"}
129
+ {"timestamp":"2025-07-10 12:07:58.52","level":"INFO","label":"sys","message":"http server is running in 1234"}
130
+ {"timestamp":"2025-07-10 12:07:58.53","level":"INFO","label":"sys","message":"start server koaSimple is run"}
131
+ {"timestamp":"2025-07-10 12:07:58.54","level":"INFO","label":"sys","message":"version 1.0.0"}
132
+ {"timestamp":"2025-07-10 12:10:15.710","level":"INFO","label":"sys","message":"Start scanning component"}
133
+ {"timestamp":"2025-07-10 12:10:16.267","level":"INFO","label":"sys","message":"Complete component scan"}
134
+ {"timestamp":"2025-07-10 12:10:16.268","level":"INFO","label":"sys","message":"Call application initialization method"}
135
+ {"timestamp":"2025-07-10 12:10:16.282","level":"INFO","label":"sys","message":"http server is running in 1234"}
136
+ {"timestamp":"2025-07-10 12:10:16.283","level":"INFO","label":"sys","message":"start server koaSimple is run"}
137
+ {"timestamp":"2025-07-10 12:10:16.284","level":"INFO","label":"sys","message":"version 1.0.0"}
138
+ {"timestamp":"2025-07-10 13:33:03.144","level":"INFO","label":"sys","message":"Start scanning component"}
139
+ {"timestamp":"2025-07-10 13:33:04.649","level":"INFO","label":"sys","message":"Complete component scan"}
140
+ {"timestamp":"2025-07-10 13:33:04.650","level":"INFO","label":"sys","message":"Call application initialization method"}
141
+ {"timestamp":"2025-07-10 13:33:04.671","level":"INFO","label":"sys","message":"http server is running in 1234"}
142
+ {"timestamp":"2025-07-10 13:33:04.672","level":"INFO","label":"sys","message":"start server koaSimple is run"}
143
+ {"timestamp":"2025-07-10 13:33:04.673","level":"INFO","label":"sys","message":"version 1.0.0"}