@arkyn/server 1.4.29 → 1.4.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../src/httpResponses/created.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAI5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../src/httpResponses/created.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAU5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,7 +1,13 @@
1
1
  class Created extends Response {
2
2
  constructor(body, init) {
3
- super(body, { ...init, status: 201 });
4
- this.headers.set("Content-Type", "application/json");
3
+ super(body, {
4
+ ...init,
5
+ status: 201,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
5
11
  }
6
12
  }
7
13
  export { Created };
@@ -1,5 +1,5 @@
1
1
  declare class NoContent extends Response {
2
- constructor(body?: any, init?: ResponseInit);
2
+ constructor(init?: ResponseInit);
3
3
  }
4
4
  export { NoContent };
5
5
  //# sourceMappingURL=noContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../src/httpResponses/noContent.ts"],"names":[],"mappings":"AAAA,cAAM,SAAU,SAAQ,QAAQ;gBAClB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAG5C;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../src/httpResponses/noContent.ts"],"names":[],"mappings":"AAAA,cAAM,SAAU,SAAQ,QAAQ;gBAClB,IAAI,CAAC,EAAE,YAAY;CAGhC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  class NoContent extends Response {
2
- constructor(body, init) {
3
- super(body, init);
2
+ constructor(init) {
3
+ super(null, init);
4
4
  }
5
5
  }
6
6
  export { NoContent };
@@ -1 +1 @@
1
- {"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../src/httpResponses/success.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAI5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../src/httpResponses/success.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAU5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,7 +1,13 @@
1
1
  class Success extends Response {
2
2
  constructor(body, init) {
3
- super(body, { ...init, status: 200 });
4
- this.headers.set("Content-Type", "application/json");
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
5
11
  }
6
12
  }
7
13
  export { Success };
@@ -1 +1 @@
1
- {"version":3,"file":"updated.d.ts","sourceRoot":"","sources":["../../src/httpResponses/updated.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAI5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"updated.d.ts","sourceRoot":"","sources":["../../src/httpResponses/updated.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAU5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,7 +1,13 @@
1
1
  class Updated extends Response {
2
2
  constructor(body, init) {
3
- super(body, { ...init, status: 200 });
4
- this.headers.set("Content-Type", "application/json");
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
5
11
  }
6
12
  }
7
13
  export { Updated };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/server",
3
- "version": "1.4.29",
3
+ "version": "1.4.30",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./src/index.ts",
6
6
  "type": "module",
@@ -1,7 +1,13 @@
1
1
  class Created extends Response {
2
2
  constructor(body?: any, init?: ResponseInit) {
3
- super(body, { ...init, status: 201 });
4
- this.headers.set("Content-Type", "application/json");
3
+ super(body, {
4
+ ...init,
5
+ status: 201,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
5
11
  }
6
12
  }
7
13
 
@@ -1,6 +1,6 @@
1
1
  class NoContent extends Response {
2
- constructor(body?: any, init?: ResponseInit) {
3
- super(body, init);
2
+ constructor(init?: ResponseInit) {
3
+ super(null, init);
4
4
  }
5
5
  }
6
6
 
@@ -1,7 +1,13 @@
1
1
  class Success extends Response {
2
2
  constructor(body?: any, init?: ResponseInit) {
3
- super(body, { ...init, status: 200 });
4
- this.headers.set("Content-Type", "application/json");
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
5
11
  }
6
12
  }
7
13
 
@@ -1,7 +1,13 @@
1
1
  class Updated extends Response {
2
2
  constructor(body?: any, init?: ResponseInit) {
3
- super(body, { ...init, status: 200 });
4
- this.headers.set("Content-Type", "application/json");
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
5
11
  }
6
12
  }
7
13