@ez4/gateway 0.28.0 → 0.30.0
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/errors/access.d.ts +11 -0
- package/dist/errors/context.d.ts +8 -0
- package/dist/errors/provider.d.ts +8 -0
- package/dist/errors/service.d.ts +4 -1
- package/dist/library.cjs +263 -227
- package/dist/library.d.ts +3 -1
- package/dist/library.mjs +233 -200
- package/dist/main.cjs +4 -4
- package/dist/main.mjs +4 -4
- package/dist/metadata/access.d.ts +3 -0
- package/dist/metadata/body.d.ts +1 -1
- package/dist/metadata/context.d.ts +3 -0
- package/dist/metadata/provider.d.ts +3 -0
- package/dist/metadata/utils.d.ts +3 -1
- package/dist/services/common.d.ts +10 -1
- package/dist/services/contract.d.ts +8 -3
- package/dist/services/utils.d.ts +1 -1
- package/dist/triggers/service.d.ts +2 -0
- package/dist/types/common.d.ts +11 -4
- package/dist/types/service.d.ts +3 -2
- package/package.json +12 -8
package/dist/library.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './errors/defaults';
|
|
|
17
17
|
export * from './errors/preferences';
|
|
18
18
|
export * from './errors/route';
|
|
19
19
|
export * from './errors/handler';
|
|
20
|
+
export * from './errors/provider';
|
|
20
21
|
export * from './errors/identity';
|
|
21
22
|
export * from './errors/authorizer';
|
|
22
23
|
export * from './errors/request';
|
|
@@ -25,7 +26,8 @@ export * from './errors/headers';
|
|
|
25
26
|
export * from './errors/parameters';
|
|
26
27
|
export * from './errors/query';
|
|
27
28
|
export * from './errors/body';
|
|
28
|
-
export * from './errors/cors';
|
|
29
29
|
export * from './errors/cache';
|
|
30
|
+
export * from './errors/access';
|
|
31
|
+
export * from './errors/cors';
|
|
30
32
|
export * from './types/common';
|
|
31
33
|
export * from './types/service';
|
package/dist/library.mjs
CHANGED
|
@@ -1,211 +1,244 @@
|
|
|
1
|
-
var
|
|
2
|
-
import{createTrigger as
|
|
3
|
-
getLinkedVariableList as
|
|
4
|
-
import{isModelProperty as
|
|
5
|
-
super("Incomplete service",t,r)}}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
t
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
c,
|
|
31
|
-
|
|
32
|
-
c
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
e,r,o);break;case"
|
|
40
|
-
|
|
41
|
-
import{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
super("
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
var dr=Object.defineProperty;var p=(e,t)=>dr(e,"name",{value:t,configurable:!0});import{registerTriggers as Xn}from"@ez4/common/library";import{registerTriggers as Zn}from"@ez4/schema/library";
|
|
2
|
+
import{createTrigger as _n}from"@ez4/project/library";import{DuplicateServiceError as Nn,isExternalDeclaration as Bn,getLinkedServiceList as Un,
|
|
3
|
+
getLinkedVariableList as Vn,getModelMembers as Qn,getPropertyString as Jn,InvalidServicePropertyError as Gn}from"@ez4/common/library";
|
|
4
|
+
import{isModelProperty as Kn}from"@ez4/reflection";var ee="@ez4/http",op=p(e=>e.type===ee,"isHttpService");import{IncompleteTypeError as yr,TypeCollisionError as Tr}from"@ez4/common/library";var y=class extends yr{static{p(this,"IncompleteServiceError")}constructor(t,r){
|
|
5
|
+
super("Incomplete service",t,r)}},T=class extends Tr{static{p(this,"ServiceColli\
|
|
6
|
+
sionError")}constructor(t,r){super("Service error",t,r)}};import{InvalidServicePropertyError as Nr,isModelDeclaration as Br,getPropertyNumber as Ur,
|
|
7
|
+
getObjectMembers as Vr,getModelMembers as Qr,getServiceListener as Jr,getReferenceType as Gr}from"@ez4/common/library";
|
|
8
|
+
import{isModelProperty as Kr,isTypeObject as Yr,isTypeReference as Wr}from"@ez4/reflection";import{InvalidServicePropertyError as br,isModelDeclaration as hr,getObjectMembers as Sr,
|
|
9
|
+
getModelMembers as xr,getReferenceType as vr,getPropertyStringIn as Ir}from"@ez4/common/library";
|
|
10
|
+
import{isModelProperty as Ar,isTypeObject as Er,isTypeReference as Pr}from"@ez4/reflection";import{hasHeritageType as a,isClassDeclaration as gr,isModelDeclaration as Mr}from"@ez4/common/library";
|
|
11
|
+
import{isTypeCallback as se,isTypeFunction as ie}from"@ez4/reflection";var Hr=new Set(["ANY","GET","POST","PUT","PATCH","DELETE","OPTIONS"]),ce=p(e=>{let[
|
|
12
|
+
t]=e.split(" ",2);return Hr.has(t)},"isHttpPath"),g=p(e=>gr(e)&&a(e,"Http.Servic\
|
|
13
|
+
e"),"isHttpService");var le=p(e=>Mr(e)&&a(e,"Http.Route"),"isHttpRoute");var me=p(e=>a(e,"Http.Defaults"),"isHttpDefaults"),ae=p(e=>a(e,"Http.Preferences"),
|
|
14
|
+
"isHttpPreferences"),ue=p(e=>a(e,"Http.Headers"),"isHttpHeaders"),fe=p(e=>a(e,"H\
|
|
15
|
+
ttp.Identity"),"isHttpIdentity"),de=p(e=>a(e,"Http.QueryStrings"),"isHttpQuery"),
|
|
16
|
+
ye=p(e=>a(e,"Http.PathParameters"),"isHttpParameters"),Te=p(e=>a(e,"Http.JsonBod\
|
|
17
|
+
y"),"isJsonBody"),ge=p(e=>a(e,"Http.Cache"),"isHttpCache"),Me=p(e=>a(e,"Http.Acc\
|
|
18
|
+
ess"),"isHttpAccess"),He=p(e=>a(e,"Http.Cors"),"isHttpCors"),be=p(e=>se(e)||ie(e),
|
|
19
|
+
"isHttpAuthorizer"),he=p(e=>se(e)||ie(e),"isHttpHandler");import{NamingStyle as u}from"@ez4/schema";var M=p((e,t,r,o)=>{if(!Pr(e))return Se(e,t,o);let n=vr(e,r);if(n)return Se(n,t,
|
|
20
|
+
o)},"getHttpPreferences"),Se=p((e,t,r)=>{if(Er(e))return xe(t,Sr(e),r);if(!hr(e)){
|
|
21
|
+
r.push(new H(t.file));return}if(!ae(e)){r.push(new b(e.name,t.file));return}return xe(
|
|
22
|
+
t,xr(e),r)},"getTypePreferences"),xe=p((e,t,r)=>{let o={};for(let n of t)if(Ar(n))
|
|
23
|
+
switch(n.name){default:r.push(new br(e.name,n.name,e.file));break;case"namingSty\
|
|
24
|
+
le":o.namingStyle=Ir(n,[u.Preserve,u.CamelCase,u.PascalCase,u.SnakeCase,u.KebabCase]);
|
|
25
|
+
break}return o},"getTypeFromMembers");import{InvalidServicePropertyError as Rr,getObjectMembers as wr,getPropertyTuple as Or,
|
|
26
|
+
getReferenceType as Ie}from"@ez4/common/library";import{isAnyNumber as zr,isEmptyObject as jr}from"@ez4/utils";
|
|
27
|
+
import{isModelProperty as kr,isTypeClass as Cr,isTypeObject as qr,isTypeReference as Ae}from"@ez4/reflection";var h=p((e,t,r,o)=>{if(!Ae(e))return ve(e,t,r,o);let n=Ie(e,r);return n?ve(n,t,r,
|
|
28
|
+
o):null},"getHttpErrors"),ve=p((e,t,r,o)=>qr(e)?Dr(e,t,wr(e),r,o):null,"getTypeE\
|
|
29
|
+
rrors"),Dr=p((e,t,r,o,n)=>{let i={};for(let s of r){if(!kr(s)||s.inherited)continue;
|
|
30
|
+
let c=parseInt(s.name,10);zr(c)||n.push(new Rr(t.name,s.name,e.file));let l=Fr(s,
|
|
31
|
+
c,t,o,n);l&&Object.assign(i,l)}return jr(i)?null:i},"getTypeFromMembers"),Fr=p((e,t,r,o,n)=>{
|
|
32
|
+
let i=Or(e)??[],s={};for(let c of i){if(!Ae(c)){n.push(new f(r.file));continue}let l=Ie(
|
|
33
|
+
c,o);if(!l||!Cr(l)){n.push(new f(r.file));continue}s[l.name]=t}return s},"getErr\
|
|
34
|
+
orClasses");var Re=p((e,t,r,o)=>{if(!Wr(e))return Ee(e,t,r,o);let n=Gr(e,r);return n?Ee(n,t,
|
|
35
|
+
r,o):null},"getHttpDefaults"),Ee=p((e,t,r,o)=>Yr(e)?Pe(t,Vr(e),r,o):Br(e)?me(e)?
|
|
36
|
+
Pe(t,Qr(e),r,o):(o.push(new x(e.name,t.file)),null):(o.push(new S(t.file)),null),
|
|
37
|
+
"getTypeDefaults"),Pe=p((e,t,r,o)=>{let n={};for(let i of t)if(!(!Kr(i)||i.inherited))
|
|
38
|
+
switch(i.name){default:o.push(new Nr(e.name,i.name,e.file));break;case"httpError\
|
|
39
|
+
s":n.httpErrors=h(i.value,e,r,o);break;case"preferences":n.preferences=M(i.value,
|
|
40
|
+
e,r,o);break;case"memory":case"logRetention":case"timeout":n[i.name]=Ur(i);break;case"\
|
|
41
|
+
listener":n.listener=Jr(i.value,o);break}return n},"getTypeFromMembers");import{isModelProperty as Co,isTypeObject as qo,isTypeReference as Do,isTypeTuple as Fo}from"@ez4/reflection";
|
|
42
|
+
import{InvalidServicePropertyError as No,getLinkedVariableList as Bo,getPropertyBoolean as Uo,
|
|
43
|
+
getPropertyNumber as Vo,getPropertyString as Qo,getObjectMembers as Jo,getModelMembers as Go,
|
|
44
|
+
getServiceListener as Ko,getReferenceType as Yo,getPropertyTuple as Wo}from"@ez4/common/library";import{IncompleteTypeError as Xr,TypeError as Zr}from"@ez4/common/library";var v=class extends Xr{static{p(this,"IncompleteRouteError")}constructor(t,r){super(
|
|
45
|
+
"Incomplete gateway route",t,r)}},f=class extends Zr{static{p(this,"InvalidRoute\
|
|
46
|
+
ErrorTypeError")}constructor(t){super("Invalid route error type.",t)}};import{IncompleteTypeError as _r}from"@ez4/common/library";var I=class extends _r{static{p(this,"IncompleteAuthorizerError")}constructor(t,r){
|
|
47
|
+
super("Incomplete route authorizer",t,r)}};import{InvalidServicePropertyError as Ct,isModelDeclaration as qt,hasHeritageType as Dt,
|
|
48
|
+
getModelMembers as Ft,getObjectMembers as Nt,getPropertyNumber as Bt,getPropertyNumberList as Ut,
|
|
49
|
+
getReferenceType as Vt}from"@ez4/common/library";import{isModelProperty as Qt,isTypeObject as Jt,
|
|
50
|
+
isTypeReference as Gt}from"@ez4/reflection";import{isAnyNumber as Kt}from"@ez4/utils";import{IncorrectTypeError as $r,InvalidTypeError as Lr}from"@ez4/common/library";var A=class extends Lr{constructor(r,o){super("Invalid route response",void 0,r,
|
|
51
|
+
o);this.baseType=r}static{p(this,"InvalidResponseTypeError")}},E=class extends $r{constructor(r,o,n){
|
|
51
52
|
super("Incorrect route response",r,o,n);this.responseType=r;this.baseType=o}static{
|
|
52
|
-
p(this,"IncorrectResponseTypeError")}};import{isTypeIntersection as
|
|
53
|
-
isTypeUnion as
|
|
54
|
-
import{createUnionSchema as
|
|
55
|
-
super("Invalid identity",void 0,"Http.Identity",t)}},
|
|
53
|
+
p(this,"IncorrectResponseTypeError")}};import{isTypeIntersection as nt,isTypeObject as pt,isTypeReference as st,isTypeUndefined as it,
|
|
54
|
+
isTypeUnion as ct}from"@ez4/reflection";import{getReferenceType as lt,isModelDeclaration as mt}from"@ez4/common/library";
|
|
55
|
+
import{createUnionSchema as at}from"@ez4/schema/library";import{IncorrectTypeError as et,InvalidTypeError as rt}from"@ez4/common/library";var P=class extends rt{static{p(this,"InvalidIdentityTypeError")}constructor(t){
|
|
56
|
+
super("Invalid identity",void 0,"Http.Identity",t)}},R=class extends et{constructor(r,o){
|
|
56
57
|
super("Incorrect identity",r,"Http.Identity",o);this.identityType=r}static{p(this,
|
|
57
|
-
"IncorrectIdentityTypeError")}};import{getObjectSchema as
|
|
58
|
-
r);return n?
|
|
59
|
-
e.elements,t,r,o);if(
|
|
60
|
-
file)),null;if(!
|
|
61
|
-
(n.definitions={...n.definitions,extensible:!0}),n},"getTypeIdentity"),
|
|
62
|
-
let n=[];for(let
|
|
63
|
-
n[0]},"getIdentityFromUnion");import{isTypeIntersection as
|
|
64
|
-
import{getReferenceType as
|
|
65
|
-
"Invalid headers",void 0,"Http.Headers",t)}},
|
|
58
|
+
"IncorrectIdentityTypeError")}};import{getObjectSchema as tt,isObjectSchema as ot}from"@ez4/schema/library";var m=p((e,t)=>{let r=tt(e,t);return r&&ot(r)?r:null},"getSchemaFromType");var d=p((e,t,r,o)=>{if(it(e))return null;if(!st(e))return we(e,t,r,o);let n=lt(e,
|
|
59
|
+
r);return n?we(n,t,r,o):null},"getHttpIdentity"),we=p((e,t,r,o)=>{if(ct(e))return ut(
|
|
60
|
+
e.elements,t,r,o);if(pt(e)||nt(e))return m(e,r);if(!mt(e))return o.push(new P(t.
|
|
61
|
+
file)),null;if(!fe(e))return o.push(new R(e.name,t.file)),null;let n=m(e,r);return n&&
|
|
62
|
+
(n.definitions={...n.definitions,extensible:!0}),n},"getTypeIdentity"),ut=p((e,t,r,o)=>{
|
|
63
|
+
let n=[];for(let i of e){let s=d(i,t,r,o);s&&n.push(s)}return n.length>1?at({elements:n}):
|
|
64
|
+
n[0]},"getIdentityFromUnion");import{isTypeIntersection as yt,isTypeObject as Tt,isTypeReference as gt}from"@ez4/reflection";
|
|
65
|
+
import{getReferenceType as Mt,isModelDeclaration as Ht}from"@ez4/common/library";import{IncorrectTypeError as ft,InvalidTypeError as dt}from"@ez4/common/library";var w=class extends dt{static{p(this,"InvalidHeadersTypeError")}constructor(t){super(
|
|
66
|
+
"Invalid headers",void 0,"Http.Headers",t)}},O=class extends ft{constructor(r,o){
|
|
66
67
|
super("Incorrect headers",r,"Http.Headers",o);this.headersType=r}static{p(this,"\
|
|
67
|
-
IncorrectHeadersTypeError")}};var
|
|
68
|
-
o):null},"getHttpHeaders"),
|
|
69
|
-
(o.push(new
|
|
70
|
-
import{getReferenceType as
|
|
71
|
-
import{isTypeArray as
|
|
72
|
-
isTypeScalar as
|
|
73
|
-
"Invalid body",void 0,"Http.JsonBody",t)}},
|
|
68
|
+
IncorrectHeadersTypeError")}};var z=p((e,t,r,o)=>{if(!gt(e))return Oe(e,t,r,o);let n=Mt(e,r);return n?Oe(n,t,r,
|
|
69
|
+
o):null},"getHttpHeaders"),Oe=p((e,t,r,o)=>Tt(e)||yt(e)?m(e,r):Ht(e)?ue(e)?m(e,r):
|
|
70
|
+
(o.push(new O(e.name,t.file)),null):(o.push(new w(t.file)),null),"getTypeHeaders");import{createUnionSchema as St,getScalarSchema as xt,createArraySchema as vt}from"@ez4/schema/library";
|
|
71
|
+
import{getReferenceType as It,isModelDeclaration as At}from"@ez4/common/library";
|
|
72
|
+
import{isTypeArray as Et,isTypeIntersection as Pt,isTypeObject as Rt,isTypeReference as wt,
|
|
73
|
+
isTypeScalar as Ot,isTypeUndefined as ze,isTypeUnion as zt}from"@ez4/reflection";import{IncorrectTypeError as bt,InvalidTypeError as ht}from"@ez4/common/library";var j=class extends ht{static{p(this,"InvalidBodyTypeError")}constructor(t){super(
|
|
74
|
+
"Invalid body",void 0,"Http.JsonBody",t)}},k=class extends bt{constructor(r,o){super(
|
|
74
75
|
"Incorrect body",r,"Http.JsonBody",o);this.bodyType=r}static{p(this,"IncorrectBo\
|
|
75
|
-
dyTypeError")}};var
|
|
76
|
-
e))return null;if(!
|
|
77
|
-
ody"),
|
|
78
|
-
r,n=>
|
|
79
|
-
e,r):
|
|
80
|
-
null),"getCompoundTypeBody"),
|
|
81
|
-
if(
|
|
82
|
-
length?
|
|
83
|
-
{element:o}):null},"getArrayTypeBody");var
|
|
84
|
-
"getHttpAuthResponse"),
|
|
85
|
-
|
|
86
|
-
t,r,o,n);let
|
|
87
|
-
identity,"isValidAuthResponse"),
|
|
88
|
-
(e,t,r,o,n)=>
|
|
89
|
-
e.name,n,e.file)),null):(o.push(new
|
|
90
|
-
let
|
|
91
|
-
new
|
|
92
|
-
|
|
93
|
-
i.description);break}case"
|
|
94
|
-
|
|
95
|
-
s.body
|
|
96
|
-
|
|
97
|
-
import{InvalidServicePropertyError as
|
|
98
|
-
getObjectMembers as
|
|
99
|
-
this.baseType=r}static{p(this,"InvalidRequestTypeError")}},
|
|
76
|
+
dyTypeError")}};var C=p((e,t,r,o)=>oe(e,r,n=>re(n)??te(n,t,r,o)),"getHttpBody"),oe=p((e,t,r)=>{if(ze(
|
|
77
|
+
e))return null;if(!wt(e))return r(e);let o=It(e,t);return o?r(o):null},"getTypeB\
|
|
78
|
+
ody"),re=p(e=>Ot(e)?xt(e):null,"getScalarTypeBody"),te=p((e,t,r,o)=>zt(e)?jt(e.elements,
|
|
79
|
+
r,n=>re(n)??te(n,t,r,o)):Et(e)?kt(e.element,r,n=>re(n)??te(n,t,r,o)):Rt(e)||Pt(e)?
|
|
80
|
+
m(e,r):At(e)?Te(e)?m(e,r):(o.push(new k(e.name,e.file)),null):(o.push(new j(t.file)),
|
|
81
|
+
null),"getCompoundTypeBody"),jt=p((e,t,r)=>{let o={optional:!1,elements:[]};for(let n of e){
|
|
82
|
+
if(ze(n)){o.optional=!0;continue}let i=oe(n,t,r);i&&o.elements.push(i)}return o.
|
|
83
|
+
elements.length?St(o):null},"getUnionTypeBody"),kt=p((e,t,r)=>{let o=oe(e,t,r);return o?
|
|
84
|
+
vt({element:o}):null},"getArrayTypeBody");var Ce=p((e,t,r,o)=>{let n=De(e,t,r,o,"Http.AuthResponse");return n&&Yt(n)?n:null},
|
|
85
|
+
"getHttpAuthResponse"),qe=p((e,t,r,o)=>{let n=De(e,t,r,o,"Http.Response");return n&&
|
|
86
|
+
Wt(n)?n:null},"getHttpHandlerResponse"),De=p((e,t,r,o,n)=>{if(!Gt(e))return je(e,
|
|
87
|
+
t,r,o,n);let i=Vt(e,r);return i?je(i,t,r,o,n):null},"getHttpResponse"),Yt=p(e=>!!e.
|
|
88
|
+
identity,"isValidAuthResponse"),Wt=p(e=>Kt(e.status)||Array.isArray(e.status),"i\
|
|
89
|
+
sValidHandlerResponse"),je=p((e,t,r,o,n)=>Jt(e)?ke(e,t,Nt(e),r,o):qt(e)?Dt(e,n)?
|
|
90
|
+
ke(e,t,Ft(e),r,o):(o.push(new E(e.name,n,e.file)),null):(o.push(new A(n,t.file)),
|
|
91
|
+
null),"getTypeResponse"),ke=p((e,t,r,o,n)=>{let i={};for(let s of r)if(!(!Qt(s)||
|
|
92
|
+
s.inherited))switch(s.name){default:n.push(new Ct(t.name,s.name,e.file));break;case"\
|
|
93
|
+
status":i.status=Bt(s)??Ut(s);break;case"headers":{i.headers=z(s.value,e,o,n),i.
|
|
94
|
+
headers&&s.description&&(i.headers.description=s.description);break}case"identit\
|
|
95
|
+
y":{i.identity=d(s.value,e,o,n),i.identity&&s.description&&(i.identity.description=
|
|
96
|
+
s.description);break}case"body":{i.body=C(s.value,e,o,n),i.body&&s.description&&
|
|
97
|
+
(i.body.description=s.description);break}}return i},"getTypeFromMembers");import{isModelProperty as ao,isTypeIntersection as uo,isTypeObject as fo,isTypeReference as yo}from"@ez4/reflection";
|
|
98
|
+
import{InvalidServicePropertyError as To,isModelDeclaration as go,hasHeritageType as Mo,
|
|
99
|
+
getObjectMembers as Ho,getModelMembers as bo,getReferenceType as ho}from"@ez4/common/library";import{IncorrectTypeError as Xt,InvalidTypeError as Zt}from"@ez4/common/library";var q=class extends Zt{constructor(r,o){super("Invalid route request",void 0,r,o);
|
|
100
|
+
this.baseType=r}static{p(this,"InvalidRequestTypeError")}},D=class extends Xt{constructor(r,o,n){
|
|
100
101
|
super("Incorrect route request",r,o,n);this.requestType=r;this.baseType=o}static{
|
|
101
|
-
p(this,"IncorrectRequestTypeError")}};import{isTypeIntersection as
|
|
102
|
-
import{getReferenceType as
|
|
103
|
-
super("Invalid request parameters",void 0,"Http.PathParameters",t)}},
|
|
102
|
+
p(this,"IncorrectRequestTypeError")}};import{isTypeIntersection as Lt,isTypeObject as eo,isTypeReference as ro}from"@ez4/reflection";
|
|
103
|
+
import{getReferenceType as to,isModelDeclaration as oo}from"@ez4/common/library";import{IncorrectTypeError as _t,InvalidTypeError as $t}from"@ez4/common/library";var F=class extends $t{static{p(this,"InvalidParameterTypeError")}constructor(t){
|
|
104
|
+
super("Invalid request parameters",void 0,"Http.PathParameters",t)}},N=class extends _t{constructor(r,o){
|
|
104
105
|
super("Incorrect request parameters",r,"Http.PathParameters",o);this.parametersType=
|
|
105
|
-
r}static{p(this,"IncorrectParameterTypeError")}};var
|
|
106
|
-
r,o):null},"getHttpParameters"),
|
|
107
|
-
m(e,r):(o.push(new
|
|
108
|
-
Parameter");import{isTypeIntersection as
|
|
109
|
-
import{getReferenceType as
|
|
110
|
-
"Invalid request query strings",void 0,"Http.QueryStrings",t)}},
|
|
106
|
+
r}static{p(this,"IncorrectParameterTypeError")}};var Ne=p((e,t,r,o)=>{if(!ro(e))return Fe(e,t,r,o);let n=to(e,r);return n?Fe(n,t,
|
|
107
|
+
r,o):null},"getHttpParameters"),Fe=p((e,t,r,o)=>eo(e)||Lt(e)?m(e,r):oo(e)?ye(e)?
|
|
108
|
+
m(e,r):(o.push(new N(e.name,e.file)),null):(o.push(new F(t.file)),null),"getType\
|
|
109
|
+
Parameter");import{isTypeIntersection as so,isTypeObject as io,isTypeReference as co}from"@ez4/reflection";
|
|
110
|
+
import{getReferenceType as lo,isModelDeclaration as mo}from"@ez4/common/library";import{IncorrectTypeError as no,InvalidTypeError as po}from"@ez4/common/library";var B=class extends po{static{p(this,"InvalidQueryTypeError")}constructor(t){super(
|
|
111
|
+
"Invalid request query strings",void 0,"Http.QueryStrings",t)}},U=class extends no{constructor(r,o){
|
|
111
112
|
super("Incorrect request query strings",r,"Http.QueryStrings",o);this.queryType=
|
|
112
|
-
r}static{p(this,"IncorrectQueryTypeError")}};var
|
|
113
|
-
r,o):null},"getHttpQuery"),
|
|
114
|
-
(o.push(new
|
|
115
|
-
e,t,r,o,"Http.Request"),"getHttpHandlerRequest"),
|
|
116
|
-
length>0)return
|
|
117
|
-
e,r);return
|
|
118
|
-
t,
|
|
119
|
-
(o.push(new
|
|
120
|
-
if(!(!
|
|
121
|
-
break;case"headers":{
|
|
122
|
-
description
|
|
123
|
-
i.description&&(
|
|
124
|
-
|
|
125
|
-
parameters":{
|
|
126
|
-
description
|
|
127
|
-
(s.body.description
|
|
128
|
-
|
|
129
|
-
c
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
t,o,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
import{isModelProperty as Wo,isTypeObject as Xo,isTypeReference as Zo}from"@ez4/reflection";
|
|
170
|
-
import{isAnyNumber as Xe}from"@ez4/utils";import{IncompleteTypeError as Bo,IncorrectTypeError as Uo,InvalidTypeError as No}from"@ez4/common/library";var J=class extends Bo{static{p(this,"IncompleteCacheError")}constructor(t,r){super(
|
|
171
|
-
"Incomplete gateway cache",t,r)}},G=class extends No{static{p(this,"InvalidCache\
|
|
113
|
+
r}static{p(this,"IncorrectQueryTypeError")}};var Ue=p((e,t,r,o)=>{if(!co(e))return Be(e,t,r,o);let n=lo(e,r);return n?Be(n,t,
|
|
114
|
+
r,o):null},"getHttpQuery"),Be=p((e,t,r,o)=>io(e)||so(e)?m(e,r):mo(e)?de(e)?m(e,r):
|
|
115
|
+
(o.push(new U(e.name,t.file)),null):(o.push(new B(t.file)),null),"getTypeQuery");var Je=p((e,t,r,o)=>ne(e,t,r,o,"Http.AuthRequest"),"getHttpAuthRequest"),Ge=p((e,t,r,o)=>ne(
|
|
116
|
+
e,t,r,o,"Http.Request"),"getHttpHandlerRequest"),ne=p((e,t,r,o,n)=>{if(uo(e)&&e.
|
|
117
|
+
elements.length>0)return ne(e.elements[0],t,r,o,n);if(!yo(e))return Ve(e,t,r,o,n);
|
|
118
|
+
let i=ho(e,r);return i?Ve(i,t,r,o,n):null},"getHttpRequest"),Ve=p((e,t,r,o,n)=>fo(
|
|
119
|
+
e)?Qe(e,t,Ho(e),r,o):go(e)?Mo(e,n)?Qe(e,t,bo(e),r,o):(o.push(new D(e.name,n,e.file)),
|
|
120
|
+
null):(o.push(new q(n,t.file)),null),"getTypeRequest"),Qe=p((e,t,r,o,n)=>{let i={};
|
|
121
|
+
for(let s of r)if(!(!ao(s)||s.inherited))switch(s.name){default:n.push(new To(t.
|
|
122
|
+
name,s.name,e.file));break;case"headers":{i.headers=z(s.value,e,o,n),i.headers&&
|
|
123
|
+
s.description&&(i.headers.description=s.description);break}case"identity":{i.identity=
|
|
124
|
+
d(s.value,e,o,n),i.identity&&s.description&&(i.identity.description=s.description);
|
|
125
|
+
break}case"query":{i.query=Ue(s.value,e,o,n),i.query&&s.description&&(i.query.description=
|
|
126
|
+
s.description);break}case"parameters":{i.parameters=Ne(s.value,e,o,n),i.parameters&&
|
|
127
|
+
s.description&&(i.parameters.description=s.description);break}case"body":{i.body=
|
|
128
|
+
C(s.value,e,o,n),i.body&&s.description&&(i.body.description=s.description);break}}
|
|
129
|
+
return i},"getTypeFromMembers");var Ke=p((e,t,r,o)=>{if(!be(e))return null;let{description:n,module:i}=e,s={...n&&
|
|
130
|
+
{description:n},...i&&{module:i}},c=new Set(["name","file"]);if((s.name=e.name)&&
|
|
131
|
+
c.delete("name"),(s.file=e.file)&&c.delete("file"),e.parameters){let[{value:l}]=e.
|
|
132
|
+
parameters;s.request=Je(l,t,r,o)}return e.return&&(s.response=Ce(e.return,t,r,o)),
|
|
133
|
+
So(s)?s:(o.push(new I([...c],e.file)),null)},"getHttpAuthorizer"),So=p(e=>!!e.name&&
|
|
134
|
+
!!e.file,"isValidAuthorizer");import{IncompleteTypeError as xo}from"@ez4/common/library";var V=class extends xo{static{p(this,"IncompleteHandlerError")}constructor(t,r){
|
|
135
|
+
super("Incomplete route handler",t,r)}};import{isModelDeclaration as Ao,getModelMembers as Eo,getReferenceType as Po,getLinkedServiceList as Ro}from"@ez4/common/library";
|
|
136
|
+
import{isModelProperty as wo,isTypeReference as Oo}from"@ez4/reflection";import{IncompleteTypeError as vo,InvalidTypeError as Io}from"@ez4/common/library";var Q=class extends Io{constructor(r,o){super("Invalid route provider",void 0,r,
|
|
137
|
+
o);this.baseType=r}static{p(this,"InvalidProviderTypeError")}},J=class extends vo{static{
|
|
138
|
+
p(this,"IncompleteProviderError")}constructor(t,r){super("Incomplete route provi\
|
|
139
|
+
der",t,r)}};var We=p((e,t,r,o)=>{if(!Oo(e))return Ye(e,t,r,o,"Http.Provider");let n=Po(e,r);
|
|
140
|
+
return n?Ye(n,t,r,o,"Http.Provider"):null},"getHttpProvider"),zo=p(e=>!!e.services,
|
|
141
|
+
"isValidProvider"),Ye=p((e,t,r,o,n)=>Ao(e)?jo(e,Eo(e),r,o):(o.push(new Q(n,t.file)),
|
|
142
|
+
null),"getProviderType"),jo=p((e,t,r,o)=>{let n={},i=new Set(["services"]);for(let s of t)
|
|
143
|
+
if(!(!wo(s)||s.inherited))switch(s.name){case"services":let c=Ro(s,r,o);c&&(n.services=
|
|
144
|
+
c),i.delete(s.name);break}return zo(n)?n:(o.push(new J([...i],e.file)),null)},"g\
|
|
145
|
+
etTypeFromMembers");var Xe=p((e,t,r,o)=>{if(!he(e))return null;let{description:n,module:i}=e,s={...n&&
|
|
146
|
+
{description:n},...i&&{module:i}},c=new Set(["name","file","response"]);if((s.name=
|
|
147
|
+
e.name)&&c.delete("name"),(s.file=e.file)&&c.delete("file"),e.parameters){let[{value:l},
|
|
148
|
+
pe]=e.parameters;s.request=Ge(l,t,r,o),pe&&(s.provider=We(pe.value,t,r,o))}if(e.
|
|
149
|
+
return){let l=qe(e.return,t,r,o);l&&(s.response=l,c.delete("response"))}return ko(
|
|
150
|
+
s)?s:(o.push(new V([...c],e.file)),null)},"getHttpHandler"),ko=p(e=>!!e.name&&!!e.
|
|
151
|
+
file&&!!e.response,"isValidHandler");var $e=p((e,t,r,o)=>{let n=Wo(t)??[];return Le(n,e,r,o)},"getHttpRoutes"),Le=p((e,t,r,o)=>{
|
|
152
|
+
let n=[];for(let i of e){let s=Xo(i,t,r,o);Array.isArray(s)?n.push(...s):s&&n.push(
|
|
153
|
+
s)}return n},"getRouteFromTuple"),Xo=p((e,t,r,o)=>{if(!Do(e))return Ze(e,t,r,o);
|
|
154
|
+
let n=Yo(e,r);return n?Ze(n,t,r,o):null},"getTypeFromRoute"),Zo=p(e=>!!e.path&&!!e.
|
|
155
|
+
handler,"isValidRoute"),Ze=p((e,t,r,o)=>le(e)?_e(e,t,Go(e),r,o):qo(e)?_e(e,t,Jo(
|
|
156
|
+
e),r,o):Fo(e)&&e.spread?Le(e.elements,t,r,o):null,"getRouteType"),_e=p((e,t,r,o,n)=>{
|
|
157
|
+
let i={},s=new Set(["path","handler"]);for(let c of r)if(!(!Co(c)||c.inherited))
|
|
158
|
+
switch(c.name){default:n.push(new No(t.name,c.name,e.file));break;case"path":{let l=Qo(
|
|
159
|
+
c);l&&ce(l)&&(s.delete(c.name),i.path=l);break}case"handler":(i.handler=Xe(c.value,
|
|
160
|
+
t,o,n))&&s.delete(c.name);break;case"authorizer":i.authorizer=Ke(c.value,t,o,n);
|
|
161
|
+
break;case"httpErrors":i.httpErrors=h(c.value,t,o,n);break;case"preferences":i.preferences=
|
|
162
|
+
M(c.value,t,o,n);break;case"memory":case"logRetention":case"timeout":i[c.name]=Vo(
|
|
163
|
+
c);break;case"cors":i.cors=Uo(c);break;case"listener":i.listener=Ko(c.value,n);break;case"\
|
|
164
|
+
variables":i.variables=Bo(c,n);break}return Zo(i)?i:(n.push(new v([...s],e.file)),
|
|
165
|
+
null)},"getTypeFromMembers");import{InvalidServicePropertyError as en,isModelDeclaration as rn,getModelMembers as tn,
|
|
166
|
+
getObjectMembers as on,getPropertyNumber as nn,getReferenceType as pn}from"@ez4/common/library";
|
|
167
|
+
import{isModelProperty as sn,isTypeObject as cn,isTypeReference as ln}from"@ez4/reflection";
|
|
168
|
+
import{isAnyNumber as tr}from"@ez4/utils";import{IncompleteTypeError as _o,IncorrectTypeError as $o,InvalidTypeError as Lo}from"@ez4/common/library";var G=class extends _o{static{p(this,"IncompleteCacheError")}constructor(t,r){super(
|
|
169
|
+
"Incomplete gateway cache",t,r)}},K=class extends Lo{static{p(this,"InvalidCache\
|
|
172
170
|
TypeError")}constructor(t){super("Invalid gateway cache type",void 0,"Http.Cache",
|
|
173
|
-
t)}},
|
|
174
|
-
"Http.Cache",o);this.cacheType=r}static{p(this,"IncorrectCacheTypeError")}};var
|
|
175
|
-
null},"getHttpCache"),
|
|
176
|
-
e)?
|
|
177
|
-
(r.push(new
|
|
178
|
-
["authorizerTTL"]);for(let
|
|
179
|
-
o.push(new
|
|
180
|
-
(n[
|
|
181
|
-
null)},"getTypeFromMembers");
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
171
|
+
t)}},Y=class extends $o{constructor(r,o){super("Incorrect gateway cache type",r,
|
|
172
|
+
"Http.Cache",o);this.cacheType=r}static{p(this,"IncorrectCacheTypeError")}};var or=p((e,t,r,o)=>{if(!ln(e))return er(e,t,o);let n=pn(e,r);return n?er(n,t,o):
|
|
173
|
+
null},"getHttpCache"),mn=p(e=>tr(e.authorizerTTL),"isValidCache"),er=p((e,t,r)=>cn(
|
|
174
|
+
e)?rr(e,t,on(e),r):rn(e)?ge(e)?rr(e,t,tn(e),r):(r.push(new Y(e.name,e.file)),null):
|
|
175
|
+
(r.push(new K(t.file)),null),"getTypeCache"),rr=p((e,t,r,o)=>{let n={},i=new Set(
|
|
176
|
+
["authorizerTTL"]);for(let s of r)if(!(!sn(s)||s.inherited))switch(s.name){default:
|
|
177
|
+
o.push(new en(t.name,s.name,e.file));break;case"authorizerTTL":{let c=nn(s);tr(c)&&
|
|
178
|
+
(n[s.name]=c,i.delete(s.name));break}}return mn(n)?n:(o.push(new G([...i],e.file)),
|
|
179
|
+
null)},"getTypeFromMembers");import{InvalidServicePropertyError as dn,isModelDeclaration as yn,getModelMembers as Tn,
|
|
180
|
+
getObjectMembers as gn,getPropertyNumber as Mn,getReferenceType as Hn}from"@ez4/common/library";
|
|
181
|
+
import{isModelProperty as bn,isTypeObject as hn,isTypeReference as Sn}from"@ez4/reflection";
|
|
182
|
+
import{isAnyNumber as sr}from"@ez4/utils";import{IncompleteTypeError as an,IncorrectTypeError as un,InvalidTypeError as fn}from"@ez4/common/library";var W=class extends an{static{p(this,"IncompleteAccessError")}constructor(t,r){super(
|
|
183
|
+
"Incomplete gateway access",t,r)}},X=class extends fn{static{p(this,"InvalidAcce\
|
|
184
|
+
ssTypeError")}constructor(t){super("Invalid gateway access type",void 0,"Http.Ac\
|
|
185
|
+
cess",t)}},Z=class extends un{constructor(r,o){super("Incorrect gateway access t\
|
|
186
|
+
ype",r,"Http.Access",o);this.cacheType=r}static{p(this,"IncorrectAccessTypeError")}};var ir=p((e,t,r,o)=>{if(!Sn(e))return nr(e,t,o);let n=Hn(e,r);return n?nr(n,t,o):
|
|
187
|
+
null},"getHttpAccess"),xn=p(e=>sr(e.logRetention),"isValidAccess"),nr=p((e,t,r)=>hn(
|
|
188
|
+
e)?pr(e,t,gn(e),r):yn(e)?Me(e)?pr(e,t,Tn(e),r):(r.push(new Z(e.name,e.file)),null):
|
|
189
|
+
(r.push(new X(t.file)),null),"getTypeAccess"),pr=p((e,t,r,o)=>{let n={},i=new Set(
|
|
190
|
+
["logRetention"]);for(let s of r)if(!(!bn(s)||s.inherited))switch(s.name){default:
|
|
191
|
+
o.push(new dn(t.name,s.name,e.file));break;case"logRetention":{let c=Mn(s);sr(c)&&
|
|
192
|
+
(n[s.name]=c,i.delete(s.name));break}}return xn(n)?n:(o.push(new W([...i],e.file)),
|
|
193
|
+
null)},"getTypeFromMembers");import{InvalidServicePropertyError as En,isModelDeclaration as Pn,getModelMembers as Rn,
|
|
194
|
+
getObjectMembers as wn,getPropertyBoolean as On,getPropertyStringList as zn,getPropertyNumber as jn,
|
|
195
|
+
getReferenceType as kn}from"@ez4/common/library";import{isModelProperty as Cn,isTypeObject as qn,
|
|
196
|
+
isTypeReference as Dn}from"@ez4/reflection";import{IncompleteTypeError as vn,IncorrectTypeError as In,InvalidTypeError as An}from"@ez4/common/library";var _=class extends vn{static{p(this,"IncompleteCorsError")}constructor(t,r){super(
|
|
197
|
+
"Incomplete HTTP CORS",t,r)}},$=class extends An{static{p(this,"InvalidCorsTypeE\
|
|
198
|
+
rror")}constructor(t){super("Invalid HTTP CORS type",void 0,"Http.Cors",t)}},L=class extends In{constructor(r,o){
|
|
199
|
+
super("Incorrect HTTP CORS type",r,"Http.Cors",o);this.fallbackType=r}static{p(this,
|
|
200
|
+
"IncorrectCorsTypeError")}};var mr=p((e,t,r,o)=>{if(!Dn(e))return cr(e,t,o);let n=kn(e,r);return n?cr(n,t,o):
|
|
201
|
+
null},"getHttpCors"),Fn=p(e=>!!e.allowOrigins?.length,"isValidCors"),cr=p((e,t,r)=>qn(
|
|
202
|
+
e)?lr(e,t,wn(e),r):Pn(e)?He(e)?lr(e,t,Rn(e),r):(r.push(new L(e.name,e.file)),null):
|
|
203
|
+
(r.push(new $(t.file)),null),"getTypeCors"),lr=p((e,t,r,o)=>{let n={},i=new Set(
|
|
204
|
+
["allowOrigins"]);for(let s of r)if(!(!Cn(s)||s.inherited))switch(s.name){default:
|
|
205
|
+
o.push(new En(t.name,s.name,e.file));break;case"allowOrigins":case"allowMethods":case"\
|
|
206
|
+
allowHeaders":case"exposeHeaders":n[s.name]=zn(s);break;case"allowCredentials":n.
|
|
207
|
+
allowCredentials=On(s);break;case"maxAge":n.maxAge=jn(s);break}return Fn(n)?n:(o.
|
|
208
|
+
push(new _([...i],e.file)),null)},"getTypeFromMembers");var ar=p(e=>{let t={},r=[];for(let o in e){let n=e[o];if(!g(n)||Bn(n))continue;let i={
|
|
209
|
+
type:ee,extras:{}},s=new Set(["routes"]),c=n.file;i.name=n.name,n.description&&(i.
|
|
210
|
+
description=n.description);for(let l of Qn(n))if(!(!Kn(l)||l.inherited))switch(l.
|
|
211
|
+
name){default:r.push(new Gn(i.name,l.name,c));break;case"routes":(i.routes=$e(n,
|
|
212
|
+
l,e,r))&&s.delete(l.name);break;case"name":i.displayName=Jn(l);break;case"defaul\
|
|
213
|
+
ts":i.defaults=Re(l.value,n,e,r);break;case"cache":i.cache=or(l.value,n,e,r);break;case"\
|
|
214
|
+
access":i.access=ir(l.value,n,e,r);break;case"cors":i.cors=mr(l.value,n,e,r);break;case"\
|
|
215
|
+
variables":i.variables=Vn(l,r);break;case"services":i.services=Un(l,e,r);break}if(!Yn(
|
|
216
|
+
i)){r.push(new y([...s],c));continue}if(t[n.name]){r.push(new Nn(n.name,c));continue}
|
|
217
|
+
Wn(i,r,c),t[n.name]=i}return{services:t,errors:r}},"getHttpServices"),Yn=p(e=>!!e.
|
|
218
|
+
name&&!!e.routes&&!!e.extras,"isValidService"),Wn=p((e,t,r)=>{for(let o of e.routes){
|
|
219
|
+
let n=o.handler.provider;if(n?.services){e.services||(e.services={});for(let i in n.
|
|
220
|
+
services){let s=e.services[i],c=n.services[i];if(!s){e.services[i]=c;continue}s!==
|
|
221
|
+
c&&t.push(new T(i,r))}}}},"assignProviderServices");var ur=p(e=>g(e)?e.name:null,"getLinkedService");var fr=!1,Uc=p(()=>{fr||(Xn(),Zn(),_n("@ez4/gateway",{"metadata:getServices":ar,
|
|
222
|
+
"metadata:getLinkedService":ur}),fr=!0)},"registerTriggers");import{IncorrectTypeError as $n,InvalidTypeError as Ln}from"@ez4/common/library";var S=class extends Ln{static{p(this,"InvalidDefaultsTypeError")}constructor(t){
|
|
223
|
+
super("Invalid defaults",void 0,"Http.Defaults",t)}},x=class extends $n{constructor(r,o){
|
|
193
224
|
super("Incorrect defaults",r,"Http.Defaults",o);this.defaultsType=r}static{p(this,
|
|
194
|
-
"IncorrectDefaultsTypeError")}};import{IncorrectTypeError as
|
|
195
|
-
super("Invalid preferences",void 0,"Http.Preferences",t)}},
|
|
225
|
+
"IncorrectDefaultsTypeError")}};import{IncorrectTypeError as ep,InvalidTypeError as rp}from"@ez4/common/library";var H=class extends rp{static{p(this,"InvalidPreferencesTypeError")}constructor(t){
|
|
226
|
+
super("Invalid preferences",void 0,"Http.Preferences",t)}},b=class extends ep{constructor(r,o){
|
|
196
227
|
super("Incorrect preferences",r,"Http.Preferences",o);this.preferencesType=r}static{
|
|
197
|
-
p(this,"IncorrectPreferencesTypeError")}};export{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
228
|
+
p(this,"IncorrectPreferencesTypeError")}};export{W as IncompleteAccessError,I as IncompleteAuthorizerError,G as IncompleteCacheError,
|
|
229
|
+
_ as IncompleteCorsError,V as IncompleteHandlerError,J as IncompleteProviderError,
|
|
230
|
+
v as IncompleteRouteError,y as IncompleteServiceError,Z as IncorrectAccessTypeError,
|
|
231
|
+
k as IncorrectBodyTypeError,Y as IncorrectCacheTypeError,L as IncorrectCorsTypeError,
|
|
232
|
+
x as IncorrectDefaultsTypeError,O as IncorrectHeadersTypeError,R as IncorrectIdentityTypeError,
|
|
233
|
+
N as IncorrectParameterTypeError,b as IncorrectPreferencesTypeError,U as IncorrectQueryTypeError,
|
|
234
|
+
D as IncorrectRequestTypeError,E as IncorrectResponseTypeError,X as InvalidAccessTypeError,
|
|
235
|
+
j as InvalidBodyTypeError,K as InvalidCacheTypeError,$ as InvalidCorsTypeError,S as InvalidDefaultsTypeError,
|
|
236
|
+
w as InvalidHeadersTypeError,P as InvalidIdentityTypeError,F as InvalidParameterTypeError,
|
|
237
|
+
H as InvalidPreferencesTypeError,Q as InvalidProviderTypeError,B as InvalidQueryTypeError,
|
|
238
|
+
q as InvalidRequestTypeError,A as InvalidResponseTypeError,f as InvalidRouteErrorTypeError,
|
|
239
|
+
T as ServiceCollisionError,ee as ServiceType,Je as getHttpAuthRequest,Ce as getHttpAuthResponse,
|
|
240
|
+
Ke as getHttpAuthorizer,C as getHttpBody,or as getHttpCache,mr as getHttpCors,Xe as getHttpHandler,
|
|
241
|
+
Ge as getHttpHandlerRequest,qe as getHttpHandlerResponse,z as getHttpHeaders,d as getHttpIdentity,
|
|
242
|
+
Ne as getHttpParameters,Ue as getHttpQuery,$e as getHttpRoutes,ar as getHttpServices,
|
|
243
|
+
op as isHttpService,Uc as registerTriggers};
|
|
211
244
|
//# sourceMappingURL=library.mjs.map
|
package/dist/main.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var p=(s,e)=>c(s,"name",{value:e,configurable:!0});var S=(s,e)=>{for(var t in e)c(s,t,{get:e[t],enumerable:!0})},A=(s,e,t,n)=>{if(e&&
|
|
2
2
|
typeof e=="object"||typeof e=="function")for(let o of h(e))!g.call(s,o)&&o!==t&&
|
|
3
|
-
|
|
3
|
+
c(s,o,{get:()=>e[o],enumerable:!(n=l(e,o))||n.enumerable});return s};var q=s=>A(c({},"__esModule",{value:!0}),s);var f={};S(f,{Http:()=>d,HttpBadRequestError:()=>u,HttpError:()=>r,HttpForbiddenError:()=>a,
|
|
4
4
|
HttpInternalServerError:()=>H,HttpNotFoundError:()=>x,HttpUnauthorizedError:()=>i,
|
|
5
5
|
HttpUnprocessableEntityError:()=>y,HttpUnsupportedMediaTypeError:()=>m});module.
|
|
6
|
-
exports=f
|
|
7
|
-
p(this,"HttpError")}},
|
|
6
|
+
exports=q(f);var d;(s=>{})(d||={});var R=require("@ez4/common");var r=class extends R.ServiceError{constructor(t,n,o){super(n,o);this.status=t}static{
|
|
7
|
+
p(this,"HttpError")}},u=class extends r{static{p(this,"HttpBadRequestError")}constructor(e,t){
|
|
8
8
|
super(400,e||"Bad request",t)}},i=class extends r{static{p(this,"HttpUnauthorize\
|
|
9
9
|
dError")}constructor(e,t){super(401,e||"Unauthorized",t)}},a=class extends r{static{
|
|
10
10
|
p(this,"HttpForbiddenError")}constructor(e,t){super(403,e||"Forbidden",t)}},x=class extends r{static{
|