imean-service-engine 1.8.0 → 1.8.2

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/mod.cjs CHANGED
@@ -383,10 +383,8 @@ function getZodTypeString(schema, defaultOptional = false) {
383
383
  return processType(schema);
384
384
  }
385
385
  async function generateClientCode(modules) {
386
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
387
386
  const imports = [
388
387
  "// \u8FD9\u4E2A\u6587\u4EF6\u662F\u81EA\u52A8\u751F\u6210\u7684\uFF0C\u8BF7\u4E0D\u8981\u624B\u52A8\u4FEE\u6539",
389
- `// Generated at ${timestamp}`,
390
388
  "",
391
389
  'import { MicroserviceClient as BaseMicroserviceClient } from "imean-service-client";',
392
390
  'export * from "imean-service-client";',
@@ -884,7 +882,6 @@ var Microservice = class {
884
882
  };
885
883
  this.cache = this.options.cacheAdapter;
886
884
  this.fetch = this.app.request;
887
- this.waitingInitialization = this.initialize();
888
885
  ServiceContext.service = this;
889
886
  }
890
887
  async initialize() {
@@ -1114,7 +1111,7 @@ var Microservice = class {
1114
1111
  * 启动服务
1115
1112
  */
1116
1113
  async start(port = 3e3, silent = false) {
1117
- await this.waitingInitialization;
1114
+ await this.init();
1118
1115
  const prefix = this.options.prefix ?? "/api";
1119
1116
  this.abortController = new AbortController();
1120
1117
  !silent && console.log("");
@@ -1427,6 +1424,7 @@ Received SIGTERM signal`);
1427
1424
  }
1428
1425
  }
1429
1426
  async init() {
1427
+ this.waitingInitialization = this.initialize();
1430
1428
  await this.waitingInitialization;
1431
1429
  }
1432
1430
  };
package/dist/mod.js CHANGED
@@ -374,10 +374,8 @@ function getZodTypeString(schema, defaultOptional = false) {
374
374
  return processType(schema);
375
375
  }
376
376
  async function generateClientCode(modules) {
377
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
378
377
  const imports = [
379
378
  "// \u8FD9\u4E2A\u6587\u4EF6\u662F\u81EA\u52A8\u751F\u6210\u7684\uFF0C\u8BF7\u4E0D\u8981\u624B\u52A8\u4FEE\u6539",
380
- `// Generated at ${timestamp}`,
381
379
  "",
382
380
  'import { MicroserviceClient as BaseMicroserviceClient } from "imean-service-client";',
383
381
  'export * from "imean-service-client";',
@@ -875,7 +873,6 @@ var Microservice = class {
875
873
  };
876
874
  this.cache = this.options.cacheAdapter;
877
875
  this.fetch = this.app.request;
878
- this.waitingInitialization = this.initialize();
879
876
  ServiceContext.service = this;
880
877
  }
881
878
  async initialize() {
@@ -1105,7 +1102,7 @@ var Microservice = class {
1105
1102
  * 启动服务
1106
1103
  */
1107
1104
  async start(port = 3e3, silent = false) {
1108
- await this.waitingInitialization;
1105
+ await this.init();
1109
1106
  const prefix = this.options.prefix ?? "/api";
1110
1107
  this.abortController = new AbortController();
1111
1108
  !silent && console.log("");
@@ -1418,6 +1415,7 @@ Received SIGTERM signal`);
1418
1415
  }
1419
1416
  }
1420
1417
  async init() {
1418
+ this.waitingInitialization = this.initialize();
1421
1419
  await this.waitingInitialization;
1422
1420
  }
1423
1421
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imean-service-engine",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "microservice engine",
5
5
  "keywords": [
6
6
  "microservice",