@opra/core 0.33.9 → 0.33.11
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/cjs/http/adapters/node-http-adapter.host.js +2 -2
- package/cjs/http/http-adapter-host.js +44 -51
- package/cjs/http/http-server-response.js +1 -1
- package/esm/http/adapters/node-http-adapter.host.js +3 -3
- package/esm/http/http-adapter-host.js +45 -52
- package/esm/http/http-server-response.js +2 -2
- package/package.json +7 -7
|
@@ -42,8 +42,8 @@ class NodeHttpAdapterHost extends http_adapter_host_js_1.HttpAdapterHost {
|
|
|
42
42
|
const parsedUrl = new common_1.OpraURL(originalUrl);
|
|
43
43
|
const relativePath = common_1.OpraURLPath.relative(parsedUrl.path, this.basePath);
|
|
44
44
|
if (!relativePath) {
|
|
45
|
-
serverResponse.statusCode = common_1.
|
|
46
|
-
serverResponse.statusMessage = common_1.HttpStatusMessages[common_1.
|
|
45
|
+
serverResponse.statusCode = common_1.HttpStatusCode.NOT_FOUND;
|
|
46
|
+
serverResponse.statusMessage = common_1.HttpStatusMessages[common_1.HttpStatusCode.NOT_FOUND];
|
|
47
47
|
serverResponse.end();
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const promises_1 = tslib_1.__importDefault(require("fs/promises"));
|
|
6
6
|
const os_1 = tslib_1.__importDefault(require("os"));
|
|
7
7
|
const valgen_1 = require("valgen");
|
|
8
|
-
const type_is_1 = tslib_1.__importDefault(require("@browsery/type-is"));
|
|
9
8
|
const common_1 = require("@opra/common");
|
|
10
9
|
const execution_context_host_js_1 = require("../execution-context.host.js");
|
|
11
10
|
const platform_adapter_host_js_1 = require("../platform-adapter.host.js");
|
|
@@ -536,14 +535,9 @@ class HttpAdapterHost extends platform_adapter_host_js_1.PlatformAdapterHost {
|
|
|
536
535
|
response.value = value;
|
|
537
536
|
// Normalize response value
|
|
538
537
|
if (endpoint.kind === 'operation') {
|
|
539
|
-
if (resource instanceof common_1.Storage && endpoint.name === 'post') {
|
|
540
|
-
// Count file parts
|
|
541
|
-
value = context.request.parts.items.reduce((n, item) => item.file ? n + 1 : n, 0);
|
|
542
|
-
}
|
|
543
538
|
if (resource instanceof common_1.Collection || resource instanceof common_1.Singleton || resource instanceof common_1.Storage) {
|
|
544
539
|
const operationName = endpoint.name;
|
|
545
|
-
if (operationName === 'delete' || operationName === 'deleteMany' ||
|
|
546
|
-
operationName === 'updateMany' || operationName === 'post') {
|
|
540
|
+
if (operationName === 'delete' || operationName === 'deleteMany' || operationName === 'updateMany') {
|
|
547
541
|
let affected = 0;
|
|
548
542
|
if (typeof value === 'number')
|
|
549
543
|
affected = value;
|
|
@@ -555,16 +549,16 @@ class HttpAdapterHost extends platform_adapter_host_js_1.PlatformAdapterHost {
|
|
|
555
549
|
response.value = affected;
|
|
556
550
|
return;
|
|
557
551
|
}
|
|
558
|
-
if (resource instanceof common_1.
|
|
559
|
-
return
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
552
|
+
if (resource instanceof common_1.Collection || resource instanceof common_1.Singleton) {
|
|
553
|
+
// "get" and "update" endpoints must return the entity instance, otherwise it means resource not found
|
|
554
|
+
if (value == null && (operationName === 'get' || operationName === 'update'))
|
|
555
|
+
throw new common_1.ResourceNotAvailableError(resource.name, request.key);
|
|
556
|
+
// "findMany" endpoint should return array of entity instances
|
|
557
|
+
if (operationName === 'findMany')
|
|
558
|
+
value = (value == null ? [] : Array.isArray(value) ? value : [value]);
|
|
559
|
+
else
|
|
560
|
+
value = value == null ? {} : Array.isArray(value) ? value[0] : value;
|
|
561
|
+
}
|
|
568
562
|
value = endpoint.encodeReturning(value, { coerce: true, partial: true });
|
|
569
563
|
response.value = value;
|
|
570
564
|
return;
|
|
@@ -589,17 +583,14 @@ class HttpAdapterHost extends platform_adapter_host_js_1.PlatformAdapterHost {
|
|
|
589
583
|
return;
|
|
590
584
|
}
|
|
591
585
|
let contentType = String(outgoing.getHeader('content-type') || '');
|
|
592
|
-
|
|
586
|
+
let returnType = endpoint.returnType;
|
|
593
587
|
if (endpoint.kind === 'action' && !contentType && endpoint.returnMime && response.value) {
|
|
594
588
|
contentType = endpoint.returnMime;
|
|
595
589
|
outgoing.setHeader('Content-Type', contentType);
|
|
596
590
|
}
|
|
597
591
|
// OperationResult response
|
|
598
|
-
if ((endpoint.kind === 'operation' &&
|
|
599
|
-
(resource instanceof common_1.
|
|
600
|
-
(resource instanceof common_1.Storage && endpoint.name !== 'get'))) ||
|
|
601
|
-
(endpoint.kind === 'action' &&
|
|
602
|
-
(!contentType || type_is_1.default.is(contentType, ['application/opra+json'])))) {
|
|
592
|
+
if ((returnType || endpoint.kind === 'operation') &&
|
|
593
|
+
!(resource instanceof common_1.Storage && endpoint.name === 'get')) {
|
|
603
594
|
const incoming = context.switchToHttp().incoming;
|
|
604
595
|
const apiUrl = new common_1.OpraURL(incoming.baseUrl, incoming.protocol + '://' + incoming.get('host')).toString();
|
|
605
596
|
const body = new common_1.OperationResult({
|
|
@@ -607,40 +598,42 @@ class HttpAdapterHost extends platform_adapter_host_js_1.PlatformAdapterHost {
|
|
|
607
598
|
contextUrl: ''
|
|
608
599
|
});
|
|
609
600
|
const operationName = endpoint.kind === 'operation' ? endpoint.name : '';
|
|
610
|
-
if (operationName === 'delete' || operationName === 'deleteMany' ||
|
|
611
|
-
operationName === 'updateMany' || operationName === 'post')
|
|
601
|
+
if (operationName === 'delete' || operationName === 'deleteMany' || operationName === 'updateMany') {
|
|
612
602
|
body.affected = response.value;
|
|
603
|
+
returnType = undefined;
|
|
604
|
+
}
|
|
613
605
|
else {
|
|
614
|
-
outgoing.statusCode = outgoing.statusCode || common_1.
|
|
606
|
+
outgoing.statusCode = outgoing.statusCode || common_1.HttpStatusCode.OK;
|
|
615
607
|
if (operationName === 'create')
|
|
616
608
|
outgoing.statusCode = 201;
|
|
617
|
-
if (operationName === 'update' || operationName === 'create')
|
|
609
|
+
if (operationName === 'update' || operationName === 'create') {
|
|
618
610
|
body.affected = response.value ? 1 : 0;
|
|
611
|
+
}
|
|
619
612
|
if (operationName === 'findMany') {
|
|
620
613
|
body.count = response.value.length;
|
|
621
614
|
body.totalMatches = response.totalMatches;
|
|
622
615
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
else
|
|
636
|
-
body.typeUrl = body.contextUrl + '/type';
|
|
637
|
-
if (response.value instanceof common_1.OperationResult) {
|
|
638
|
-
Object.assign(body, response.value);
|
|
639
|
-
}
|
|
640
|
-
else
|
|
641
|
-
body.payload = response.value;
|
|
642
|
-
body.payload = this.i18n.deep(body.payload);
|
|
616
|
+
}
|
|
617
|
+
if (returnType) {
|
|
618
|
+
if (response.value == null)
|
|
619
|
+
throw new common_1.InternalServerError(`"${request.endpoint.name}" endpoint should return value`);
|
|
620
|
+
if (!returnType.isEmbedded) {
|
|
621
|
+
const ns = this.api.getDataTypeNs(returnType);
|
|
622
|
+
// const isOpraSpec = returnType.document.url?.startsWith('https://oprajs.com/spec/v1.0')
|
|
623
|
+
body.type = (ns ? ns + ':' : '') + returnType.name;
|
|
624
|
+
body.typeUrl =
|
|
625
|
+
(ns
|
|
626
|
+
? new common_1.OpraURL('/#/types/' + returnType.name, returnType.document.url || 'http://tempuri.org').toString()
|
|
627
|
+
: apiUrl + '/#/types/' + returnType.name);
|
|
643
628
|
}
|
|
629
|
+
else
|
|
630
|
+
body.typeUrl = body.contextUrl + '/type';
|
|
631
|
+
if (response.value instanceof common_1.OperationResult) {
|
|
632
|
+
Object.assign(body, response.value);
|
|
633
|
+
}
|
|
634
|
+
else
|
|
635
|
+
body.payload = response.value;
|
|
636
|
+
body.payload = this.i18n.deep(body.payload);
|
|
644
637
|
}
|
|
645
638
|
body.context = endpoint.getFullPath(false);
|
|
646
639
|
body.contextUrl = apiUrl + '/#' + endpoint.getFullPath(true);
|
|
@@ -649,7 +642,7 @@ class HttpAdapterHost extends platform_adapter_host_js_1.PlatformAdapterHost {
|
|
|
649
642
|
outgoing.end();
|
|
650
643
|
return;
|
|
651
644
|
}
|
|
652
|
-
outgoing.statusCode = outgoing.statusCode || common_1.
|
|
645
|
+
outgoing.statusCode = outgoing.statusCode || common_1.HttpStatusCode.OK;
|
|
653
646
|
if (response.value != null) {
|
|
654
647
|
if (typeof response.value === 'string') {
|
|
655
648
|
if (!contentType)
|
|
@@ -701,10 +694,10 @@ class HttpAdapterHost extends platform_adapter_host_js_1.PlatformAdapterHost {
|
|
|
701
694
|
return i;
|
|
702
695
|
});
|
|
703
696
|
let status = outgoing.statusCode || 0;
|
|
704
|
-
if (!status || status < Number(common_1.
|
|
697
|
+
if (!status || status < Number(common_1.HttpStatusCode.BAD_REQUEST)) {
|
|
705
698
|
status = wrappedErrors[0].status;
|
|
706
|
-
if (status < Number(common_1.
|
|
707
|
-
status = common_1.
|
|
699
|
+
if (status < Number(common_1.HttpStatusCode.BAD_REQUEST))
|
|
700
|
+
status = common_1.HttpStatusCode.INTERNAL_SERVER_ERROR;
|
|
708
701
|
}
|
|
709
702
|
outgoing.statusCode = status;
|
|
710
703
|
const body = new common_1.OperationResult({
|
|
@@ -107,7 +107,7 @@ class HttpServerResponseHost {
|
|
|
107
107
|
return this;
|
|
108
108
|
}
|
|
109
109
|
sendStatus(statusCode) {
|
|
110
|
-
const body = common_1.
|
|
110
|
+
const body = common_1.HttpStatusCode[statusCode] || String(statusCode);
|
|
111
111
|
this.statusCode = statusCode;
|
|
112
112
|
this.contentType('txt');
|
|
113
113
|
return this.send(body);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import http from 'http';
|
|
2
|
-
import {
|
|
2
|
+
import { HttpStatusCode, HttpStatusMessages, OpraURL, OpraURLPath, } from '@opra/common';
|
|
3
3
|
import { HttpAdapterHost } from '../http-adapter-host.js';
|
|
4
4
|
import { HttpServerRequest } from '../http-server-request.js';
|
|
5
5
|
import { HttpServerResponse } from '../http-server-response.js';
|
|
@@ -38,8 +38,8 @@ export class NodeHttpAdapterHost extends HttpAdapterHost {
|
|
|
38
38
|
const parsedUrl = new OpraURL(originalUrl);
|
|
39
39
|
const relativePath = OpraURLPath.relative(parsedUrl.path, this.basePath);
|
|
40
40
|
if (!relativePath) {
|
|
41
|
-
serverResponse.statusCode =
|
|
42
|
-
serverResponse.statusMessage = HttpStatusMessages[
|
|
41
|
+
serverResponse.statusCode = HttpStatusCode.NOT_FOUND;
|
|
42
|
+
serverResponse.statusMessage = HttpStatusMessages[HttpStatusCode.NOT_FOUND];
|
|
43
43
|
serverResponse.end();
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
2
|
import os from 'os';
|
|
3
3
|
import { ValidationError } from 'valgen';
|
|
4
|
-
import
|
|
5
|
-
import { BadRequestError, Collection, Container, HttpHeaderCodes, HttpStatusCodes, InternalServerError, isReadable, IssueSeverity, MethodNotAllowedError, OperationResult, OpraException, OpraSchema, OpraURL, ResourceNotAvailableError, Singleton, Storage, translate, uid, wrapException } from '@opra/common';
|
|
4
|
+
import { BadRequestError, Collection, Container, HttpHeaderCodes, HttpStatusCode, InternalServerError, isReadable, IssueSeverity, MethodNotAllowedError, OperationResult, OpraException, OpraSchema, OpraURL, ResourceNotAvailableError, Singleton, Storage, translate, uid, wrapException } from '@opra/common';
|
|
6
5
|
import { ExecutionContextHost } from '../execution-context.host.js';
|
|
7
6
|
import { PlatformAdapterHost } from '../platform-adapter.host.js';
|
|
8
7
|
import { RequestHost } from '../request.host.js';
|
|
@@ -532,14 +531,9 @@ export class HttpAdapterHost extends PlatformAdapterHost {
|
|
|
532
531
|
response.value = value;
|
|
533
532
|
// Normalize response value
|
|
534
533
|
if (endpoint.kind === 'operation') {
|
|
535
|
-
if (resource instanceof Storage && endpoint.name === 'post') {
|
|
536
|
-
// Count file parts
|
|
537
|
-
value = context.request.parts.items.reduce((n, item) => item.file ? n + 1 : n, 0);
|
|
538
|
-
}
|
|
539
534
|
if (resource instanceof Collection || resource instanceof Singleton || resource instanceof Storage) {
|
|
540
535
|
const operationName = endpoint.name;
|
|
541
|
-
if (operationName === 'delete' || operationName === 'deleteMany' ||
|
|
542
|
-
operationName === 'updateMany' || operationName === 'post') {
|
|
536
|
+
if (operationName === 'delete' || operationName === 'deleteMany' || operationName === 'updateMany') {
|
|
543
537
|
let affected = 0;
|
|
544
538
|
if (typeof value === 'number')
|
|
545
539
|
affected = value;
|
|
@@ -551,16 +545,16 @@ export class HttpAdapterHost extends PlatformAdapterHost {
|
|
|
551
545
|
response.value = affected;
|
|
552
546
|
return;
|
|
553
547
|
}
|
|
554
|
-
if (resource instanceof
|
|
555
|
-
return
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
548
|
+
if (resource instanceof Collection || resource instanceof Singleton) {
|
|
549
|
+
// "get" and "update" endpoints must return the entity instance, otherwise it means resource not found
|
|
550
|
+
if (value == null && (operationName === 'get' || operationName === 'update'))
|
|
551
|
+
throw new ResourceNotAvailableError(resource.name, request.key);
|
|
552
|
+
// "findMany" endpoint should return array of entity instances
|
|
553
|
+
if (operationName === 'findMany')
|
|
554
|
+
value = (value == null ? [] : Array.isArray(value) ? value : [value]);
|
|
555
|
+
else
|
|
556
|
+
value = value == null ? {} : Array.isArray(value) ? value[0] : value;
|
|
557
|
+
}
|
|
564
558
|
value = endpoint.encodeReturning(value, { coerce: true, partial: true });
|
|
565
559
|
response.value = value;
|
|
566
560
|
return;
|
|
@@ -585,17 +579,14 @@ export class HttpAdapterHost extends PlatformAdapterHost {
|
|
|
585
579
|
return;
|
|
586
580
|
}
|
|
587
581
|
let contentType = String(outgoing.getHeader('content-type') || '');
|
|
588
|
-
|
|
582
|
+
let returnType = endpoint.returnType;
|
|
589
583
|
if (endpoint.kind === 'action' && !contentType && endpoint.returnMime && response.value) {
|
|
590
584
|
contentType = endpoint.returnMime;
|
|
591
585
|
outgoing.setHeader('Content-Type', contentType);
|
|
592
586
|
}
|
|
593
587
|
// OperationResult response
|
|
594
|
-
if ((endpoint.kind === 'operation' &&
|
|
595
|
-
(resource instanceof
|
|
596
|
-
(resource instanceof Storage && endpoint.name !== 'get'))) ||
|
|
597
|
-
(endpoint.kind === 'action' &&
|
|
598
|
-
(!contentType || typeIs.is(contentType, ['application/opra+json'])))) {
|
|
588
|
+
if ((returnType || endpoint.kind === 'operation') &&
|
|
589
|
+
!(resource instanceof Storage && endpoint.name === 'get')) {
|
|
599
590
|
const incoming = context.switchToHttp().incoming;
|
|
600
591
|
const apiUrl = new OpraURL(incoming.baseUrl, incoming.protocol + '://' + incoming.get('host')).toString();
|
|
601
592
|
const body = new OperationResult({
|
|
@@ -603,40 +594,42 @@ export class HttpAdapterHost extends PlatformAdapterHost {
|
|
|
603
594
|
contextUrl: ''
|
|
604
595
|
});
|
|
605
596
|
const operationName = endpoint.kind === 'operation' ? endpoint.name : '';
|
|
606
|
-
if (operationName === 'delete' || operationName === 'deleteMany' ||
|
|
607
|
-
operationName === 'updateMany' || operationName === 'post')
|
|
597
|
+
if (operationName === 'delete' || operationName === 'deleteMany' || operationName === 'updateMany') {
|
|
608
598
|
body.affected = response.value;
|
|
599
|
+
returnType = undefined;
|
|
600
|
+
}
|
|
609
601
|
else {
|
|
610
|
-
outgoing.statusCode = outgoing.statusCode ||
|
|
602
|
+
outgoing.statusCode = outgoing.statusCode || HttpStatusCode.OK;
|
|
611
603
|
if (operationName === 'create')
|
|
612
604
|
outgoing.statusCode = 201;
|
|
613
|
-
if (operationName === 'update' || operationName === 'create')
|
|
605
|
+
if (operationName === 'update' || operationName === 'create') {
|
|
614
606
|
body.affected = response.value ? 1 : 0;
|
|
607
|
+
}
|
|
615
608
|
if (operationName === 'findMany') {
|
|
616
609
|
body.count = response.value.length;
|
|
617
610
|
body.totalMatches = response.totalMatches;
|
|
618
611
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
else
|
|
632
|
-
body.typeUrl = body.contextUrl + '/type';
|
|
633
|
-
if (response.value instanceof OperationResult) {
|
|
634
|
-
Object.assign(body, response.value);
|
|
635
|
-
}
|
|
636
|
-
else
|
|
637
|
-
body.payload = response.value;
|
|
638
|
-
body.payload = this.i18n.deep(body.payload);
|
|
612
|
+
}
|
|
613
|
+
if (returnType) {
|
|
614
|
+
if (response.value == null)
|
|
615
|
+
throw new InternalServerError(`"${request.endpoint.name}" endpoint should return value`);
|
|
616
|
+
if (!returnType.isEmbedded) {
|
|
617
|
+
const ns = this.api.getDataTypeNs(returnType);
|
|
618
|
+
// const isOpraSpec = returnType.document.url?.startsWith('https://oprajs.com/spec/v1.0')
|
|
619
|
+
body.type = (ns ? ns + ':' : '') + returnType.name;
|
|
620
|
+
body.typeUrl =
|
|
621
|
+
(ns
|
|
622
|
+
? new OpraURL('/#/types/' + returnType.name, returnType.document.url || 'http://tempuri.org').toString()
|
|
623
|
+
: apiUrl + '/#/types/' + returnType.name);
|
|
639
624
|
}
|
|
625
|
+
else
|
|
626
|
+
body.typeUrl = body.contextUrl + '/type';
|
|
627
|
+
if (response.value instanceof OperationResult) {
|
|
628
|
+
Object.assign(body, response.value);
|
|
629
|
+
}
|
|
630
|
+
else
|
|
631
|
+
body.payload = response.value;
|
|
632
|
+
body.payload = this.i18n.deep(body.payload);
|
|
640
633
|
}
|
|
641
634
|
body.context = endpoint.getFullPath(false);
|
|
642
635
|
body.contextUrl = apiUrl + '/#' + endpoint.getFullPath(true);
|
|
@@ -645,7 +638,7 @@ export class HttpAdapterHost extends PlatformAdapterHost {
|
|
|
645
638
|
outgoing.end();
|
|
646
639
|
return;
|
|
647
640
|
}
|
|
648
|
-
outgoing.statusCode = outgoing.statusCode ||
|
|
641
|
+
outgoing.statusCode = outgoing.statusCode || HttpStatusCode.OK;
|
|
649
642
|
if (response.value != null) {
|
|
650
643
|
if (typeof response.value === 'string') {
|
|
651
644
|
if (!contentType)
|
|
@@ -697,10 +690,10 @@ export class HttpAdapterHost extends PlatformAdapterHost {
|
|
|
697
690
|
return i;
|
|
698
691
|
});
|
|
699
692
|
let status = outgoing.statusCode || 0;
|
|
700
|
-
if (!status || status < Number(
|
|
693
|
+
if (!status || status < Number(HttpStatusCode.BAD_REQUEST)) {
|
|
701
694
|
status = wrappedErrors[0].status;
|
|
702
|
-
if (status < Number(
|
|
703
|
-
status =
|
|
695
|
+
if (status < Number(HttpStatusCode.BAD_REQUEST))
|
|
696
|
+
status = HttpStatusCode.INTERNAL_SERVER_ERROR;
|
|
704
697
|
}
|
|
705
698
|
outgoing.statusCode = status;
|
|
706
699
|
const body = new OperationResult({
|
|
@@ -11,7 +11,7 @@ import mime from 'mime-types';
|
|
|
11
11
|
import path from 'path';
|
|
12
12
|
import { toString } from 'putil-varhelpers';
|
|
13
13
|
import vary from 'vary';
|
|
14
|
-
import {
|
|
14
|
+
import { HttpStatusCode, isStream, mergePrototype } from '@opra/common';
|
|
15
15
|
import { HttpOutgoingMessageHost } from './impl/http-outgoing-message.host.js';
|
|
16
16
|
const charsetRegExp = /;\s*charset\s*=/;
|
|
17
17
|
function isHttpIncomingMessage(v) {
|
|
@@ -103,7 +103,7 @@ class HttpServerResponseHost {
|
|
|
103
103
|
return this;
|
|
104
104
|
}
|
|
105
105
|
sendStatus(statusCode) {
|
|
106
|
-
const body =
|
|
106
|
+
const body = HttpStatusCode[statusCode] || String(statusCode);
|
|
107
107
|
this.statusCode = statusCode;
|
|
108
108
|
this.contentType('txt');
|
|
109
109
|
return this.send(body);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/core",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.11",
|
|
4
4
|
"description": "Opra schema package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@browsery/type-is": "^0.6.3",
|
|
32
|
-
"@opra/common": "^0.33.
|
|
32
|
+
"@opra/common": "^0.33.11",
|
|
33
|
+
"@types/formidable": "^3.4.5",
|
|
33
34
|
"accepts": "^1.3.8",
|
|
34
35
|
"content-disposition": "^0.5.4",
|
|
35
36
|
"content-type": "^1.0.5",
|
|
@@ -39,18 +40,18 @@
|
|
|
39
40
|
"formidable": "^3.5.1",
|
|
40
41
|
"fresh": "^0.5.2",
|
|
41
42
|
"mime-types": "^2.1.35",
|
|
42
|
-
"power-tasks": "^1.7.
|
|
43
|
+
"power-tasks": "^1.7.3",
|
|
43
44
|
"putil-isplainobject": "^1.1.5",
|
|
44
45
|
"putil-varhelpers": "^1.6.5",
|
|
45
46
|
"range-parser": "^1.2.1",
|
|
46
|
-
"strict-typed-events": "^2.3.
|
|
47
|
+
"strict-typed-events": "^2.3.3",
|
|
47
48
|
"vary": "^1.1.2"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"express": "^4.x.x || ^5.x.x"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@faker-js/faker": "^8.
|
|
54
|
+
"@faker-js/faker": "^8.4.0",
|
|
54
55
|
"@types/accepts": "^1.3.7",
|
|
55
56
|
"@types/content-disposition": "^0.5.8",
|
|
56
57
|
"@types/content-type": "^1.1.8",
|
|
@@ -58,7 +59,6 @@
|
|
|
58
59
|
"@types/cookie-signature": "^1.1.2",
|
|
59
60
|
"@types/encodeurl": "^1.0.2",
|
|
60
61
|
"@types/express": "^4.17.21",
|
|
61
|
-
"@types/formidable": "^3.4.5",
|
|
62
62
|
"@types/fresh": "^0.5.2",
|
|
63
63
|
"@types/mime-types": "^2.1.4",
|
|
64
64
|
"@types/range-parser": "^1.2.7",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@types/vary": "^1.1.3",
|
|
67
67
|
"crypto-browserify": "^3.12.0",
|
|
68
68
|
"path-browserify": "^1.0.1",
|
|
69
|
-
"ts-gems": "^3.1.
|
|
69
|
+
"ts-gems": "^3.1.1"
|
|
70
70
|
},
|
|
71
71
|
"type": "module",
|
|
72
72
|
"module": "./esm/index.js",
|