@arkyn/server 1.4.57 → 1.5.1

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.
@@ -3,8 +3,7 @@ declare class Created<T> {
3
3
  body: T;
4
4
  init: ResponseInit;
5
5
  constructor(body: T, init?: ResponseInit);
6
- response(): Response;
7
- json(): Promise<any>;
6
+ json(): Response;
8
7
  }
9
8
  export { created, Created };
10
9
  //# sourceMappingURL=created.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../src/httpResponses/created.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../src/httpResponses/created.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -12,19 +12,12 @@ class Created {
12
12
  this.body = body;
13
13
  this.init = init || {};
14
14
  }
15
- response() {
16
- return new Response(JSON.stringify(this.body), {
17
- ...this.init,
18
- status: 201,
19
- headers: { "Content-Type": "application/json", ...this.init.headers },
20
- });
21
- }
22
15
  json() {
23
16
  return new Response(JSON.stringify(this.body), {
24
17
  ...this.init,
25
18
  status: 201,
26
19
  headers: { "Content-Type": "application/json", ...this.init.headers },
27
- }).json();
20
+ });
28
21
  }
29
22
  }
30
23
  export { created, Created };
@@ -2,8 +2,7 @@ declare function noContent(init?: ResponseInit): Response;
2
2
  declare class NoContent {
3
3
  init: ResponseInit;
4
4
  constructor(init?: ResponseInit);
5
- response(): Response;
6
- json(): Promise<any>;
5
+ json(): Response;
7
6
  }
8
7
  export { noContent, NoContent };
9
8
  //# sourceMappingURL=noContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../src/httpResponses/noContent.ts"],"names":[],"mappings":"AAAA,iBAAS,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMhD;AAED,cAAM,SAAS;IACb,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,CAAC,EAAE,YAAY;IAI/B,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../src/httpResponses/noContent.ts"],"names":[],"mappings":"AAAA,iBAAS,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMhD;AAED,cAAM,SAAS;IACb,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,CAAC,EAAE,YAAY;IAI/B,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
@@ -10,19 +10,12 @@ class NoContent {
10
10
  constructor(init) {
11
11
  this.init = init || {};
12
12
  }
13
- response() {
14
- return new Response(null, {
15
- ...this.init,
16
- status: 200,
17
- headers: { "Content-Type": "application/json", ...this.init.headers },
18
- });
19
- }
20
13
  json() {
21
14
  return new Response(null, {
22
15
  ...this.init,
23
16
  status: 200,
24
17
  headers: { "Content-Type": "application/json", ...this.init.headers },
25
- }).json();
18
+ });
26
19
  }
27
20
  }
28
21
  export { noContent, NoContent };
@@ -3,8 +3,7 @@ declare class Success<T> {
3
3
  body: T;
4
4
  init: ResponseInit;
5
5
  constructor(body: T, init?: ResponseInit);
6
- response(): Response;
7
- json(): Promise<any>;
6
+ json(): Response;
8
7
  }
9
8
  export { success, Success };
10
9
  //# sourceMappingURL=success.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../src/httpResponses/success.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../src/httpResponses/success.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -12,19 +12,12 @@ class Success {
12
12
  this.body = body;
13
13
  this.init = init || {};
14
14
  }
15
- response() {
16
- return new Response(JSON.stringify(this.body), {
17
- ...this.init,
18
- status: 200,
19
- headers: { "Content-Type": "application/json", ...this.init.headers },
20
- });
21
- }
22
15
  json() {
23
16
  return new Response(JSON.stringify(this.body), {
24
17
  ...this.init,
25
18
  status: 200,
26
19
  headers: { "Content-Type": "application/json", ...this.init.headers },
27
- }).json();
20
+ });
28
21
  }
29
22
  }
30
23
  export { success, Success };
@@ -3,8 +3,7 @@ declare class Updated<T> {
3
3
  body: T;
4
4
  init: ResponseInit;
5
5
  constructor(body: T, init?: ResponseInit);
6
- response(): Response;
7
- json(): Promise<any>;
6
+ json(): Response;
8
7
  }
