@dooboostore/simple-boot-http-server 1.0.20 → 1.0.21

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.
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  mod
31
31
  ));
32
32
 
33
- // ../../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json
33
+ // ../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json
34
34
  var require_db = __commonJS({
35
- "../../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json"(exports, module) {
35
+ "../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json"(exports, module) {
36
36
  module.exports = {
37
37
  "application/1d-interleaved-parityfec": {
38
38
  source: "iana"
@@ -8555,16 +8555,16 @@ var require_db = __commonJS({
8555
8555
  }
8556
8556
  });
8557
8557
 
8558
- // ../../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js
8558
+ // ../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js
8559
8559
  var require_mime_db = __commonJS({
8560
- "../../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js"(exports, module) {
8560
+ "../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js"(exports, module) {
8561
8561
  module.exports = require_db();
8562
8562
  }
8563
8563
  });
8564
8564
 
8565
- // ../../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js
8565
+ // ../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js
8566
8566
  var require_mime_types = __commonJS({
8567
- "../../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js"(exports) {
8567
+ "../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js"(exports) {
8568
8568
  "use strict";
8569
8569
  var db = require_mime_db();
8570
8570
  var extname = __require("path").extname;
@@ -8652,9 +8652,9 @@ var require_mime_types = __commonJS({
8652
8652
  }
8653
8653
  });
8654
8654
 
8655
- // ../../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js
8655
+ // ../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js
8656
8656
  var require_dist = __commonJS({
8657
- "../../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js"(exports, module) {
8657
+ "../../node_modules/.pnpm/node-gzip@1.1.2/node_modules/node-gzip/dist/index.js"(exports, module) {
8658
8658
  "use strict";
8659
8659
  var zlib = __require("zlib");
8660
8660
  module.exports = {
@@ -8680,9 +8680,9 @@ var require_dist = __commonJS({
8680
8680
  }
8681
8681
  });
8682
8682
 
8683
- // ../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/helpers.js
8683
+ // ../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/helpers.js
8684
8684
  var require_helpers = __commonJS({
8685
- "../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/helpers.js"(exports) {
8685
+ "../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/helpers.js"(exports) {
8686
8686
  var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
8687
8687
  var extendStatics = function(d, b) {
8688
8688
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -8848,9 +8848,9 @@ var require_helpers = __commonJS({
8848
8848
  }
8849
8849
  });
8850
8850
 
8851
- // ../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/core.js
8851
+ // ../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/core.js
8852
8852
  var require_core = __commonJS({
8853
- "../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/core.js"(exports) {
8853
+ "../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/core.js"(exports) {
8854
8854
  Object.defineProperty(exports, "__esModule", { value: true });
8855
8855
  var helpers_js_1 = require_helpers();
8856
8856
  exports.JsonPatchError = helpers_js_1.PatchError;
@@ -9181,9 +9181,9 @@ var require_core = __commonJS({
9181
9181
  }
9182
9182
  });
9183
9183
 
9184
- // ../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/duplex.js
9184
+ // ../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/duplex.js
9185
9185
  var require_duplex = __commonJS({
9186
- "../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/duplex.js"(exports) {
9186
+ "../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/commonjs/duplex.js"(exports) {
9187
9187
  Object.defineProperty(exports, "__esModule", { value: true });
9188
9188
  var helpers_js_1 = require_helpers();
9189
9189
  var core_js_1 = require_core();
@@ -9355,9 +9355,9 @@ var require_duplex = __commonJS({
9355
9355
  }
9356
9356
  });
9357
9357
 
9358
- // ../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js
9358
+ // ../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js
9359
9359
  var require_fast_json_patch = __commonJS({
9360
- "../../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js"(exports) {
9360
+ "../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js"(exports) {
9361
9361
  var core = require_core();
9362
9362
  Object.assign(exports, core);
9363
9363
  var duplex = require_duplex();
@@ -13759,7 +13759,6 @@ var SimstanceManager = class _SimstanceManager {
13759
13759
  this.setStoreSet(option.constructor, option);
13760
13760
  this.setStoreSet(SimOption, option);
13761
13761
  this.simProxyHandler = new SimProxyHandler(this.simpleApplication, this, option);
13762
- console.log("simstanceManager constructor", this.name);
13763
13762
  }
13764
13763
  get storage() {
13765
13764
  return this._storage;
@@ -14470,7 +14469,7 @@ var RouterManager = class RouterManager2 {
14470
14469
  get observable() {
14471
14470
  return this.subject.asObservable();
14472
14471
  }
14473
- routingMap(prefix = "", option) {
14472
+ routingMap(option) {
14474
14473
  const targetRouter = option?.router ?? this.simOption.rootRouter;
14475
14474
  if (!targetRouter) {
14476
14475
  throw new Error("no router");
@@ -14482,7 +14481,7 @@ var RouterManager = class RouterManager2 {
14482
14481
  const routerAtomic = new SimAtomic({ targetKeyType: targetType, originalType: targetType, value: targetValue }, this.simstanceManager);
14483
14482
  const routerData = routerAtomic.getConfig(RouterMetadataKey);
14484
14483
  if (routerData) {
14485
- const currentPrefix = prefix + routerData.path;
14484
+ const currentPrefix = (option?.prefix ?? "") + routerData.path;
14486
14485
  if (routerData.route && routerData.route[""]) {
14487
14486
  map[currentPrefix] = routerData.route[""];
14488
14487
  }
@@ -14492,7 +14491,7 @@ var RouterManager = class RouterManager2 {
14492
14491
  });
14493
14492
  }
14494
14493
  routerData.routers?.forEach((it) => {
14495
- Object.assign(map, this.routingMap(currentPrefix, { ...option, router: it }));
14494
+ Object.assign(map, this.routingMap({ ...option, router: it, prefix: currentPrefix }));
14496
14495
  });
14497
14496
  }
14498
14497
  }
@@ -14925,7 +14924,7 @@ var SimpleApplication = class {
14925
14924
  }
14926
14925
  run(otherInstanceSim) {
14927
14926
  this.simstanceManager.run(otherInstanceSim);
14928
- return this.simstanceManager;
14927
+ return this;
14929
14928
  }
14930
14929
  simAtomic(type) {
14931
14930
  if (typeof type === "symbol") {
@@ -15047,12 +15046,12 @@ var SimpleBootHttpServer = class extends SimpleApplication {
15047
15046
  this.sessionManager = new SessionManager(this.option);
15048
15047
  }
15049
15048
  run(otherInstanceSim) {
15050
- const simstanceManager = super.run(otherInstanceSim);
15049
+ super.run(otherInstanceSim);
15051
15050
  const targets = [...this.option.closeEndPoints ?? [], ...this.option.errorEndPoints ?? [], ...this.option.requestEndPoints ?? [], ...this.option.filters ?? []];
15052
15051
  Promise.all(targets.map((it) => typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it).map((it) => it.onInit(this))).then((it) => {
15053
15052
  this.startServer();
15054
15053
  });
15055
- return simstanceManager;
15054
+ return this;
15056
15055
  }
15057
15056
  startServer() {
15058
15057
  if (this.option.serverOption && "key" in this.option.serverOption && "cert" in this.option.serverOption) {