@cheetah.js/orm 0.1.26 → 0.1.27

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/bun/index.js CHANGED
@@ -221747,7 +221747,15 @@ var Context = Context_1 = class Context2 {
221747
221747
  if (request.method === "GET") {
221748
221748
  context.setQuery(url);
221749
221749
  } else {
221750
- context.setBody(await request.formData());
221750
+ if (request.headers.get("content-type").includes("application/json")) {
221751
+ context.body = await request.json();
221752
+ } else if (request.headers.get("content-type").includes("application/x-www-form-urlencoded")) {
221753
+ context.setBody(await request.formData());
221754
+ } else if (request.headers.get("content-type").includes("multipart/form-data")) {
221755
+ context.setBody(await request.formData());
221756
+ } else {
221757
+ context.body = { body: await request.text() };
221758
+ }
221751
221759
  }
221752
221760
  context.setReq(request);
221753
221761
  context.setHeaders(request.headers);
@@ -221976,9 +221984,12 @@ class Cheetah {
221976
221984
  registerProvider({ provide: LoggerService, useClass: provider4 });
221977
221985
  return this;
221978
221986
  }
221987
+ init() {
221988
+ this.injector.loadModule(createContainer(), this.config, this.router);
221989
+ }
221979
221990
  async listen(port = 3000) {
221980
221991
  process3.on("SIGTERM", () => this.injector.callHook(EventType.OnApplicationShutdown));
221981
- this.injector.loadModule(createContainer(), this.config, this.router);
221992
+ this.init();
221982
221993
  this.createHttpServer(port);
221983
221994
  }
221984
221995
  getInjector() {
@@ -227460,4 +227471,4 @@ export {
227460
227471
  AfterCreate
227461
227472
  };
227462
227473
 
227463
- //# debugId=618FC71B2274874064756e2164756e21
227474
+ //# debugId=52B1CC45B0BC7D4064756e2164756e21