9
8
  export { updated, Updated };
10
9
  //# sourceMappingURL=updated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updated.d.ts","sourceRoot":"","sources":["../../src/httpResponses/updated.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"updated.d.ts","sourceRoot":"","sources":["../../src/httpResponses/updated.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -12,19 +12,12 @@ class Updated {
12
12
  this.body = body;
13
13
  this.init = init || {};
14
14
  }
15
- response() {
16
- return new Response(JSON.stringify(this.body), {
17
- ...this.init,
18
- status: 200,
19
- headers: { "Content-Type": "application/json", ...this.init.headers },
20
- });
21
- }
22
15
  json() {
23
16
  return new Response(JSON.stringify(this.body), {
24
17
  ...this.init,
25
18
  status: 200,
26
19
  headers: { "Content-Type": "application/json", ...this.init.headers },
27
- }).json();
20
+ });
28
21
  }
29
22
  }
30
23
  export { updated, Updated };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/server",
3
- "version": "1.4.57",
3
+ "version": "1.5.1",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./src/index.ts",
6
6
  "type": "module",
@@ -15,21 +15,13 @@ class Created<T> {
15
15
  this.init = init || {};
16
16
  }
17
17
 
18
- response() {
18
+ json(): Response {
19
19
  return new Response(JSON.stringify(this.body), {
20
20
  ...this.init,
21
21
  status: 201,
22
22
  headers: { "Content-Type": "application/json", ...this.init.headers },
23
23
  });
24
24
  }
25
-
26
- json() {
27
- return new Response(JSON.stringify(this.body), {
28
- ...this.init,
29
- status: 201,
30
- headers: { "Content-Type": "application/json", ...this.init.headers },
31
- }).json();
32
- }
33
25
  }
34
26
 
35
27
  export { created, Created };
@@ -13,21 +13,13 @@ class NoContent {
13
13
  this.init = init || {};
14
14
  }
15
15
 
16
- response() {
16
+ json(): Response {
17
17
  return new Response(null, {
18
18
  ...this.init,
19
19
  status: 200,
20
20
  headers: { "Content-Type": "application/json", ...this.init.headers },
21
21
  });
22
22
  }
23
-
24
- json() {
25
- return new Response(null, {
26
- ...this.init,
27
- status: 200,
28
- headers: { "Content-Type": "application/json", ...this.init.headers },
29
- }).json();
30
- }
31
23
  }
32
24
 
33
25
  export { noContent, NoContent };
@@ -15,21 +15,13 @@ class Success<T> {
15
15
  this.init = init || {};
16
16
  }
17
17
 
18
- response() {
18
+ json(): Response {
19
19
  return new Response(JSON.stringify(this.body), {
20
20
  ...this.init,
21
21
  status: 200,
22
22
  headers: { "Content-Type": "application/json", ...this.init.headers },
23
23
  });
24
24
  }
25
-
26
- json() {
27
- return new Response(JSON.stringify(this.body), {
28
- ...this.init,
29
- status: 200,
30
- headers: { "Content-Type": "application/json", ...this.init.headers },
31
- }).json();
32
- }
33
25
  }
34
26
 
35
27
  export { success, Success };
@@ -15,21 +15,13 @@ class Updated<T> {
15
15
  this.init = init || {};
16
16
  }
17
17
 
18
- response() {
18
+ json(): Response {
19
19
  return new Response(JSON.stringify(this.body), {
20
20
  ...this.init,
21
21
  status: 200,
22
22
  headers: { "Content-Type": "application/json", ...this.init.headers },
23
23
  });
24
24
  }
25
-
26
- json() {
27
- return new Response(JSON.stringify(this.body), {
28
- ...this.init,
29
- status: 200,
30
- headers: { "Content-Type": "application/json", ...this.init.headers },
31
- }).json();
32
- }
33
25
  }
34
26
 
35
27
  export { updated, Updated };